Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/haskell/Cabal. Pull mirroring updated .
  1. Feb 27, 2017
    • Duncan Coutts's avatar
      Rewrite resolveTargets for flexibility and error handling · cf6a076f
      Duncan Coutts authored
      Instead of expressing the intention in terms of PackageTargets, it now
      takes helper functions that select the components to use for a package
      target or a component target. These helpers are given the set of
      AvailableTargets and they can do error checking and return failures.
      
      This allows the build,configure,haddock,repl implementations to have
      their own behaviour and error checking and reporting for selecting
      targets.
      
      The full details of error reporting are not covered yet.
      cf6a076f
    • Duncan Coutts's avatar
      Refactor selectTargets and rename to resolveTargets · fb3e69f5
      Duncan Coutts authored
      selectTargets would also prune to to the targets, and optionally prune
      to dependencies only. These aspects are now pulled out into the callers
      in the various Cmd{Build,Repl,etc} modules.
      
      It will make more sense to do it this way once we're doing more explicit
      error checking in the callers.
      fb3e69f5
    • Duncan Coutts's avatar
      Convert build target resolution to use package id, not just name · c848e011
      Duncan Coutts authored
      Previously the resolveUserBuildTargets would return a PackageName which
      meant we would subsequently select all versions of that package that
      occur in the project during target selection (resolveAndCheckTargets).
      Using PackageId means we only pick one version (though in future we may
      still need to disambiguate multiple instances, or targets from multiple
      active profiles)
      c848e011
    • Duncan Coutts's avatar
      New infrastructure for collecting info on available targets · d02bc2f0
      Duncan Coutts authored
      This is one major part of a new implementation of translating from high
      level user intentions of what to build into the detail of what specific
      components to build.
      
      This part collects and summarises information on what component are
      available as targets. Each available target one has enough status info
      to determine if we can possibly select the target or if not why not.
      
      This information will be used by each command (build, repl, test etc) to
      select the specific targets that a user intention refers to (and to
      provide them enough information to be able to produce reasonable error
      messages).
      
      Collecting and summarising this info is unfortunately non-trivial
      because as part of install plan elaboration we omit components that
      cannot be built but these are still components that users could try to
      refer to, so we have to reconstruct the info about the omitted
      components. It's plausible that we may want to revise the elaborated
      install plan representation to make this easier.
      d02bc2f0
    • Duncan Coutts's avatar
      Change pruneInstallPlanToTargets to take ComponentTargets · bd177197
      Duncan Coutts authored
      Previously it took the specification for the targets to build in terms
      of PackageTarget which is a high-ish level specification of which
      components to build. It is high level in the sense that it says things
      like BuildDefaultComponents which still have to be elaborated into the
      specific components.
      
      This elaboration from the higher level intention of what to build into
      what components to build specifically has to vary between different
      commands (build, repl, run, test, bench) and it can also fail. These
      features make it not a good fit to do within plan pruning. Instead it
      is better to have plan pruning take the lower level specification of
      what to build in terms of components and to do the conversion of high
      level to low level separately. That will allow us to do it differently
      for different commands and deal with failures better.
      
      This patch does one step: it changes pruneInstallPlanToTargets from
      taking [PackageTarget] to [ComponentTarget] and as an intermediate step
      in refactoring it converts the existing elaboratePackageTargets code to
      convert from the [PackageTarget] to [ComponentTarget] which is then used
      by the calling code in ProjectOrchestration. The next step will be to
      replace the elaboratePackageTargets with something more flexible and
      that can handle errors better.
      bd177197
    • Duncan Coutts's avatar
      Refactoring: make nubComponentTargets top level · 5fbf262c
      Duncan Coutts authored
      And push compatSubComponentTargets inside nubComponentTargets. The
      motivation for this is we'll be exporting nubComponentTargets and using
      it from the ProjectOrchestration as part of revised target handling.
      5fbf262c
    • Duncan Coutts's avatar
      49c1af5c
    • Duncan Coutts's avatar
      Split one of the pruneInstallPlanToTargets passes for clarity · 0b432931
      Duncan Coutts authored
      The pruneInstallPlanToTargets function had two main passes. Split the
      first pass into two passes. This simplifies things a bit and helps
      clarify the fact that setting the root targets is something we do prior
      to taking the dep closure.
      0b432931
  2. Feb 25, 2017
  3. Feb 24, 2017
  4. Feb 23, 2017
  5. Feb 21, 2017
  6. Feb 20, 2017
  7. Feb 19, 2017
Loading