Skip to content

plan.json: Include compiler-abi field #10845

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

plan.json: Include compiler-abi field #10845

wants to merge 1 commit into from

Conversation

mpickering
Copy link
Collaborator

@mpickering mpickering commented Mar 21, 2025

The plan.json file was missing crucial information needed to locate
packages in the store directory structure. When cabal-install stores
packages, it uses a full compiler identifier including an ABI tag (e.g.,
"ghc-9.10.1-69c3") but plan.json only included the basic compiler ID
("ghc-9.10.1"). This made it impossible for external tools like
cabal-plan to correctly locate packages and their files in the store.

This commit adds a new "compiler-abi" field with the ABI tag string

The issue reported in the original ticket seems to be about the location
of LICENSE files, but the plan.json may still lack sufficient
information to locate all license files since the packages may not be
located in the store, but in different package databases given by
the --package-db flag.  This will do for now.

Fixes #10726

Please read Github PR Conventions and then fill in one of these two templates.


Template B: This PR does not modify behaviour or interface

E.g. the PR only touches documentation or tests, does refactorings, etc.

Include the following checklist in your PR:

  • Patches conform to the coding conventions.
  • Is this a PR that fixes CI? If so, it will need to be backported to older cabal release branches (ask maintainers for directions).

The plan.json file was missing crucial information needed to locate
packages in the store directory structure. When cabal-install stores
packages, it uses a full compiler identifier including an ABI tag (e.g.,
"ghc-9.10.1-69c3") but plan.json only included the basic compiler ID
("ghc-9.10.1"). This made it impossible for external tools like
cabal-plan to correctly locate packages and their files in the store.

This commit adds a new "compiler-abi" field with the ABI tag string

The issue reported in the original ticket seems to be about the location
of LICENSE files, but the plan.json may still lack sufficient
information to locate all license files since the packages may not be
located in the store, but in different package databases given by
the --package-db flag.  This will do for now.

Fixes #10726
@mpickering mpickering changed the title plan.json: Include store-dir and compiler-abi fields plan.json: Include compiler-abi fields Mar 24, 2025
@mpickering mpickering changed the title plan.json: Include compiler-abi fields plan.json: Include compiler-abi field Mar 24, 2025
@mpickering
Copy link
Collaborator Author

Any reviewers?

@Mikolaj
Copy link
Member

Mikolaj commented Apr 10, 2025

Is it possible to add a test for this?

Copy link
Collaborator

@geekosaur geekosaur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: does this affect bootstrapping in any way?

@mpickering
Copy link
Collaborator Author

Question: does this affect bootstrapping in any way?

No, doesn't affect bootstrapping at all (to my knowledge and CI passes).

Is it possible to add a test for this?

There weren't any existing tests for plan.json to my knowledge, what kind of test would you like added? It seemed like quite an ad-hoc format to me.

@geekosaur
Copy link
Collaborator

The only one I can think of that makes any sense is to see if cabal-plan can still deal with the result… but arguably that's their problem, not ours.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants