Skip to content

plan.json doesn't include compiler id. #10726

Closed
@phadej

Description

@phadej

Since some version of cabal-install, the locations of ghc-specific store take "project unit id" (e.g. ,("Project Unit Id","ghc-9.10.1-69c3")) into account. So it's not store/ghc-9.10.1 but store/ghc-9.10.1-69c3). However this information is absent from plan.json. plan.json contains just a version as compiler-id:

% python3 -m json.tool dist-newstyle/cache/plan.json|less
{
    "cabal-version": "3.14.1.1",
    "cabal-lib-version": "3.14.1.1",
    "compiler-id": "ghc-9.10.1",
    "os": "linux",
    "arch": "x86_64",
    "install-plan": [
...

Therefore tools (e.g. cabal-plan) which traverse the plan.json but also information in the store (e.g. license files), cannot do this anymore without also somehow finding the corresponding GHC (which can be anywhere, that's the point of an additional few bits - to disambiguate different GHC builds even with the same main version).

Metadata

Metadata

Assignees

No one assigned

    Labels

    re: cabal-planConcerning functionality offered by `cabal-plan`type: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions