-
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
Remember configuration flags #1439
Comments
IIRC, this is an intentional design decision of stack, to eliminate statefullness that can get in the way of straightforward build determinism and scriptability. I agree that it's unpleasant when you accidentally forget a flag and it unregisters a bunch of stuff as a result.. Lets discuss current approaches / whether something should be added to stack for this.
How about the I usually handle this circumstance by editing my stack.yaml (see #846). If you don't want to deal with having working copy changes, you can copy Another approach would be to handle this in an external wrapper script that handles generating your stack.yaml - see the discussion here.
As of |
I know about the I see that using either Would it be feasible to have a (As for the |
Yeah, having some way to override / extend a stack.yaml could be nice. But I think the consensus so far is to keep it simple and not implement such a mechanism: #1375 |
Fair enough. I'm currently working around it by having local variables in Emacs to add the option to calls to |
If I want to build a package on my local machine with certain Cabal flags enabled/disabled, is there any way of using stack that would let me set this once and then not have to remember to do so each time?
For example, using cabal-install I could do
cabal configure --flags=foo
and then just runcabal build
any time I wanted to try building it without having to specify the flag again.However, the only thing I can see to do with stack is to always do
stack build --flag package=foo
(and there doesn't seem to be any way of enabling/disabling flags for use withstack ghci
).The text was updated successfully, but these errors were encountered: