This project is mirrored from https://github.com/haskell/Cabal. Pull mirroring updated .
  1. 20 Sep, 2016 11 commits
  2. 19 Sep, 2016 21 commits
    • Duncan Coutts's avatar
      4dc5b1f2
    • Duncan Coutts's avatar
      Refactor implementation of InstallPlan.installed · 66ed37a2
      Duncan Coutts authored
      All the use sites (currently only two but soon to be three) use
      InstallPlan.installed to do a bulk change of states, differing only in
      the filter condition. So it simplifies things and shares more code if
      we make the main one be the bulk version. The InstallPlan.remove already
      works similarly.
      66ed37a2
    • Duncan Coutts's avatar
      Simplify plan improvement, avoid reading store ghc-pkg db · 5584569c
      Duncan Coutts authored
      Install plan improvement is the process of replacing configured source
      packages with installed instances from the store. Originally we did this
      by reading the ghc-pkg db to get the InstalledPackageInfo for all the
      packages in the store. We had to do that because when we replaced
      configured source packages by installed instances we used the
      PreExisting constructor which requires an InstalledPackageInfo, which we
      get from the installed package db. But now that we no longer use
      PreExisting for packages from the store we also no longer need the
      InstalledPackageInfo. All we need is a set of UnitIds. Also, once
      support for depending on executables was added then we needed a way to
      do plan improvement for executable packages/components. We did this by
      the simple approach of grabbing the dir listing for the store and using
      that as a set of UnitIds.
      
      So this patch extends the approach we use for executables and uses it
      for all packages. This means we no longer load the package db for the
      store. Note that we still have to create the package db in the store.
      
      This also relates to the locking protocol in the store. The goal for the
      store is to be able to access and update it concurrently. The locking
      protocol will include checking membership by checking if the directory
      entry for the package is present. So this patch gets us to the right
      point for the reading side, leaving the writing side to do.
      5584569c
    • Duncan Coutts's avatar
      Clarify the differences with the GetOpt from base · 7399850e
      Duncan Coutts authored
      And invite anyone to have a go at merging. Also re-export the types from
      the GetOpt from base rather than re-defining locally. In particular this
      means we gain a few instances.
      
      The changes wrt base GetOpt are:
      
      One change to allow us to treat "cabal --flag command" as
      "cabal command --flag" e.g. "cabal -v configure" to mean
      "cabal configure -v" for flags that are not recognised as global flags,
      pass them on to the sub-command. See the difference in 'shortOpt'.
      
      Line wrapping in the 'usageInfo' output, plus a more compact rendering
      of short options, and slightly less padding.
      7399850e
    • Edward Z. Yang's avatar
    • Edward Z. Yang's avatar
      Merge pull request #3828 from ezyang/pr/output-profiling · 56cff2d2
      Edward Z. Yang authored
      Print profiling status when displaying install plan.
      56cff2d2
    • Edward Z. Yang's avatar
      Merge pull request #3859 from ezyang/pr/refactor-enabled-spec · 757e84fd
      Edward Z. Yang authored
      Use enabledBuildInfos rather than allBuildInfo
      757e84fd
    • Edward Z. Yang's avatar
      Print that we are building all due to Custom setup. · 512648fd
      Edward Z. Yang authored
      
      
      Previously the output was:
      
          Building profunctors-5.2 lib...
          Building semigroupoids-5.1...
      
      Now it is:
      
          Building profunctors-5.2 (lib)...
          Building semigroupoids-5.1 (all, due to Custom setup)...
      
      Fixes #3808.
      Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
      512648fd
    • Edward Z. Yang's avatar
    • Edward Z. Yang's avatar
      Merge pull request #3820 from grayjay/done-node-field · 6a4844b8
      Edward Z. Yang authored
      Add a new field to solver Done nodes, and simplify Explore.exploreLog.
      6a4844b8
    • Duncan Coutts's avatar
      Distinguish PreExisting vs Installed in BuildStatus · f3fc6504
      Duncan Coutts authored
      Not a big deal, but should be useful later for more precise status
      reporting. For now just means the rebuild reasons can be more precise.
      f3fc6504
    • Duncan Coutts's avatar
      Remove now-unused InstallPlan.preexisting · f07db3ed
      Duncan Coutts authored
      We only ever switch Configured to Installed. The PreExisting state only
      comes from the original solver plan, which only uses installed packages
      from the global db.
      f07db3ed
    • Duncan Coutts's avatar
      Start using new InstallPlan.Installed state · 8f870aa0
      Duncan Coutts authored
      Change improvement and --dry-run phases to use Installed state rather
      than the PreExisting state. This means that PreExisting is now only used
      for installed packages from the global db, and never for installed
      packages from the store.
      8f870aa0
    • Duncan Coutts's avatar
      Update encodePlanAsJson for Installed package state · 60ce97d2
      Duncan Coutts authored
      The change in how we use the PreExisting vs Installed states means that
      we'll now have full details for all packages, rather than installed
      ones having only the subset of info available from the
      InstalledPackageInfo. So the 'type' field now can take the values
      "pre-existing", "configured" or "installed".
      
      Also do a little bit of tidying up.
      60ce97d2
    • Duncan Coutts's avatar
      Add an Installed state to InstallPlan packages · 492db5b5
      Duncan Coutts authored
      This patch just adds the state without yet using it. That'll follow in
      subsequent patches.
      
      So why add an Installed state? Didn't we just remove the Installed,
      Processing and Failed states? Those states were used when we followed
      the approach of updating the InstallPlan as a build progressed (whereas
      we now do traversals without altering the InstallPlan).
      
      The idea of adding an Installed state now is that we can more usefully
      represent the state of the plan when we "improve" the plan with packages
      from the store or when we update the plan having checked if inplace
      packages are up to date. Currently in these two places we replace
      Configured source packages with PreExisting packages. There's a couple
      problems with this. Firstly the PreExisting state only contains an
      InstalledPackageInfo which means we loose information compared to all
      the detail in the Configured source package. This is relevant for things
      like plan.json output or other features that want to know the status of
      a project. Secondly we have to fake things for executables since they
      are not properly represented by InstalledPackageInfo.
      492db5b5
    • Duncan Coutts's avatar
      Merge pull request #3817 from ezyang/pr/dump-fail-msg · 4de99957
      Duncan Coutts authored
      Give more informative error when ghc-pkg dump fails.
      4de99957
    • Brendan Hay's avatar
      Merge pull request #3844 from brendanhay/implicit-vs-explicit-project-errors · d1d9737c
      Brendan Hay authored
      Track cabal.project provenance for error reporting
      d1d9737c
    • bardur.arantsson's avatar
      Merge pull request #3860 from ezyang/pr/config-flags-prof · e82736cc
      bardur.arantsson authored
      Renumber flags version numbers in 'filterConfigureFlags'.
      e82736cc
    • Herbert Valerio Riedel's avatar
      Store secure repo index data as 01-index.* (#3862) · dc889b17
      Herbert Valerio Riedel authored
      "Secure" cabal repositories use a new extended & incremental
      `01-index.tar`. In order to avoid issues resulting from clobbering
      new/old-style index data, we save them locally to different names.
      
      With this patch, secure repos generate/update the files below on `cabal update`
      
      - `01-index.cache`
      - `01-index.tar`
      - `01-index.tar.gz`
      - `01-index.tar.idx`
      - `mirrors.json`
      - `root.json`
      - `snapshot.json`
      - `timestamp.json`
      
      ...while the legacy codepaths for non-secure repos operate on the files
      
      - `00-index.cache`
      - `00-index.tar`
      - `00-index.tar.gz`
      - `00-index.tar.gz.etag`
      
      This way the old/new codepaths don't interfere with each other anymore.
      
      Note: The format of `01-index.cache` file will be extended by the upcoming `--index-state` feature
      
      This trivially fixes #3854
      dc889b17
    • Herbert Valerio Riedel's avatar
      Merge pull request #3866 from Ericson2314/patch-1 · 48d9077b
      Herbert Valerio Riedel authored
      doc: "Local versus external packages" intro paragraph bad contrast
      
      [skip ci]
      48d9077b
    • John Ericson's avatar
      doc: "Local versus external packages" intro paragraph bad contrast · 65f82db4
      John Ericson authored
      I believe it's "per-project" vs "cached across *projects*" not "...across *packages*"
      65f82db4
  3. 18 Sep, 2016 8 commits