This project is mirrored from Pull mirroring updated .
  1. 14 Jul, 2018 10 commits
  2. 13 Jul, 2018 3 commits
  3. 13 Jun, 2018 2 commits
  4. 09 Jun, 2018 2 commits
  5. 08 Jun, 2018 1 commit
    • kristenk's avatar
      Solver: Check whether components are buildable in the current environment. · b747032a
      kristenk authored
      This commit handles the most common case of issue #5325 by checking that each
      component that is required as a dependency is buildable in the current
      environment, where environment refers to the compiler, os, arch, and global flag
      constraints.  The solver records whether each component is buildable in the
      package's PInfo during index conversion.  Then it checks that each required
      component is buildable in the validation phase, similar to the check for missing
      The buildable check can give false-positives, because it only considers flags
      that are set by unqualified flag constraints, and it doesn't check whether the
      intra-package dependencies of a component are buildable.  The check is also
      incomplete because it is performed before any automatic flags are assigned.  It
      is possible for the solver to later choose a value for a flag that makes the
      package unbuildable.
  6. 09 May, 2018 4 commits
    • kristenk's avatar
      Solver: Enforce dependencies on libraries (fixes #779). · 6efb5e23
      kristenk authored
      This commit generalizes the fix for issue #4781
      (e86f8389) by tracking dependencies on
      components instead of dependencies on executables.  That means that the solver
      always checks whether a package contains a library before using it to satisfy a
      build-depends dependency.  If a version of a package doesn't contain a library,
      the solver can try other versions.  Associating each dependency with a component
      also moves towards the design for component-based dependency solving described
      in issue #4087.
    • kristenk's avatar
      Solver DSL: Support packages without libraries. · 1743a4d8
      kristenk authored
      The solver DSL previously always added a default library component.
    • kristenk's avatar
      Solver DSL: Support benchmarks, internal libraries, and foreign libraries. · 1bc42a89
      kristenk authored
      This change allows the solver quickcheck tests to test all types of components.
      Previously, the tests generated the components in the solver DSL, but the code
      that converted the packages to GenericPackageDescriptions removed some of the
      components, i.e., it filtered out benchmarks and foreign libraries and merged
      internal libraries with the main library.
    • kristenk's avatar
      Add CABAL_DIR environment variable for specifying the cabal directory. · a343dee1
      kristenk authored
      CABAL_DIR can be used to run integration tests independently on Windows,
      since setting HOME doesn't affect the location of the APPDATA directory.
  7. 27 Apr, 2018 1 commit
  8. 26 Apr, 2018 1 commit
  9. 19 Apr, 2018 1 commit
  10. 03 Mar, 2018 1 commit
  11. 25 Feb, 2018 1 commit
    • kristenk's avatar
      Skip processing the solver log when the log isn't needed. · 9592a392
      kristenk authored
      I tested this change by comparing performance with both
      c01d92f5 (before any refactoring needed to
      implement this change) and 4d28102d (the
      previous commit), using hackage-benchmark.  Since the refactoring changed the
      meaning of the backjump count, I only timed "install" commands that didn't reach
      the backjump limit.  I chose several commands that ran for different amounts of
      time, including the long running example from issue #4976.
      Comparing c01d92f5 (cabal1) and this commit (cabal2):
      compiler: GHC 8.2.1
      index state: 2018-02-16T02:47:32Z
      extra hackage-benchmark flags:
      --packages="aeson yesod wolf" --pvalue=0.01 --trials=50 --print-skipped-packages
      package result1       result2             mean1       mean2     stddev1     stddev2     speedup
      aeson   (not significant)
      yesod   Solution      Solution           2.270s      2.258s      0.027s      0.031s      1.005
      wolf    Solution      Solution           7.337s      7.234s      0.056s      0.047s      1.014
      Comparing 4d28102d (cabal1) and this commit (cabal2) with the same environment
      and flags as above:
      package result1       result2             mean1       mean2     stddev1     stddev2     speedup
      aeson   (not significant)
      yesod   (not significant)
      wolf    Solution      Solution           7.297s      7.245s      0.045s      0.048s      1.007
      hackage-benchmark currently doesn't print the results when they aren't
      significant, so I reran "cabal install --dry-run aeson", and it ran for about
      1.6 seconds and found a solution.
      Comparing c01d92f5 (cabal1) and this commit (cabal2) on issue #4976:
      compiler: GHC 7.10.3
      extra hackage-benchmark flags:
      --cabal1-flags="--index-state='2017-12-25T17:31:19Z' --enable-tests --max-backjumps=-1"
      --cabal2-flags="--index-state='2017-12-25T17:31:19Z' --enable-tests --max-backjumps=-1"
      --packages=servant-mock --pvalue=0.01 --trials=50 --print-skipped-packages --print-trials
      trial/summary    package      result1       result2             mean1       mean2     stddev1     stddev2     speedup
      summary          servant-mock Solution      Solution          39.693s     38.863s      0.181s      0.174s      1.021
      Comparing 4d28102d (cabal1) and this commit (cabal2) on issue #4976 with the
      same environment and flags as above:
      trial/summary    package      result1       result2             mean1       mean2     stddev1     stddev2     speedup
      summary          servant-mock Solution      Solution          39.659s     38.960s      0.195s      0.162s      1.018
      Overall, this seems like a very small performance improvement.
  12. 24 Feb, 2018 3 commits
    • kristenk's avatar
      Add verbosity to solver DSL. · 4d28102d
      kristenk authored
    • kristenk's avatar
      Enforce the backjump limit before creating the solver log. · 6ae39676
      kristenk authored
      Previously, the solver enforced the backjump limit by counting 'Backjump'
      messages during log processing.  This commit instead enforces the backjump limit
      when the solver explores the search tree.  This change simplifies the log
      processing step and allows us to skip creating the log when we don't need to
      print it, though that's not implemented in this commit.
      This commit changes the meaning of the backjump count slightly.  Previously the
      solver counted a backjump every time it backtracked and added at least one
      variable to the conflict set.  Now it counts a backjump every time it unions all
      conflict sets at the current level, even if the union is the same as the
      conflict set from the level below.  That means that more steps count as
      backjumps, and the solver can reach the backjump limit slightly earlier.
      This commit also changes the log messages.  Previously, the solver sometimes
      omitted the last 'Backjump' message, but this commit always prints a 'Backjump'
      message when the solver fails.  Additionally, the level numbers for some
      'Backjump' messages changed to match the levels where the conflict sets were
    • kristenk's avatar
  13. 12 Feb, 2018 1 commit
  14. 10 Feb, 2018 1 commit
    • kristenk's avatar
      Fix typo in flag name in solver unit test. · f1750b8d
      kristenk authored
      The test still passed with the misspelled flag name, because it was only used to
      force a goal order, and the goal order didn't need to be fully specified.
  15. 21 Jan, 2018 2 commits
    • kristenk's avatar
      Print the seed before running each solver-quickcheck test. · 4d83212f
      kristenk authored
      This could help with debugging test cases that run out of memory or timeout in
      CI, such as the failure in #5054.
    • kristenk's avatar
      Also merge dependencies with different DependencyReasons. · a5fefbd2
      kristenk authored
      This commit adds to the previous one by merging dependencies even when they have
      different DependencyReasons.  This change should completely prevent the
      dependency-lifting feature from causing exponential growth of dependencies.  It
      also improves the memory usage test by putting each dependency under a different
      flag, meaning that every dependency has a different DependencyReason.
  16. 20 Jan, 2018 1 commit
    • kristenk's avatar
      Merge dependencies more effectively in D.Solver.Modular.IndexConversion. · 59febb17
      kristenk authored
      This commit is a more thorough fix for the problem that
      4f7ac10d attempted to fix.  4f7ac10d combined
      all dependencies on the same package within the same build-depends or
      build-tool-depends field, in order to avoid performance problems in the solver
      QuickCheck tests.  That wasn't enough to prevent the solver from creating many
      duplicate dependencies when converting the PackageDescription to the
      solver-specific format, though.  When a package contained many conditionals that
      each contained the same dependency in both branches, the solver lifted those
      dependencies out of the conditionals without deduplicating them.
      This commit moves the step that merges dependencies after the step that lifts
      common dependencies out of conditionals.
  17. 19 Jan, 2018 1 commit
    • Oleg Grenrus's avatar
      Change license :: License to Either SPDX.License License · ffbfafd6
      Oleg Grenrus authored
      Resolves #2547
      I introduce SimpleLicenseExpression to make "OrAnyLater LicenseRef"
      unrepresentable. That also simplifies types.
      license field is parsed as old `License` when cabal-version <2.2,
      and as SPDX expression otherwise. `NONE` is recognised.
      There are best-effort functions to convert between `License` and
      There are also IPI changes: parser accepts both `License` and
      `SPDX.License`, as both can occur in package database. Cabal will
      `register` a SDPX expression as `license` for GHC >= 8.4, and legacy
      `License` for other (we are smart when converting `PackageDescription` +
      LBI and other data to `InstalledPackageInfo`)
      Also add NFData InstalledPackageInfo
  18. 17 Jan, 2018 1 commit
    • kristenk's avatar
      Solver: Detect cycles between packages and their setup scripts (fixes #4161). · 53b2dc63
      kristenk authored
      The solver already detected cycles involving more than one package, but it
      allowed dependencies between components within a package.  This commit treats a
      dependency between a package's setup script and library as a cycle in order to
      allow the solver to backtrack and try to break the cycle.  A more thorough
      solution would involve tracking all dependencies between components, as in #4087.
      This commit also fixes the internal error in issue #4980.
  19. 14 Jan, 2018 2 commits
  20. 10 Jan, 2018 1 commit