-
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
Add installDirs (datadir, etc) to new-build and remove them from new-install #8556
Conversation
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.
This seems a sensible thing to do.
nice fix, it would need a changelog, no? |
@gbaz: could you add a tiny changelog? thank you! |
-- install doesn't take installDirs flags, since it always installs into the store in a fixed way. | ||
notInstallDirOpt x = not $ optionName x `elem` installDirOptNames | ||
installDirOptNames = map optionName installDirsOptions |
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.
Is this how command line flags are usually filtered out? I would think we would have plenty of of cases of command foo
handling some flags that are really just dispatched to the underlying command bar
?
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.
The issue is that nixStyleOptions adds these things as options. So in this particular case we have nix style options which we specifically want to filter out from a particular v2 command.
@@ -172,7 +172,7 @@ data ProjectConfigShared | |||
-- Things that only make sense for manual mode, not --local mode | |||
-- too much control! | |||
--projectConfigUserInstall :: Flag Bool, | |||
--projectConfigInstallDirs :: InstallDirs (Flag PathTemplate), | |||
projectConfigInstallDirs :: InstallDirs (Flag PathTemplate), |
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.
Do we want to move this, or does the comment above still apply?
Added a changelog and consider this ready to merge. Just need a second review! |
Needs SQUASHING. |
@gbaz: I've added the label in the interest of swiftness. Please feel free to change the label in the next 2 days, before it gets merged. |
Actually, @gbaz, I missed the merge conflict. :( |
Resolves #3586
Handles the --datadir flag, etc. in new-build. Also adds that flag to those that can be parsed from cabal.project files.
Further, removes those flags, which never worked, from
cabal new-install
, as the new install command, by design, always places things in a fixed location in the store.