-
Notifications
You must be signed in to change notification settings - Fork 704
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
Refactor clean and sdist to use NixStyleFlags #8017
base: master
Are you sure you want to change the base?
Conversation
- Consistently use `NixStyleFlags` for all v2- commands. - This will simplify future changes such as haskell#7999. - Mostly keep option parsers unchanged with the following exceptions: - Reorder options to by consistent with nixStyleOptions ConfigFlags > ProjectFlags > ExtraFlags - Add --ignore-project to clean, which currently does nothing, but will be useful for future clean improvements.
5e8deb0
to
95f56a9
Compare
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.
LGTM
Any chance to add a test about? i guess the unique observable change is make |
well does it make clean and sdist accept all those (nix style) flags? even if most of them does not make sense for those commands? |
I don't know the answer, but there is a difference between "doesn't make sense and so crash" and "whatever the flag is supposed to ensure, is already ensured by different means, but may not be ensured so in the future, so forward-compatible scripts need to use that flag anyway". There is also a lot of space between these extremes. |
@jneira It occurs to me that |
@bacchanalia has the question you left with led you to a deadlock? Is it possible to make a progress here and perhaps get the PR ready still? |
I got busy and stopped doing cabal work, but I'm hoping to get back to it and wrap up some loose ends of things I was working on at some point, hopefully not too far in the future, but not at least for a few more weeks. |
Thanks for updating us on it, and good luck with your endeavors! |
Marking this PR as draft 🙂 |
This PR is motivated by #7999. To make all commands respect config verbose settings, I want to preprocess the flags before they're passed to the commands, and it simplifies the code significantly if all commands use
NixStyleFlags
instead of their own flag type. The only two commands still on their own flag type areclean
andsdist
.This PR also changes the
clean
andsdist
option ordering to make them more consistent with other commands, and adds --ignore-project to clean.