This project is mirrored from Pull mirroring updated .
  1. 19 Dec, 2017 6 commits
  2. 17 Dec, 2017 5 commits
    • kristenk's avatar
      Solver: Combine dependencies on the same package in the same 'build-depends'. · 4f7ac10d
      kristenk authored
      This commit is unlikely to have an effect on real packages, but it reduces the
      chance of performance problems caused by duplicate dependencies in the solver
      quickcheck tests.  It also adds a regression test to memory-usage-tests.
    • kristenk's avatar
      Call simplifyVersionRange in solver convenience functions (.||.) and (.&&.). · 5270950f
      kristenk authored
      It is probably better to simplify version ranges in most cases in the solver, in
      order to simplify error messages and save memory.  Currently, (.||.) is used once
      for lifting dependencies out of conditionals, and (.&&.) isn't used.
    • kristenk's avatar
      Solver: Remove redundant flag choices from FlaggedDeps. · d239a60f
      kristenk authored
      This commit simplifies the solver's internal representation of package
      conditionals by removing branches that are unreachable.  For example, the solver
      now simplifies
      if flag(A)
        if flag(A)
          build-depends: package-a
          build-depends: package-b
      if flag(A)
        build-depends: package-a
      because A must be true for the second conditional to be relevant to the
      finalized PackageDescription.
      This change probably won't improve performance by simplifying real packages.
      However, it fixes a bug in the solver's handling of a certain edge case.  Before
      this change, it was possible for the solver to create DependencyReasons with
      conflicting flag values.  The conflicting values could cause a problem when
      one was FlagBoth, the value used when the same dependency appears on both sides
      of a conditional.  Here is an example:
      if flag(A)
        if flag(A)
          build-depends: unknown-package
          build-depends: unknown-package
      Previously, the solver inserted both A=FlagTrue and A=FlagBoth into the
      DependencyReason for the dependency on unknown-package. When the previous
      commit changed the association list of flag values into a map, FlagBoth replaced
      FlagTrue and prevented the solver from trying -A.
      This commit simplifies the conditionals to:
      if flag(A)
        build-depends: unknown-package
      It also adds some unit tests for dependencies occurring on both sides of
      conditionals. "testBackjumpingWithCommonDependency" tests the example above.
    • kristenk's avatar
      Solver: Deduplicate flags and stanzas in DependencyReason. · 6fe3c5f7
      kristenk authored
      This commit changes DependencyReason's list fields to maps and sets. Duplicate
      flags were possible when a flag appeared multiple times in nested conditionals
      or a flag controlled a "Buildable: False" field. The duplicate flag could show
      up in log messages:
      [__5] trying: json-rpc-client:+demo
      [__6] trying: process- (dependency of json-rpc-client +demo +demo)
      [__5] trying: json-rpc-client:+demo
      [__6] trying: process- (dependency of json-rpc-client +demo)
    • Herbert Valerio Riedel's avatar
  3. 16 Dec, 2017 1 commit
  4. 11 Dec, 2017 1 commit
  5. 06 Dec, 2017 1 commit
  6. 04 Dec, 2017 4 commits
  7. 03 Dec, 2017 1 commit
  8. 02 Dec, 2017 2 commits
  9. 29 Nov, 2017 2 commits
  10. 28 Nov, 2017 1 commit
  11. 25 Nov, 2017 1 commit
    • Herbert Valerio Riedel's avatar
      Have the solver reject packages with a too-new/unsupported spec-version · 97155ecd
      Herbert Valerio Riedel authored
      This compares the request spec-version to the lib:Cabal's version in order to
      determine whether cabal is able to properly understand the package. If it's
      newer than the currently linked lib:Cabal version it's turned into a global
      `FailResult` which the solver treats as desired in terms of backtracking and
      error reporting.
      This is related to the new spec-version forward-compat scheme (see #4899).
      This is a forward-port of #4907 to the `master` branch
  12. 22 Nov, 2017 1 commit
    • Ben Gamari's avatar
      Split sections support for GHC · 450d6bc4
      Ben Gamari authored
      Add --enable-split-sections flag and pipe it through to the GHC backend. Note
      that some of the implementation here could be made a bit more precise:
      -split-sections and -split-objs are mutually exlusive yet the types don't
      currently reflect this.
      Fixes #4819.
  13. 12 Nov, 2017 12 commits
  14. 09 Nov, 2017 1 commit
  15. 03 Nov, 2017 1 commit