Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/haskell/Cabal. Pull mirroring updated .
  1. Dec 17, 2018
  2. Dec 16, 2018
    • Alexis Williams's avatar
    • Oleg Grenrus's avatar
      Add showFields-prime · a3ccef45
      Oleg Grenrus authored
      a3ccef45
    • Oleg Grenrus's avatar
      Introduce Distribution.Fields module namespace · 7150c6d2
      Oleg Grenrus authored
      Split fields related functionality out of `Distribution.Parsec`
      namespace which is not left only to handle "scalar" values.
      This separation highlights that we use `parsec` for *structure* (think
      JSON), and the *values* of the fields (think e.g. dates in JSON).
      
      - New top-level `Distribution.Fields` and `Distribution.Parsec` modules
        should include most things most people would need.
      - Also `Distribution.Pretty.Field` is moved to `Distribution.Fields.Pretty`,
        as now it has proper place.
      - The commit is moving things around and fixing compilation errors.
      - I fixed `cabal check` parse error printing as I was nearby.
      7150c6d2
  3. Dec 05, 2018
    • Matt Renaud's avatar
      Update ProjectConfig Arbitrary instance. · e7864e47
      Matt Renaud authored
      e7864e47
    • Matt Renaud's avatar
      Change flag to --test-fail-when-no-test-suites. · 98be338d
      Matt Renaud authored
      This changes the default behaviour to succeed when no test suites are found. The
      old behaviour can be achieved by passing --test-fail-when-no-test-suites.
      
      Sessions with new changes:
      
      $ cabal v2-test
      Resolving dependencies...
      No tests to run for the package initsample-0.1.0.0
      
      $ cabal v2-test --test-fail-when-no-test-suites
      Resolving dependencies...
      cabal: Cannot run tests for the target '' which refers to the package
      initsample-0.1.0.0 because it does not contain any test suites.
      98be338d
    • kristenk's avatar
      Add --minimize-conflict-set to changelog. · 3bb7f273
      kristenk authored
      3bb7f273
    • kristenk's avatar
    • kristenk's avatar
      Check for presence of variable before removing it with --minimize-conflict-set. · 5ca836eb
      kristenk authored
      Sometimes, rerunning the solver to remove one variable from the conflict set
      also removes other variables.  This commit checks whether each variable is still
      present in the conflict set before trying to remove it, which can save expensive
      solver reruns.
      5ca836eb
    • kristenk's avatar
      Add unit tests for --minimize-conflict-set. · dc55e7b5
      kristenk authored
      dc55e7b5
    • kristenk's avatar
      Add --minimize-conflict-set to solver DSL. · c31f7a41
      kristenk authored
      c31f7a41
    • kristenk's avatar
      Solver: Add a flag to control minimizing the conflict set. · f62fcf7e
      kristenk authored
      Minimizing the conflict set requires rerunning the solver multiple times, which
      can be time consuming.  This commit adds a flag, --minimize-conflict-set, that
      defaults to false.  We should probably add a way to limit the total run time
      before turning the feature on by default, such as applying the backjump limit to
      the combined solver runs.
      f62fcf7e
    • kristenk's avatar
      Solver: Improve error message by finding a minimal conflict set (issue #5647). · 5a2bf8bf
      kristenk authored
      This commit improves the error message in the case where the solver finds no
      solution after an exhaustive search.  Previously, cabal generated the error
      message by rerunning the solver and having it prefer goals from the final
      conflict set, so that the error message only mentioned conflicts between
      packages from the final conflict set.  Conflicts relating to the final conflict
      set are more likely to be relevant, because the conflict set contains all
      variables that are involved in one conflict that makes the dependencies
      unsatisfiable.  However, the conflict set can also include variables that led to
      some conflicts but aren't relevant to the main conflict.  This commit improves
      the error message further by first trying to reduce the size of the conflict
      set.
      
      The current algorithm for reducing the conflict set simply reruns the solver
      with different goal orders, so it has some downsides:
      
      - Reducing the conflict set can be slow.  It is also possible for the solver to
        reach the backjump limit on a rerun, even though the first run completed.  In
        that case, it uses the original conflict set.
      
      - The function can fail to remove some unnecessary variables from the conflict
        set.  In the worst case, it returns the original conflict set.
      
      I tested the feature on the example in
      https://www.reddit.com/r/haskell/comments/9rmh9s/how_to_read_cabal_solver_failure_output/
      and #5647.  Both runs used the command
      "cabal install --only-dependencies --enable-tests --force-reinstalls --index-state=2018-10-26T20:30:16Z".
      
      Before:
      
          Resolving dependencies...
          cabal: Could not resolve dependencies:
          [__0] trying: opaleye-0.6.7003.0 (user goal)
          [__1] rejecting: opaleye:!test (constraint from config file, command line
          flag, or user target requires opposite flag selection)
          [__1] trying: opaleye:*test
          [__2] trying: dotenv-0.6.0.3 (dependency of opaleye *test)
          [__3] trying: transformers-0.5.5.0/installed-0.5... (dependency of opaleye)
          [__4] next goal: contravariant (dependency of opaleye)
          [__4] rejecting: contravariant-1.5 (conflict: opaleye => contravariant>=1.2 &&
          <1.5)
          [__4] rejecting: contravariant-1.4.1, contravariant-1.4 (conflict:
          transformers => base==4.12.0.0/installed-4.1..., contravariant => base<4.12)
          [__4] rejecting: contravariant-1.3.3, contravariant-1.3.2,
          contravariant-1.3.1.1, contravariant-1.3.1, contravariant-1.3,
          contravariant-1.2.2.1, contravariant-1.2.2, contravariant-1.2.1,
          contravariant-1.2.0.1, contravariant-1.2 (conflict:
          transformers==0.5.5.0/installed-0.5..., contravariant => transformers>=0.2 &&
          <0.5)
          [__4] rejecting: contravariant-1.1, contravariant-1.0, contravariant-0.6.1.1,
          contravariant-0.6.1, contravariant-0.6, contravariant-0.5.2,
          contravariant-0.5.1, contravariant-0.5, contravariant-0.4.4,
          contravariant-0.4.3, contravariant-0.4.1, contravariant-0.4,
          contravariant-0.3, contravariant-0.2.0.2, contravariant-0.2.0.1,
          contravariant-0.2, contravariant-0.1.3, contravariant-0.1.2.1,
          contravariant-0.1.2, contravariant-0.1.1, contravariant-0.1.0.1,
          contravariant-0.1.0 (conflict: opaleye => contravariant>=1.2 && <1.5)
          [__4] fail (backjumping, conflict set: contravariant, opaleye, transformers)
          After searching the rest of the dependency tree exhaustively, these were the
          goals I've had most trouble fulfilling: transformers, contravariant, opaleye,
          base, dotenv, opaleye:test
      
      After:
      
          Resolving dependencies...
          cabal: Could not resolve dependencies:
          [__0] trying: opaleye-0.6.7003.0 (user goal)
          [__1] trying: transformers-0.5.5.0/installed-0.5... (dependency of opaleye)
          [__2] next goal: contravariant (dependency of opaleye)
          [__2] rejecting: contravariant-1.5 (conflict: opaleye => contravariant>=1.2 &&
          <1.5)
          [__2] rejecting: contravariant-1.4.1, contravariant-1.4 (conflict:
          transformers => base==4.12.0.0/installed-4.1..., contravariant => base<4.12)
          [__2] rejecting: contravariant-1.3.3, contravariant-1.3.2,
          contravariant-1.3.1.1, contravariant-1.3.1, contravariant-1.3,
          contravariant-1.2.2.1, contravariant-1.2.2, contravariant-1.2.1,
          contravariant-1.2.0.1, contravariant-1.2 (conflict:
          transformers==0.5.5.0/installed-0.5..., contravariant => transformers>=0.2 &&
          <0.5)
          [__2] rejecting: contravariant-1.1, contravariant-1.0, contravariant-0.6.1.1,
          contravariant-0.6.1, contravariant-0.6, contravariant-0.5.2,
          contravariant-0.5.1, contravariant-0.5, contravariant-0.4.4,
          contravariant-0.4.3, contravariant-0.4.1, contravariant-0.4,
          contravariant-0.3, contravariant-0.2.0.2, contravariant-0.2.0.1,
          contravariant-0.2, contravariant-0.1.3, contravariant-0.1.2.1,
          contravariant-0.1.2, contravariant-0.1.1, contravariant-0.1.0.1,
          contravariant-0.1.0 (conflict: opaleye => contravariant>=1.2 && <1.5)
          [__2] fail (backjumping, conflict set: contravariant, opaleye, transformers)
          After searching the rest of the dependency tree exhaustively, these were the
          goals I've had most trouble fulfilling: base, opaleye, contravariant,
          transformers
      
      In this case, the feature found a minimal conflict set, {base, opaleye,
      contravariant, transformers}, by removing dotenv and opaleye:test from the
      original conflict set.
      5a2bf8bf
    • kristenk's avatar
      Use RetryLog when rerunning the solver. · 5e317d18
      kristenk authored
      RetryLog is simpler and more efficient than Progress for continuing the solver
      log after an error.
      5e317d18
    • kristenk's avatar
      Refactor generation of the solver's error message. · 8c13253b
      kristenk authored
      This commit generates the solver's final error message in a separate function,
      which is more flexible when the solver is run multiple times.
      8c13253b
  4. Dec 04, 2018
    • Matt Renaud's avatar
      Add --test-allow-no-test-suites flag (#5435). · 9ff21a71
      Matt Renaud authored
      This flag changes the exit behaviour of the v2-test command when the
      TargetProblem is that no tests were found. By default, this will result in
      'cabal v2-test' returning 1, with the flag enabled it now prints a
      friendlier error message and returns 0.
      9ff21a71
  5. Dec 03, 2018
  6. Dec 02, 2018
  7. Dec 01, 2018
  8. Nov 28, 2018
    • Oleg Grenrus's avatar
      Move ReadP out of Cabal (to cabal-install) · baf78ca2
      Oleg Grenrus authored
      - Distribution.Compat.ReadP to Distribution.Deprecated.ReadP
      - Distribution.Text to Distribution.Deprecated.Text
      - all Text instances needed by cabal-install to Deprecated.Text too
      - Distribution.ParseUtils to Distribution.Deprecated.ParseUtils
      - Remove deprecated Distribution.PrettyUtils
      - new Distribution.Text with
      
          display = prettyShow
          simpleParse = simpleParsec
      
        to not break too much stuff (Custom Setup.hs)
      - parseInstalledPackageInfo type signature changed to use
        `base` types
      
      This removes around 2k lines from Cabal the library.
      git diff --stat shows less, as files are moved (git is smart).
      Even so, total 300 lines removal at this point.
      baf78ca2
  9. Nov 26, 2018
  10. Nov 25, 2018
Loading