Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/haskell/Cabal. Pull mirroring updated .
  1. Jan 31, 2016
  2. Jan 30, 2016
  3. Jan 29, 2016
    • Duncan Coutts's avatar
      Merge pull request #3092 from dcoutts/master · da8caf47
      Duncan Coutts authored
      Solver feature: soft prefs for enabling testsuites/benchmarks
      da8caf47
    • Duncan Coutts's avatar
      Solver feature: soft prefs for enabling testsuites/benchmarks · 114b3810
      Duncan Coutts authored
      The solver has the concept of hard constraints and soft preferences.
      For versions we have both constraints and preferences. We also have
      soft preferences available for whether we'd like installed instanes
      or not.
      
      We also have hard constraints for enabling "optional stanzas" (ie test
      suites or benchmarks). This patch adds soft preferences for the same.
      That is it lets us express the desire to please try enabling test suites
      and/or benchmarks, but allow them to be disabled if a solution cannot
      easily be found with them enabled.
      
      The implementation is very straightforward and not at all scary. :-)
      The original design was discussed with kosmikus and it has seen
      extensive testing in the nix-local-build branch.
      
      Optional stanzas in the solver are treated very much like flags, and so
      we can follow the pattern of a similar feature for flags for this
      feature for optional stanzas. For both flags and optional stanzas the
      solver has a node with up to two choices: True & False, corresponding to
      enable and disable. Various policies can be expressed by reordering
      these two choices or replacing one or other branch with failure. For
      example we can force enabling by replacing the False choice with
      failure. Flag default values are implemented by reordering the True and
      False branches (since the solver will try the first branch first).
      
      So this preference is implemented simply by reordering to put the True
      branch first (keeping both branches). That way the solver will try the
      enable branch first and backtrack to the False branch (which imposes no
      constraints). It integrates smoothly with stanza constraints, which
      adjusts the False branch to be a failure, thereby forcing the True
      branch (or further failure).
      
      The top down solver is simply adjusted for the types, the feature is not
      implemented there.
      
      The feature is not yet used. It's not intended to have any command line
      flag, but to express future policies.
      114b3810
    • kristenk's avatar
      Merge pull request #3091 from grayjay/refactor-3082 · ce335852
      kristenk authored
      Refactor #3082 to reduce code duplication and improve Haddock comment.
      ce335852
    • kristenk's avatar
    • Duncan Coutts's avatar
  4. Jan 28, 2016
  5. Jan 27, 2016
    • Duncan Coutts's avatar
      Extend the backwards compat Setup.hs flags filter · 377cc8f3
      Duncan Coutts authored
      Cabal < 1.12.0 doesn't know about '--enable/disable-executable-dynamic'
      or '--enable/disable-library-coverage'.
      
      This is a problem in general, if rare, but it shows up in the
      nix-local-build branch more obviously since it always passes all flags,
      including defaults (it does this because the defaults should be
      determined by the current version, not the older version).
      377cc8f3
    • Duncan Coutts's avatar
      Simplify the graph dependency graph construction · bf5ac985
      Duncan Coutts authored
      Make the basic dependencyGraph construction function give us just a
      Vertex -> UnitId mapping, rather than a full Vertex -> pkg. Then in
      InstallPlan we keep that Vertex -> UnitId mapping and add a helper
      function that does the additional lookup to give us a Vertex -> pkg
      mapping. It's clearer this way, especially in the case of lookup errors.
      bf5ac985
    • Duncan Coutts's avatar
      Add a Binary instance for InstallPlan · 015ba31b
      Duncan Coutts authored
      This is easier to understand now that the canonical data vs the cached
      graph is clarified. We only store the main data, the cached info is
      reconstructed on deserialisation.
      015ba31b
    • Duncan Coutts's avatar
      Minor refactoring in InstallPlan to highlight caching approach · a7ff70ad
      Duncan Coutts authored
      This is to clarify the lazy caching strategy we use for the fields for
      the Graph (forward and reverse deps, and associated mappings).
      Reorder the fields, and mark non-lazy fields as strict. Make
      construction go via a smart constructor that fills in the cached fields.
      a7ff70ad
    • Duncan Coutts's avatar
      Add makeRelativeTo{Cwd,Dir} file path utils · 96361fbd
      Duncan Coutts authored
      Useful for reporting dir/file names in user interface code, e.g. in
      notices and error messages.
      
      Required by later nix-local-build branch patches.
      96361fbd
    • Duncan Coutts's avatar
      Add ComponentDeps.filterDeps utility · 520746c6
      Duncan Coutts authored
      Required by later nix-local-build branch patches.
      520746c6
    • Duncan Coutts's avatar
      Merge pull request #3080 from dcoutts/master · 5fd4b41f
      Duncan Coutts authored
      Add Binary instances for many types
      5fd4b41f
    • Duncan Coutts's avatar
      Add Binary instances for many types · 46aa019e
      Duncan Coutts authored
      So we can use them in binary cache files.
      
      Also relax version constraints on binary to work with binary-0.5.*,
      which requires that we expose Distribution.Compat.Binary from Cabal.
      
      D.Compat.Binary provides the Gerics support that we need to be able to
      derive instances when using binary-0.5. It's useful to be able to use
      binary-0.5 since that's the version bundled with older ghc versions.
      46aa019e
    • Mikhail Glushenkov's avatar
      Merge pull request #3077 from Heather/PSQ · c6645211
      Mikhail Glushenkov authored
      remove duplicate LANGUAGE DeriveFoldable, minor improvements
      c6645211
    • kristenk's avatar
      Improve algorithm for choosing flags with './Setup configure' · 6d42e6ed
      kristenk authored
      Cabal previously tried all flag combinations, which was very slow.  The new
      algorithm assigns one flag at a time, and backtracks when a flag introduces a
      dependency that is unavailable.
      
      The new algorithm handles the Buildable field by adding an extra conditional at
      the top level of each component that represents the condition for which the
      component is buildable.  Since all dependencies go under the "then" branch, they
      are only required when a flag choice makes the component buildable.  The buildable
      logic is taken from the cabal-install dependency solver.
      
      This commit also changes the error message that is shown when dependencies are
      missing.  Previously, Cabal printed the shortest list of missing dependencies
      from a single flag assignment.  Now it takes the union of all dependencies that
      caused it to backtrack when trying different combinations of flags, which
      requires less searching.
      6d42e6ed
    • Heather's avatar
  6. Jan 26, 2016
  7. Jan 25, 2016
Loading