-
Notifications
You must be signed in to change notification settings - Fork 842
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
Make stack build --flag
print warning when flag or package is unknown
#617
Comments
Big +1 on this one. I've run into this myself on several occasions. |
+1 and I presume the same warning should go for the flags section of stack.yaml. |
Btw, the more I think of it, the more I have an opinion that it should actually error, not warn. Why would anyone want a flag that's not declared in .cabal-file? |
I agree. This has the potential to run a lengthy erroneous build, and the warning could be easily missed, especially when the invocation of stack is automated. +1 should be error. I don't think any sort of "force" option is necessary to bypass the error either; the solution is just to fix the flags. |
Related: #611 (Should show error if setting |
Merging this and #611. The error/warning message should be adjusted in the case where the flag matches a snapshot package to inform the user that flags can't be set for those. |
Self-assigning |
I'm also inclined to agree it should be an error rather than a warning. |
OK, this is implemented and has a number of integration tests in place as well. Can others give it a whirl and see how it behaves? |
@snoyberg I confirm this works, thank you! |
This follows the changes appeared in #617
It can be quite dangerous when you make a mistake in package name (instead of "AdServer" I used lower-case "adserver"), and flag doesn't apply (and you try to deploy debug-build into production because of that). I would like stack to error or warn me about missing name.
The text was updated successfully, but these errors were encountered: