Skip to content

nix-local-build is too tightly coupled to ConfigFlags, etc. #3549

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

Open
ezyang opened this issue Jul 14, 2016 · 1 comment
Open

nix-local-build is too tightly coupled to ConfigFlags, etc. #3549

ezyang opened this issue Jul 14, 2016 · 1 comment

Comments

@ezyang
Copy link
Contributor

ezyang commented Jul 14, 2016

If I add a new flag to ConfigFlags, there are three places I need to update in cabal-install: cabal-install/Distribution/Client/Config.hs, cabal-install/Distribution/Client/ProjectConfig/Legacy.hs and cabal-install/Distribution/Client/ProjectPlanning.hs. This seems like too many. Two of these are making a Monoid instance; surely this instance could live in Cabal? Could the rest be done using the default flags? Surely that's better?

CC @dcoutts

@dcoutts
Copy link
Contributor

dcoutts commented Jul 26, 2016

My longer term plan was to use distinct config flag types (& corresponding cli/file parsers/printers) just for new-build & co, replacing the ones in cabal-install/Distribution/Client/{Setup,Config}.hs and not reusing any of these types from Cabal since the CLIs are now quite distinct.

Or to put it another way, I'd eliminate cabal-install/Distribution/Client/ProjectConfig/Legacy.hs and use parsers/printers directly for the types in cabal-install/Distribution/Client/ProjectPlanning/Types.hs, rather than re-using the existing parsers/printers and doing type conversions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants