-
Notifications
You must be signed in to change notification settings - Fork 841
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a config option to override path and add options to each PROG #3118
Add a config option to override path and add options to each PROG #3118
Conversation
The following commit is a more comprehensive solution. A lot of similar code there, but does the job. |
Wow, thanks for working on this! Sorry for the delay on reviewing it.
Unfortunately this is not so straightforward with optparse-applicative, but once pcapriotti/optparse-applicative#253 is merged, something like this should be possible. I don't think it makes sense to delay this PR on that point. It'd also be cool to avoid adding so many fields to the configuration type, possibly by having a datatype for programs and having |
The As a related note, |
a8dfb55
to
35a2db4
Compare
|
Make GHC -Werror happy
35a2db4
to
f4bf018
Compare
Oh damn, it's a real pity to see this rotting 💣
How about I take a stab at updating that, while you cover the rest.
Probably a good idea to include some nice message for this case. From #3118 (comment):
@mgsloan, any quick ones to get @kgadek on the right direction? |
Sorry!! I don't have any good explanation of why I hadn't answered the earlier inquiries, other than misplacing browser tabs and having lots of other stuff to contend with. One reason for this is that I am not so keen on having so much boilerplate. Maybe this is what Cabal does, but I would really prefer something that either:
Maybe that's overkill, but it'd be nice if adding a program to the list could be a modification in one or two spots.
Anything that invokes processes. Search for This is part of the idea with making this more of a runtime thing rather than having separate code paths for each overidable command. The code in System.Process.* would check if the location of a particular command name has been overridden, and instead use that. To ensure that this matches, up, can have a constant like
Seems reasonable to check that.
Seems alright. I hope there is a good way to do (String -> Maybe ProgName). If there isn't, then there won't be a convenient way to do the Process code. Other than perhaps listing what is accepted for the with options, I feel like cabal's ProgName sum type is overkill. Might be nice to use it so that exhaustiveness checks tell us when it's been updated. However, I think Anyway, apologies again @kgadek your good intentions here are appreciated. I hope this hasn't put you off doing other contributions. I really encourage it! Could certainly rebase and implement the stuff described above. Feel free to close this one out and start a new PR as well if that would be appealing. Will try to be more on the ball in the future, should be possible. And feel free to ping multiple times if we're lagging on review. |
Ah, perhaps something like The idea is that if TH is used to generate the options, then adding a constructor to a |
It looks like this has stalled, and has begun accumulating merge conflicts. I'm going to close out for now. @kgadek if you're still interested in pushing forward with this, please drop a comment and we can figure out how to get this to continue. |
This allows one to specify with-ld: and with-strip: in stack.yaml. Ref #2369
Ripoff #2264 from @khanage, includes subsequent changes in 113c637.
While it ignores the existence of #652 and only covers
ld
andstrip
, I would propose to include this anyway, as it's consistent with existing code.Main motivation is the https://www.reddit.com/r/haskell/comments/63y43y/liked_linking_3x_faster_with_gold_link_10x_faster/ post — this patch should allow people to compare the compilation times using clang.
Checklist:
This change is