• Herbert Valerio Riedel's avatar
    Add more fields to plan.json schema · d2f7845d
    Herbert Valerio Riedel authored
    This adds the following new fields:
     - `.compiler-id`
     - `.os`
     - `.arch`
     - `.install-plan[].pkg-name`
     - `.install-plan[].pkg-version`
     - `.install-plan[].pkg-src-sha256`
    Having separate "pkg-{name,version}" fields is desirable because the "id"-field
    is actually a UnitId which is supposed to be an opaque id which may not
    always be easily convertible into a PackageId via string operations.
    The "pkg-src-sha256" is generally useful to uniquely identify a
    source-tarball (when the package-id is not exact enough).
    Finally, the compiler-id/os/arch information is needed to determine the
    values of the respective impl()/os()/arch() predicates used in
    conditionals in .cabal files.
    Here's an example demonstrating the new fields:
          "cabal-version": "",
          "cabal-lib-version": "",
          "compiler-id": "ghc-8.0.1",
          "os": "linux",
          "arch": "x86_64",
          "install-plan": [
    	  "type": "configured",
    	  "id": "StateVar-",
    	  "pkg-name": "StateVar",
    	  "pkg-version": "",
    	  "flags": {},
    	  "style": "global",
    	  "pkg-src-sha256": "7ad68decb5c9a76f83c95ece5fa13d1b053e4fb1079bd2d3538f6b05014dffb7",
    	  "depends": [
    	  "exe-depends": [],
    	  "component-name": "lib"
              "type": "pre-existing",
              "id": "rts",
              "pkg-name": "rts",
              "pkg-version": "1.0",
              "depends": []
    	  "type": "configured",
    	  "id": "hackage-matrix-builder3-0.3-inplace-matrix-lib",
    	  "pkg-name": "hackage-matrix-builder3",
    	  "pkg-version": "0.3",
    	  "component-name": "lib:matrix-lib"
ProjectPlanOutput.hs 36.4 KB