-
Notifications
You must be signed in to change notification settings - Fork 701
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
Warn if builddir is going to be ignored #8949
Warn if builddir is going to be ignored #8949
Conversation
Terrific! I'll take a look later but in the meantime: does it also address #8947? |
@ulysses4ever This PR addresses #7941 that is: builddir is ignored without a warning. It does not address or attempts to solve #8947 & #5271 since that is a more complex issue. Note to myself. I am only warning about builddir beign not supported in project files but it seems also not supported in the global config? I need to double check. |
I was unclear, i guess, when i referenced #8947. I'm asking to check if this warning will be printed when |
It was indeed my original motivation but on a second reading I realised builddir is ignored also from the global config. As it stands this change will not warn on the global config, because I can make the warning appear irrespectively from where buildir is set by moving the check. I will do that. |
de0ad02
to
74c46ae
Compare
@ulysses4ever I have corrected the manual too. As far as I can tell everytime the manual says "This option cannot be specified via a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Terrific!
Maybe we should update the other places like that (to say "only command line"). I think it'd read much clearer. |
If you agree with my interpretation, yes, I can definitely do that. This is how I think it works:
If we want to be able to read those settings from a global configuration file, we would need to move them out from ProjectConfig to a separate object which can be read at the very start; and somehow incorporate these "initial settings" with the other "project settings" in the global configuration file. But I'd suggest we do that only after we finish the transition to the new parser (see #6101 and #8889). @ulysses4ever If you agree with the above analysis, I will change what the manual says about the above mentioned options ( |
@andreabedini this is an astonishingly clear description, thank you! It matches what I was able to discern myself about project config. I am in total support of improving the manual as discussed. I also think your description would be nice to put somewhere. Either comments in some source file (e.g. |
@ulysses4ever Done. I added a note about the interaction between --http-transport and --extra-prog-path. I decided to leave |
Andrea, while we're on it (the famous last words...), what do you think about defaulting |
@andreasabel since this PR addresses the issue you opened (#7941), would you mind giving it a review if time allows? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thanks!
I suggest we leave that for another PR. I commented on that thread. |
Sounds good, thank you. Please, feel free to apply the squash+merge label as soon as you feel comfortable. |
3e39727
to
179cbf0
Compare
179cbf0
to
7203776
Compare
Passing --ignore-project made cabal use `defaultProject` which is not quite identical to the one used when cabal.project is missing (`defaultImplifictProjectConfig`). There is no reason the two should be different.
builddir can only be specified from the command line. Closes: haskell#7941
7203776
to
d02be62
Compare
d02be62
to
0ba2fe8
Compare
Closes: #7941
Please include the following checklist in your PR:
Bonus points for added automated tests!