Skip to content

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

Open

Description

@ezyang

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

Activity

  1. added
    cabal-install: v2-build system
    on Jul 14, 2016
  2. dcoutts commented on Jul 26, 2016

    @dcoutts
    Contributor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    cabal-install: v2-build systemtype: discussion

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions