Skip to content
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

Allow the solver to toggle manual flags to match constraints that have any qualifier. #4342

Merged
merged 3 commits into from Feb 20, 2017

Commits on Feb 19, 2017

  1. Allow the solver to toggle manual flags to match constraints that hav…

    …e any qualifier.
    
    This fixes haskell#4299. The change gives the dependency solver the flexibility to link
    dependencies when the user has only set a manual flag on one of them.
    Previously, the solver would force the constrained dependency to have the
    flag value from the constraint and force the unconstrained dependency to have
    the default flag value. In cases where the single instance restriction required
    the dependencies to be linked, the solver couldn't find a solution.
    
    Qualified constraints can still be used to force different dependencies on a
    package to use different flag values. For example,
    "--constraint 'pkg +flag' --constraint 'pkg2:setup.pkg -flag'" turns the flag on
    for the top-level dependency and off for the setup dependency.
    
    I also stored flag default values in the search tree to simplify the code.
    grayjay committed Feb 19, 2017
    Configuration menu
    Copy the full SHA
    4b6108a View commit details
    Browse the repository at this point in the history
  2. Add manual flags to the solver DSL.

    Tests can now declare flags before using them, in order to specify non-default
    values for the fields in 'D.Types.GenericPackageDescription.Flag'.
    grayjay committed Feb 19, 2017
    Configuration menu
    Copy the full SHA
    72a52d4 View commit details
    Browse the repository at this point in the history
  3. Add tests for manual flags.

    grayjay committed Feb 19, 2017
    Configuration menu
    Copy the full SHA
    2c57be1 View commit details
    Browse the repository at this point in the history