Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/haskell/Cabal. Pull mirroring updated .
  1. Aug 24, 2016
  2. Aug 23, 2016
  3. Aug 21, 2016
    • 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
    • Edward Z. Yang's avatar
      Rewrite ElaboratedConfiguredPackage. · c41ead76
      Edward Z. Yang authored
      
      As requested by Duncan, the majority of fields that originally
      lived in ElaboratedPackage now are moved to ElaboratedConfiguredPackage
      under the prefix 'elab'.  Some code has gotten simpler as a result.
      
      Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
      c41ead76
    • Edward Z. Yang's avatar
    • Edward Z. Yang's avatar
      Per-component new-build support (no Custom support yet). · d9bf6788
      Edward Z. Yang authored
      
      A bit of a megapatch.  Here's what's in it:
      
      * First, a few miscellaneous utility functions and reexports
        in Cabal.  I could have split these into a separate commit
        but I was too lazy to.
      
      * Distribution.Client.Install got refactored:
        instead of using PackageFixedDeps, it uses IsUnit
        instead.  This is because we weren't using ComponentDeps
        in a nontrivial way; we just need some graph structure
        and IsNode (with UnitId keys) fulfills that. I also removed the
        invariant checking and error reporting because it was
        being annoying (we check the invariants already in
        SolverInstallPlan).
      
      * Look at Distribution.Client.ProjectPlanning.Types.
        This contains the primary type change: ElaboratedConfiguredPackage
        is now EITHER a monolithic ElaboratedPackage, or a per-component
        ElaboratedComponent (it should get renamed but I didn't do that
        in this patch.)  These are what we're going to store in our
        plans: if a package we're building has a Setup script which supports
        per-component builds, we'll explode it into a component.  Otherwise
        we'll keep it as a package.  We'll see codepaths for both
        throughout.
      
      * OK, so the expansion happens in ProjectPlanning, mostly in
        'elaborateAndExpandSolverPackage'.  You should review the
        package hash computation code closely.  When we can separate
        components, we compute a hash for each INDEPENDENTLY.  This
        is good: we get more sharing.
      
      * We need to adjust the target resolution and pruning code
        in ProjectOrchestration and ProjectPlanning.  I did a dumb
        but easy idea: if a user mentions 'packagename' in a
        target name, I spray the PackageTarget on every
        possibly relevant IPID in buildTargets', and then pare
        it down later.
      
      * And of course there's code in ProjectBuilding to actual
        do a configure and then build.
      
      * We change the layout of build directories so that we can
        track each component separately.  While I was doing that,
        I also added compiler and platform information.
      
      Custom doesn't work yet because I need to give them their own
      separate component, and teach Cabal how to build them specially.
      
      Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
      d9bf6788
    • Edward Z. Yang's avatar
      Undo new-build support for convenience libraries. · e6b6167d
      Edward Z. Yang authored
      
      The previous approach I took, though correct, was quite
      confusing.  If I refactor InstallPlan to operate on a
      per-component basis, then we'll automatically get support
      for convenience libraries, which will ultimately cleaner.
      (While we won't be able to get rid of support for whole
      package installs, it will be safe to assume packages
      using convenience libraries also support one-shot
      configure.)
      
      I didn't revert the support in cabal install; I'm not
      planning on componentizing it.
      
      Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
      e6b6167d
  4. Aug 17, 2016
  5. Aug 10, 2016
  6. Aug 07, 2016
    • kristenk's avatar
      Convert some tests to QuickCheck properties. · f5cf213f
      kristenk authored
      f5cf213f
    • kristenk's avatar
      Solver: Use difference lists to combine logs in 'Explore.exploreLog'. · a258aefc
      kristenk authored
      This commit adds a data structure, 'RetryLog', which is like a difference list
      for the 'Progress' type, except that it only supports efficient appends at
      failures. Since the solver continually appends logs and calls 'tryWith' while
      exploring the search tree, it is important for those operations to be efficient.
      Afterwards, the solver converts the 'RetryLog' back to a 'Progress' so that it
      can be processed with pattern matching in Log.hs and Message.hs.
      a258aefc
  7. Aug 01, 2016
  8. Jul 30, 2016
    • kristenk's avatar
      Avoid filtering the solver log before 'showMessages'. · f2d02983
      kristenk authored
      Previously, the solver filtered out redundant backjumping messages twice, once
      in 'Log.logToProgress' and again in 'Message.showMessages. However,
      'showMessages' relied on the backjumping messages to determine where to insert
      messages about missing packages. This led to missing "unknown package" messages
      (part of issue #3617).
      
      This commit removes the filtering in 'logToProgress', because it was redundant.
      f2d02983
  9. Jul 25, 2016
    • Duncan Coutts's avatar
      Remove the now-unused InstallPlan type args for result and failure · 0bb80be2
      Duncan Coutts authored
      These were used previously for the Installed and Failed package states,
      but these states are now gone.
      
      Importantly this now means that we can have a serialisable InstallPlan
      without the failure types having to be serialisable. This means we can
      use things like SomeException which is not serialisable. Since the
      traversal is done separately, the result of the traversal contains the
      failure values, but this result set does not have to be serialised.
      0bb80be2
    • Duncan Coutts's avatar
      Convert new-build to use InstallPlan.execute · 97cff5c0
      Duncan Coutts authored
      Eliminate the local executeInstallPlan. The main change is that the new
      execute returns BuildResults instead of an upated InstallPlan. This has
      a few knock-on conseuqnces for the code that looks at the result of the
      build execution.
      
      Currently we don't actually do that much with the results in the
      new-build code path (though we should) so there's less disruption than
      one might imagine. The biggest change is in the integration tests which
      do inspect the execution result to check things worked or didn't work as
      expected.
      
      The equivalent change for the old build code path will be more
      disruptive since it does a lot of stuff with the execution results.
      97cff5c0
    • Duncan Coutts's avatar
      Add InstallPlan.execute plus tests · 31be24fa
      Duncan Coutts authored
      This is intended to replace a couple existing executeInstallPlan
      implementations.
      
      The tests check that execute visits packages in reverse topological
      order, for both serial and parallel job control. There's also a check
      that serial execute and executionOrder use exactly the same order.
      31be24fa
    • Duncan Coutts's avatar
      Add InstallPlan.executionOrder · 2d6f94ea
      Duncan Coutts authored
      This is a replacement for the existing linearizeInstallPlan utils.
      It uses the new separate traversal approach.
      2d6f94ea
    • Duncan Coutts's avatar
      Add a test for an existing InstallPlan util · ba5297ec
      Duncan Coutts authored
      The main thing this adds is infrastructure for generating random
      InstallPlans (which is not totally trivial given their structure).
      ba5297ec
  10. Jul 23, 2016
  11. Jul 22, 2016
  12. Jul 21, 2016
    • Edward Z. Yang's avatar
      finalizePackageDescription BC. · 193f49da
      Edward Z. Yang authored
      
      Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
      193f49da
    • Edward Z. Yang's avatar
      Rewrite Travis CI script. · 487565aa
      Edward Z. Yang authored
      
      Lots of changes:
      
          - When possible, we use the container infrastructure (sudo: false)
            rather than Google Compute Engine infrastructure (sudo: required).
            Unfortunately, we can't use GCE for the Linux builds, where
            reduced RAM available hoses are GHC build.
      
          - Switched from using ./Setup and old-style cabal to new-build.
            There are numerous great benefits but the best is that
            .cabal/store can be cached on Travis, leading to huge speedups
            on the build.  Downside is we need to string-and-ceiling-wax
            support for test/haddock/etc.
      
          - I stopped bootstrapping on every build we do; instead there
            is a separate bootstrap build we do to make sure that that
            is working.  This also speeds up the basic builds since
            we are not building Cabal/cabal-install multiple times.
      
          - There are some hacks.  The big one is setting CABAL_BUILDDIR
            explicitly; this smooths over quite a few infelicities in
            the current new-build implementation.
      
      Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
      487565aa
  13. Jul 19, 2016
  14. Jul 16, 2016
  15. Jul 14, 2016
  16. Jul 11, 2016
  17. Jul 04, 2016
  18. Jul 03, 2016
  19. Jul 02, 2016
  20. Jun 27, 2016
Loading