Skip to content

Commit 705ebbf

Browse files
committed
plan.json: Include compiler-abi field
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
1 parent d4d92e9 commit 705ebbf

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

cabal-install/src/Distribution/Client/ProjectPlanOutput.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ encodePlanAsJson distDirLayout elaboratedInstallPlan elaboratedSharedConfig =
109109
, "compiler-id"
110110
J..= (J.String . showCompilerId . pkgConfigCompiler)
111111
elaboratedSharedConfig
112+
, "compiler-abi" J..= jdisplay (compilerAbiTag (pkgConfigCompiler elaboratedSharedConfig))
112113
, "os" J..= jdisplay os
113114
, "arch" J..= jdisplay arch
114115
, "install-plan" J..= installPlanToJ elaboratedInstallPlan

0 commit comments

Comments
 (0)