Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/haskell/Cabal. Pull mirroring updated .
  1. Apr 06, 2015
  2. Mar 31, 2015
    • Edsko de Vries's avatar
      Keep fine-grained deps after solver · 87a79be9
      Edsko de Vries authored
      The crucial change in this commit is the change to PackageFixedDeps to return a
      ComponentDeps structure, rather than a flat list of dependencies, as long with
      corresponding changes in ConfiguredPackage and ReadyPackage to accomodate this.
      
      We don't actually take _advantage_ of these more fine-grained dependencies yet;
      any use of
      
          depends
      
      is now a use of
      
         CD.flatDeps . depends
      
      but we will :)
      
      Note that I have not updated the top-down solver, so in the output of the
      top-down solver we cheat and pretend that all dependencies are library
      dependencies.
      87a79be9
    • Edsko de Vries's avatar
      Fine-grained dependencies in solver output · 6b77ea23
      Edsko de Vries authored
      In this commit we modify the _output_ of the modular solver (CP, the modular's
      solver internal version of ConfiguredPackage) to have fine-grained dependency.
      This doesn't yet modify the rest of cabal-install, so once we translate from CP
      to ConfiguredPackage we still lose the distinctions between different kinds of
      dependencies; this will be the topic of the next commit.
      
      In the modular solver (and elsewhere) we use Data.Graph to represent the
      dependency graph (and the reverse dependency graph). However, now that we have
      more fine-grained dependencies, we really want an _edge-labeled_ graph, which
      unfortunately it not available in the `containers` package. Therefore I've
      written a very simple wrapper around Data.Graph that supports edge labels; we
      don't need many fancy graph algorithms, and can still use Data.Graph on these
      edged graphs when we want (by calling them on the underlying unlabeled graph),
      so adding a dependency on `fgl` does not seem worth it.
      6b77ea23
    • Edsko de Vries's avatar
      Fine-grained dependencies in solver input · a5a823d4
      Edsko de Vries authored
      The modular solver has its own representation for a package (PInfo). In this
      commit we modify PInfo to keep track of the different kinds of dependencies.
      
      This is a bit intricate because the solver also regards top-level goals as
      dependencies, but of course those dependencies are not part of any 'component'
      as such, unlike "real" dependencies. We model this by adding a type parameter
      to FlaggedDeps and go which indicates whether or not we have component
      information; crucially, underneath flag choices we _always_ have component
      information available.
      
      Consequently, the modular solver itself will not make use of the ComponentDeps
      datatype (but only using the Component type, classifying components); we will
      use ComponentDeps when we translate out of the results from the modular solver
      into cabal-install's main datatypes.
      
      We don't yet _return_ fine-grained dependencies from the solver; this will be
      the subject of the next commit.
      a5a823d4
    • Edsko de Vries's avatar
      Introduce ComponentDeps · 60196673
      Edsko de Vries authored
      The ComponentDeps datatype will give us fine-grained information about the
      dependencies of a package's components.  This commit just introduces the
      datatype, we don't use it anywhere yet.
      60196673
  3. Mar 30, 2015
    • Edsko de Vries's avatar
      Code layout · c2c73da9
      Edsko de Vries authored
      This commit does nothing but rearrange the Modular.Dependency module into a
      number of separate sections, so that's a bit clearer to see what's what. No
      actual code changes here whatsoever.
      c2c73da9
  4. Mar 28, 2015
    • Edsko de Vries's avatar
      Use the standard graph construction code · ac47cbc4
      Edsko de Vries authored
      I don't know why we we constructed this graph manually here rather than calling
      `graphFromEdges`; it doesn't really matter except that we will want to change
      the structure of this graph somewhat once we have more fine-grained
      dependencies, and then the manual construction becomes a bit more painful;
      easier to use the standard construction.
      ac47cbc4
  5. Mar 27, 2015
  6. Mar 26, 2015
Loading