Changes between Version 11 and Version 12 of Commentary/GSoCMultipleInstances


Ignore:
Timestamp:
May 23, 2012 12:55:51 AM (23 months ago)
Author:
phischu
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Commentary/GSoCMultipleInstances

    v11 v12  
    44It is a problem that cabal does not support multiple instances of the same package version installed at the same time. Instead of installing them next to each other it overwrites the previous instance. This causes packages that depended upon the overwritten instance to break. The solution is to never overwrite an installed package. In the case of inplace registrations the overwriting has already taken place which is a problem. 
    55 
    6 Relating this to how Nix works. Cabal stores potentially every instance of every package possible. Lets call this the cabal store. There might at least be a global and a local one but they dont overlap and if they do shadowing doesnt matter. The dependency resolver selects based on the dependencies specified in the cabal file a subset of those possible package instances. This corresponds to a profile in Nix as well as a sandbox. We call this an environment. 
     6Relating this to how Nix works. Cabal stores potentially every instance of every package possible. Lets call this the cabal store. There might at least be a global and a local one but they dont overlap and if they do shadowing doesnt matter. The dependency resolver comes up with an install plan. In this install plan all packages have completely fixed dependencies based on the dependencies specified in the cabal file. They are a subset of those possible package instances. This corresponds to a profile in Nix as well as a sandbox. We call this an environment. 
    77 
    88== Dependency resolution == 
     
    2525 
    2626The source code. This is necessary because if the source code changes the result of compilation changes. For released packages i would assume that the version number uniquely identifies the source code and only hash that but what about unreleased packages? From the PackageDescription's library field the exposedModules can be extracted. Also from PackageDescription extraSrcFiles can be extracted. What about the Other Modules? We should also make sure that GHC used/uses only the files we ware hashing for compilation. 
     27 
     28Or we first ask a source tarball to be built as if the package was released and then this one is hashed. 
    2729 
    2830OS dependencies are not taken into account. 
     
    5153 
    5254Custom Builds and BuildHooks? 
     55 
     56Other Compilers, backwards compatibility?