This project is mirrored from https://github.com/haskell/Cabal. Pull mirroring updated .
  1. 17 Dec, 2017 1 commit
  2. 16 Dec, 2017 1 commit
  3. 27 Oct, 2017 1 commit
    • Herbert Valerio Riedel's avatar
      Make `FlagAssignment` an opaque `newtype` · 6cb6a516
      Herbert Valerio Riedel authored
      This is a refactoring abstracting `FlagAssignment` while retaining its
      external appearance as much as possible (i.e. same Read/Show/Binary
      instances etc).
      
      Later we can attach new instances, enforce internal invariants (like
      e.g. uniqueness of flagnames), switch out the internal
      representation (maybe to `Data.Map`), etc more easily.
      6cb6a516
  4. 14 Oct, 2017 1 commit
    • Duncan Coutts's avatar
      Move PackageSpecifier into common Types module · b9ce4337
      Duncan Coutts authored
      It's currently in the old Targets module, but we'll need it in the
      new-build code too soon, and it's not really that closely related to
      targets, so it makes sense to have it live in the common Types module.
      b9ce4337
  5. 13 Oct, 2017 1 commit
  6. 09 Aug, 2017 2 commits
    • Herbert Valerio Riedel's avatar
      Augment `--allow-{newer,older}` syntax to support wildcard · 8bcd719a
      Herbert Valerio Riedel authored
      This builds on top of a0d80350 (#4575)
      and extends the syntax to support the token `all` or `*` to serve as
      wild-card for the relaxation subject, i.e. the following non-exhaustive
      list of forms is made possible (NB: the package name `all` is reserved
      on Hackage):
      
          allow-newer: somepkg:*
          allow-newer: somepkg:all
          allow-newer: somepkg:^*
          allow-newer: somepkg:^all
          allow-newer: all:^all
          allow-newer: *:^all
          allow-newer: *:^*
          allow-newer: *:*
          allow-newer: all:all
      
      Refer to the user's guide for details
      8bcd719a
    • Herbert Valerio Riedel's avatar
      Refactor 'RelaxDeps' to avoid semantic ambiguity of mempty value · 4066ea7a
      Herbert Valerio Riedel authored
      This removes the redundancy between `RelaxDepsNone` and
      `RelaxDepsSome []` by removing `RelaxDepsNone`.
      
      This way we avoid the risk of subtle bugs that can occur if the same
      semantic value can be expressed in a non-unique way.
      
      A further step to normalise the type would be to turn `[RelaxedDep]`
      into `Set RelaxedDep`, but there is no operation that would
      significantly benefit from that yet.
      4066ea7a
  7. 03 Jul, 2017 1 commit
    • Herbert Valerio Riedel's avatar
      Enhance `--allow-{newer,older}` syntax · a0d80350
      Herbert Valerio Riedel authored
      This extends the capabilities of `--allow-{newer,older}` to allow for more
      fine-grained scoping to control more precisely which packages and constraints
      a relaxation is applied to. See updated documentation for more details.
      a0d80350
  8. 18 May, 2017 1 commit
    • Herbert Valerio Riedel's avatar
      Remove --allow-{newer,older} support from Cabal · a95b8f4e
      Herbert Valerio Riedel authored
      This is a preparatory refactoring needed for future work such as #4203.
      
      I've refrained from doing additional cleanups in order to keep this a
      refactoring that mostly moves around blocks of code mostly
      unchanged (except for whitespace), and make it easier to review.
      
      This feature was originally implemented because its lack was complained
      about by Stack/Stackage developers. However, after it got implemented it
      was never really being used; what's more, it's causing us overhead for
      no benefit as well as blocking us improving the implementation via the
      likes of #4203.
      
      Closes #3581
      a95b8f4e
  9. 08 Feb, 2017 1 commit
    • Duncan Coutts's avatar
      Change Graph.fromList to fromDistinctList and fix conseqeunces · 1440ffd5
      Duncan Coutts authored and Edward Z. Yang's avatar Edward Z. Yang committed
      It's really an error to try and build a graph where you have duplicate
      node keys, so remove Graph.fromList and add Graph.fromDistinctList. This
      check is always on, not just an assertion, becuase we get it for free
      given the way Maps can be constructed.
      
      All uses of Graph.fromList are ok to convert to fromDistinctList.
      1440ffd5
  10. 03 Feb, 2017 2 commits
  11. 16 Jan, 2017 1 commit
  12. 13 Jan, 2017 1 commit
  13. 12 Jan, 2017 2 commits
  14. 07 Jan, 2017 1 commit
    • Robert Henderson's avatar
      Added qualifier to 'PackageConstraint' data type. · 79d562bf
      Robert Henderson authored
      Refactored PackageConstraint in two ways:
       1) split it into a package name and a 'PackageProperty' to make
          the code a bit cleaner;
       2) changed PackageName to 'Qualified PackageName'.
      
      Added a Binary instance for Qualifier in PackagePath.hs (needed
      for PackageConstraint).
      
      Added pretty-printing code for PackageConstraint.
      
      For now, all the code that creates a PackageConstraint just sets
      the qualifier to 'unqualified', so this commit will not change
      the external behaviour of cabal-install.
      79d562bf
  15. 03 Jan, 2017 1 commit
  16. 31 Dec, 2016 1 commit
    • Duncan Coutts's avatar
      Refine the fix for requiring Cabal > 1.20 for Setup.hs · 86490508
      Duncan Coutts authored and Herbert Valerio Riedel's avatar Herbert Valerio Riedel committed
      Going along with the existing approach of using a constraint rather than
      altering the deps of custom Setup.hs scripts, but make the constraint
      only apply to Cabal instances that are dependencies of Setup.hs scripts
      not all instances of Cabal.
      
      Also rearrange things a little with a dedicated solver policy function
      for adding a min dep on Cabal versions for setup scripts.
      86490508
  17. 21 Dec, 2016 1 commit
    • Herbert Valerio Riedel's avatar
      Mark `template-haskell` non-upgradable (again) · 0eb4e517
      Herbert Valerio Riedel authored
      65e9b88b made template-haskell non-upgradable
      
      65ae95c1 made it upgradable again
      
      ...and this commit makes it non-upgradable again
      
      While there may be a few cases when `template-haskell` can be
      reinstalled, it's generally not advisable, and causes more harm than the
      benefit in the few cases where we'd gain install-plan
      flexibility (e.g. when only template-haskell's API is needed for
      compile, but no actual TH evaluation takes place).
      
      Closes #4098
      0eb4e517
  18. 14 Nov, 2016 1 commit
  19. 31 Oct, 2016 1 commit
  20. 28 Sep, 2016 1 commit
    • Herbert Valerio Riedel's avatar
      Make `Version` type opaque (#3905) · bb2026c4
      Herbert Valerio Riedel authored
      Similiar to dabd9d98 which made
      `PackageName` opaque, this makes `Distribution.Version.Version` opaque.
      
      The most common version numbers occuring on Hackage are 3- and
      4-part versions. This results in significant Heap overhead due to
      `Data.Version`'s inefficient internal representation.
      
      So like the `PackageName` commit, this commit is a preparatory commit to
      pave the way for replacing `Version`'s internal representation by a
      representation with a memory footprint which can be an order of
      magnitude smaller.
      
      Finally, this also adds a new functor-like convenience function
      
          alterVersion :: ([Int] -> [Int]) -> Version -> Version
      
      for modifying the version number components.
      bb2026c4
  21. 27 Sep, 2016 1 commit
    • Herbert Valerio Riedel's avatar
      Make `PackageName` type opaque (#3896) · dabd9d98
      Herbert Valerio Riedel authored
      When looking at heap-profiles of `cabal-install`, the `(:)` constructor
      stands out as the most-allocated constructor on the heap.
      
      Having to handle 10k+ package names contributes to the allocation
      numbers, especially on 64bit archs where ASCII `String`s have a 24 byte
      per character footprint.
      
      This commit is a preparatory commit to pave the way for changing
      `PackageName`'s internal representation to something like
      `ShortByteString` (which is essentially a thin wrapper around primitive
      `ByteArray#`s which themselves have have an overhead of 2 words + one
      byte per ASCII character rounded up to nearest word) which would allow
      to reduce the memory footprint by a full order of magnitude, as well as
      reduce pointer chasing and GC overhead.
      dabd9d98
  22. 21 Sep, 2016 1 commit
    • Edward Z. Yang's avatar
      Don't solve for executables in legacy code path. · 9e99b3f4
      Edward Z. Yang authored
      
      
      There is a bug in `cabal configure`'s invocation of the solver in
      Distribution/Client/Configure.hs:
      
          standardInstallPolicy
              installedPkgIndex
              (SourcePackageDb mempty packagePrefs)
              [SpecificSourcePackage localPkg]
      
      We can see that the solver is given an EMPTY source package database.
      This is because we assume that everything you need from cabal configure
      is taken from the installed package index.
      
      But this is NOT true for executables, which never have an entry in the
      installed package index. So we SHOULD NOT solve for
      executables in the legacy codepath, since there isn't anything useful we
      can do with the info anyway.  This gets toggled using a new solver
      parameter SolveExecutables.
      
      I didn't bother with a test because this will be obsoleted by
      nix-local-build.
      
      Fixes #3875
      Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
      9e99b3f4
  23. 05 Sep, 2016 1 commit
    • kristenk's avatar
      Deduplicate build targets by storing them in a set. · f7533c35
      kristenk authored
      The solver can handle duplicate targets by linking them together, but the log
      is more complex, and the result is the same as if the targets were deduplicated
      beforehand.
      
      Duplicate targets can occur in a sandbox (issue #3203).
      f7533c35
  24. 21 Aug, 2016 1 commit
    • Edward Z. Yang's avatar
      Solve for, build, and add to path build-tools dependencies. · c0a48602
      Edward Z. Yang authored
      
      
      This fixes #220: new-build now builds, installs and adds executables to
      PATH automatically if they show up in 'build-tools'.  However, there is
      still more that could be done: the new behavior only applies to a
      specific list of 'build-tools' (alex, happy, etc) which Cabal recognizes
      out of the box.  The plan is to introduce a new 'tool-depends' field to
      allow dependencies on other executables as well.
      Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
      c0a48602
  25. 04 Aug, 2016 1 commit
  26. 29 Jul, 2016 1 commit
  27. 23 Jul, 2016 3 commits
  28. 21 Jul, 2016 2 commits
  29. 19 Jul, 2016 4 commits
  30. 11 Jul, 2016 1 commit
  31. 02 Jul, 2016 1 commit