From 2558573a789b2f961adf70f04491c8610eca881f Mon Sep 17 00:00:00 2001 From: Sean D Gillespie Date: Mon, 27 Oct 2025 16:00:03 -0400 Subject: [PATCH 1/5] Add GHC Unit ID store to `cabal path` output The GHC "Project Unit ID" store path has been used in cabal-install since 3.12.1.0. Resolves: #10165 --- .../src/Distribution/Client/CmdPath.hs | 21 ++++++++++++++----- .../PackageTests/Path/All/cabal.out | 16 ++++++++++---- .../PackageTests/Path/Compiler/cabal.out | 4 +++- 3 files changed, 31 insertions(+), 10 deletions(-) diff --git a/cabal-install/src/Distribution/Client/CmdPath.hs b/cabal-install/src/Distribution/Client/CmdPath.hs index 27ae11e04c6..d6f375e0b21 100644 --- a/cabal-install/src/Distribution/Client/CmdPath.hs +++ b/cabal-install/src/Distribution/Client/CmdPath.hs @@ -25,7 +25,7 @@ import Distribution.Client.Config , defaultStoreDir , getConfigFilePath ) -import Distribution.Client.DistDirLayout (CabalDirLayout (..), distProjectRootDirectory) +import Distribution.Client.DistDirLayout (CabalDirLayout (..), StoreDirLayout (..), distProjectRootDirectory) import Distribution.Client.Errors import Distribution.Client.GlobalFlags import Distribution.Client.NixStyleOptions @@ -244,10 +244,17 @@ pathAction flags@NixStyleFlags{extraFlags = pathFlags'} cliTargetStrings globalF if not $ fromFlagOrDefault False (pathCompiler pathFlags) then pure Nothing else do - (compiler, _, progDb) <- runRebuild (distProjectRootDirectory . distDirLayout $ baseCtx) $ configureCompiler verbosity (distDirLayout baseCtx) (projectConfig baseCtx) + (compiler, _, progDb) <- + runRebuild (distProjectRootDirectory . distDirLayout $ baseCtx) $ + configureCompiler verbosity (distDirLayout baseCtx) (projectConfig baseCtx) compilerProg <- requireCompilerProg verbosity compiler (configuredCompilerProg, _) <- requireProgram verbosity compilerProg progDb - pure $ Just $ mkCompilerInfo configuredCompilerProg compiler + + let compilerInfo' = + mkCompilerInfo configuredCompilerProg compiler $ + cabalStoreDirLayout (cabalDirLayout baseCtx) + + pure $ Just compilerInfo' paths <- for (fromFlagOrDefault [] $ pathDirectories pathFlags) $ \p -> do t <- getPathLocation verbosity baseCtx p @@ -318,15 +325,17 @@ data PathCompilerInfo = PathCompilerInfo { pathCompilerInfoFlavour :: CompilerFlavor , pathCompilerInfoId :: CompilerId , pathCompilerInfoPath :: FilePath + , pathCompilerInfoProjectUnitId :: FilePath } deriving (Show, Eq, Ord) -mkCompilerInfo :: ConfiguredProgram -> Compiler -> PathCompilerInfo -mkCompilerInfo compilerProgram compiler = +mkCompilerInfo :: ConfiguredProgram -> Compiler -> StoreDirLayout -> PathCompilerInfo +mkCompilerInfo compilerProgram compiler storeLayout = PathCompilerInfo { pathCompilerInfoFlavour = compilerFlavor compiler , pathCompilerInfoId = compilerId compiler , pathCompilerInfoPath = programPath compilerProgram + , pathCompilerInfoProjectUnitId = storeDirectory storeLayout compiler } -- ---------------------------------------------------------------------------- @@ -372,6 +381,7 @@ compilerInfoToJson pci = [ "flavour" .= jdisplay (pathCompilerInfoFlavour pci) , "id" .= jdisplay (pathCompilerInfoId pci) , "path" .= Json.String (pathCompilerInfoPath pci) + , "project-unit-id" .= Json.String (pathCompilerInfoProjectUnitId pci) ] ] @@ -401,4 +411,5 @@ compilerInfoToKeyValue pci = [ ("compiler-flavour", prettyShow $ pathCompilerInfoFlavour pci) , ("compiler-id", prettyShow $ pathCompilerInfoId pci) , ("compiler-path", pathCompilerInfoPath pci) + , ("compiler-project-unit-id", pathCompilerInfoProjectUnitId pci) ] diff --git a/cabal-testsuite/PackageTests/Path/All/cabal.out b/cabal-testsuite/PackageTests/Path/All/cabal.out index 0f710cc0fb1..249781f8302 100644 --- a/cabal-testsuite/PackageTests/Path/All/cabal.out +++ b/cabal-testsuite/PackageTests/Path/All/cabal.out @@ -1,11 +1,11 @@ # cabal path -{"cabal-version":"","compiler":{"flavour":"ghc","id":"ghc-","path":""},"logs-dir":"/cabal.dist/home/.cabal/logs","installdir":"/cabal.dist/home/.cabal/bin"} +{"cabal-version":"","compiler":{"flavour":"ghc","id":"ghc-","path":"","project-unit-id":"/cabal.dist/home/.cabal/store/ghc-"},"logs-dir":"/cabal.dist/home/.cabal/logs","installdir":"/cabal.dist/home/.cabal/bin"} # cabal path -{"cabal-version":"","compiler":{"flavour":"ghc","id":"ghc-","path":""},"store-dir":"/cabal.dist/home/.cabal/store","config-file":"/cabal.dist/home/.cabal/config"} +{"cabal-version":"","compiler":{"flavour":"ghc","id":"ghc-","path":"","project-unit-id":"/cabal.dist/home/.cabal/store/ghc-"},"store-dir":"/cabal.dist/home/.cabal/store","config-file":"/cabal.dist/home/.cabal/config"} # cabal path -{"cabal-version":"","compiler":{"flavour":"ghc","id":"ghc-","path":""},"remote-repo-cache":"/cabal.dist/home/.cabal/packages"} +{"cabal-version":"","compiler":{"flavour":"ghc","id":"ghc-","path":"","project-unit-id":"/cabal.dist/home/.cabal/store/ghc-"},"remote-repo-cache":"/cabal.dist/home/.cabal/packages"} # cabal path -{"cabal-version":"","compiler":{"flavour":"ghc","id":"ghc-","path":""},"cache-home":"/cabal.dist/home/.cabal","remote-repo-cache":"/cabal.dist/home/.cabal/packages","logs-dir":"/cabal.dist/home/.cabal/logs","store-dir":"/cabal.dist/home/.cabal/store","config-file":"/cabal.dist/home/.cabal/config","installdir":"/cabal.dist/home/.cabal/bin"} +{"cabal-version":"","compiler":{"flavour":"ghc","id":"ghc-","path":"","project-unit-id":"/cabal.dist/home/.cabal/store/ghc-"},"cache-home":"/cabal.dist/home/.cabal","remote-repo-cache":"/cabal.dist/home/.cabal/packages","logs-dir":"/cabal.dist/home/.cabal/logs","store-dir":"/cabal.dist/home/.cabal/store","config-file":"/cabal.dist/home/.cabal/config","installdir":"/cabal.dist/home/.cabal/bin"} # cabal path {"cabal-version":"","cache-home":"/cabal.dist/home/.cabal"} # cabal path @@ -22,23 +22,27 @@ compiler-flavour: ghc compiler-id: ghc- compiler-path: +compiler-project-unit-id: /cabal.dist/home/.cabal/store/ghc- logs-dir: /cabal.dist/home/.cabal/logs installdir: /cabal.dist/home/.cabal/bin # cabal path compiler-flavour: ghc compiler-id: ghc- compiler-path: +compiler-project-unit-id: /cabal.dist/home/.cabal/store/ghc- store-dir: /cabal.dist/home/.cabal/store config-file: /cabal.dist/home/.cabal/config # cabal path compiler-flavour: ghc compiler-id: ghc- compiler-path: +compiler-project-unit-id: /cabal.dist/home/.cabal/store/ghc- remote-repo-cache: /cabal.dist/home/.cabal/packages # cabal path compiler-flavour: ghc compiler-id: ghc- compiler-path: +compiler-project-unit-id: /cabal.dist/home/.cabal/store/ghc- cache-home: /cabal.dist/home/.cabal remote-repo-cache: /cabal.dist/home/.cabal/packages logs-dir: /cabal.dist/home/.cabal/logs @@ -61,23 +65,27 @@ installdir: /cabal.dist/home/.cabal/bin compiler-flavour: ghc compiler-id: ghc- compiler-path: +compiler-project-unit-id: /cabal.dist/home/.cabal/store/ghc- logs-dir: /cabal.dist/home/.cabal/logs installdir: /cabal.dist/home/.cabal/bin # cabal path compiler-flavour: ghc compiler-id: ghc- compiler-path: +compiler-project-unit-id: /cabal.dist/home/.cabal/store/ghc- store-dir: /cabal.dist/home/.cabal/store config-file: /cabal.dist/home/.cabal/config # cabal path compiler-flavour: ghc compiler-id: ghc- compiler-path: +compiler-project-unit-id: /cabal.dist/home/.cabal/store/ghc- remote-repo-cache: /cabal.dist/home/.cabal/packages # cabal path compiler-flavour: ghc compiler-id: ghc- compiler-path: +compiler-project-unit-id: /cabal.dist/home/.cabal/store/ghc- cache-home: /cabal.dist/home/.cabal remote-repo-cache: /cabal.dist/home/.cabal/packages logs-dir: /cabal.dist/home/.cabal/logs diff --git a/cabal-testsuite/PackageTests/Path/Compiler/cabal.out b/cabal-testsuite/PackageTests/Path/Compiler/cabal.out index a640aa60948..45cb4b5e7e2 100644 --- a/cabal-testsuite/PackageTests/Path/Compiler/cabal.out +++ b/cabal-testsuite/PackageTests/Path/Compiler/cabal.out @@ -2,9 +2,11 @@ compiler-flavour: ghc compiler-id: ghc- compiler-path: +compiler-project-unit-id: /cabal.dist/home/.cabal/store/ghc- # cabal path -{"cabal-version":"","compiler":{"flavour":"ghc","id":"ghc-","path":""}} +{"cabal-version":"","compiler":{"flavour":"ghc","id":"ghc-","path":"","project-unit-id":"/cabal.dist/home/.cabal/store/ghc-"}} # cabal path compiler-flavour: ghc compiler-id: ghc- compiler-path: +compiler-project-unit-id: /cabal.dist/home/.cabal/store/ghc- From fd9d0b3a2e5c935a23a2590c392cb5cefb4409a6 Mon Sep 17 00:00:00 2001 From: Sean D Gillespie Date: Wed, 29 Oct 2025 14:34:19 -0400 Subject: [PATCH 2/5] Add a changelog entry for PR #11266 This change modifies the output of `cabal path`, and therefore requires a changelog entry. --- changelog.d/pr-11266 | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 changelog.d/pr-11266 diff --git a/changelog.d/pr-11266 b/changelog.d/pr-11266 new file mode 100644 index 00000000000..fa503957869 --- /dev/null +++ b/changelog.d/pr-11266 @@ -0,0 +1,11 @@ +synopsis: "Add GHC Project Unit ID store to `cabal path` output" +packages: cabal-install +prs: #11266 +issues: #10165 +description: { + +This addds the GHC Project Unit ID store path to the cabal path output as +"project-unit-id". The GHC Project Unit ID store path has been used in cabal-install +since 3.12.1.0. + +} From e8a1785553275b9f1ff5cbca44039191cb016adb Mon Sep 17 00:00:00 2001 From: Sean D Gillespie Date: Wed, 29 Oct 2025 21:58:39 -0400 Subject: [PATCH 3/5] Rename compiler-project-unit-id in `cabal path` Update `compiler-project-unit-id` to `compiler-store-path` in the `cabal path` output, as it is much more clear. --- .../src/Distribution/Client/CmdPath.hs | 8 +++---- .../PackageTests/Path/All/cabal.out | 24 +++++++++---------- .../PackageTests/Path/Compiler/cabal.out | 6 ++--- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/cabal-install/src/Distribution/Client/CmdPath.hs b/cabal-install/src/Distribution/Client/CmdPath.hs index d6f375e0b21..066886b376d 100644 --- a/cabal-install/src/Distribution/Client/CmdPath.hs +++ b/cabal-install/src/Distribution/Client/CmdPath.hs @@ -325,7 +325,7 @@ data PathCompilerInfo = PathCompilerInfo { pathCompilerInfoFlavour :: CompilerFlavor , pathCompilerInfoId :: CompilerId , pathCompilerInfoPath :: FilePath - , pathCompilerInfoProjectUnitId :: FilePath + , pathCompilerInfoStorePath :: FilePath } deriving (Show, Eq, Ord) @@ -335,7 +335,7 @@ mkCompilerInfo compilerProgram compiler storeLayout = { pathCompilerInfoFlavour = compilerFlavor compiler , pathCompilerInfoId = compilerId compiler , pathCompilerInfoPath = programPath compilerProgram - , pathCompilerInfoProjectUnitId = storeDirectory storeLayout compiler + , pathCompilerInfoStorePath = storeDirectory storeLayout compiler } -- ---------------------------------------------------------------------------- @@ -381,7 +381,7 @@ compilerInfoToJson pci = [ "flavour" .= jdisplay (pathCompilerInfoFlavour pci) , "id" .= jdisplay (pathCompilerInfoId pci) , "path" .= Json.String (pathCompilerInfoPath pci) - , "project-unit-id" .= Json.String (pathCompilerInfoProjectUnitId pci) + , "store-path" .= Json.String (pathCompilerInfoStorePath pci) ] ] @@ -411,5 +411,5 @@ compilerInfoToKeyValue pci = [ ("compiler-flavour", prettyShow $ pathCompilerInfoFlavour pci) , ("compiler-id", prettyShow $ pathCompilerInfoId pci) , ("compiler-path", pathCompilerInfoPath pci) - , ("compiler-project-unit-id", pathCompilerInfoProjectUnitId pci) + , ("compiler-store-path", pathCompilerInfoStorePath pci) ] diff --git a/cabal-testsuite/PackageTests/Path/All/cabal.out b/cabal-testsuite/PackageTests/Path/All/cabal.out index 249781f8302..cd77b0ca6db 100644 --- a/cabal-testsuite/PackageTests/Path/All/cabal.out +++ b/cabal-testsuite/PackageTests/Path/All/cabal.out @@ -1,11 +1,11 @@ # cabal path -{"cabal-version":"","compiler":{"flavour":"ghc","id":"ghc-","path":"","project-unit-id":"/cabal.dist/home/.cabal/store/ghc-"},"logs-dir":"/cabal.dist/home/.cabal/logs","installdir":"/cabal.dist/home/.cabal/bin"} +{"cabal-version":"","compiler":{"flavour":"ghc","id":"ghc-","path":"","store-path":"/cabal.dist/home/.cabal/store/ghc-"},"logs-dir":"/cabal.dist/home/.cabal/logs","installdir":"/cabal.dist/home/.cabal/bin"} # cabal path -{"cabal-version":"","compiler":{"flavour":"ghc","id":"ghc-","path":"","project-unit-id":"/cabal.dist/home/.cabal/store/ghc-"},"store-dir":"/cabal.dist/home/.cabal/store","config-file":"/cabal.dist/home/.cabal/config"} +{"cabal-version":"","compiler":{"flavour":"ghc","id":"ghc-","path":"","store-path":"/cabal.dist/home/.cabal/store/ghc-"},"store-dir":"/cabal.dist/home/.cabal/store","config-file":"/cabal.dist/home/.cabal/config"} # cabal path -{"cabal-version":"","compiler":{"flavour":"ghc","id":"ghc-","path":"","project-unit-id":"/cabal.dist/home/.cabal/store/ghc-"},"remote-repo-cache":"/cabal.dist/home/.cabal/packages"} +{"cabal-version":"","compiler":{"flavour":"ghc","id":"ghc-","path":"","store-path":"/cabal.dist/home/.cabal/store/ghc-"},"remote-repo-cache":"/cabal.dist/home/.cabal/packages"} # cabal path -{"cabal-version":"","compiler":{"flavour":"ghc","id":"ghc-","path":"","project-unit-id":"/cabal.dist/home/.cabal/store/ghc-"},"cache-home":"/cabal.dist/home/.cabal","remote-repo-cache":"/cabal.dist/home/.cabal/packages","logs-dir":"/cabal.dist/home/.cabal/logs","store-dir":"/cabal.dist/home/.cabal/store","config-file":"/cabal.dist/home/.cabal/config","installdir":"/cabal.dist/home/.cabal/bin"} +{"cabal-version":"","compiler":{"flavour":"ghc","id":"ghc-","path":"","store-path":"/cabal.dist/home/.cabal/store/ghc-"},"cache-home":"/cabal.dist/home/.cabal","remote-repo-cache":"/cabal.dist/home/.cabal/packages","logs-dir":"/cabal.dist/home/.cabal/logs","store-dir":"/cabal.dist/home/.cabal/store","config-file":"/cabal.dist/home/.cabal/config","installdir":"/cabal.dist/home/.cabal/bin"} # cabal path {"cabal-version":"","cache-home":"/cabal.dist/home/.cabal"} # cabal path @@ -22,27 +22,27 @@ compiler-flavour: ghc compiler-id: ghc- compiler-path: -compiler-project-unit-id: /cabal.dist/home/.cabal/store/ghc- +compiler-store-path: /cabal.dist/home/.cabal/store/ghc- logs-dir: /cabal.dist/home/.cabal/logs installdir: /cabal.dist/home/.cabal/bin # cabal path compiler-flavour: ghc compiler-id: ghc- compiler-path: -compiler-project-unit-id: /cabal.dist/home/.cabal/store/ghc- +compiler-store-path: /cabal.dist/home/.cabal/store/ghc- store-dir: /cabal.dist/home/.cabal/store config-file: /cabal.dist/home/.cabal/config # cabal path compiler-flavour: ghc compiler-id: ghc- compiler-path: -compiler-project-unit-id: /cabal.dist/home/.cabal/store/ghc- +compiler-store-path: /cabal.dist/home/.cabal/store/ghc- remote-repo-cache: /cabal.dist/home/.cabal/packages # cabal path compiler-flavour: ghc compiler-id: ghc- compiler-path: -compiler-project-unit-id: /cabal.dist/home/.cabal/store/ghc- +compiler-store-path: /cabal.dist/home/.cabal/store/ghc- cache-home: /cabal.dist/home/.cabal remote-repo-cache: /cabal.dist/home/.cabal/packages logs-dir: /cabal.dist/home/.cabal/logs @@ -65,27 +65,27 @@ installdir: /cabal.dist/home/.cabal/bin compiler-flavour: ghc compiler-id: ghc- compiler-path: -compiler-project-unit-id: /cabal.dist/home/.cabal/store/ghc- +compiler-store-path: /cabal.dist/home/.cabal/store/ghc- logs-dir: /cabal.dist/home/.cabal/logs installdir: /cabal.dist/home/.cabal/bin # cabal path compiler-flavour: ghc compiler-id: ghc- compiler-path: -compiler-project-unit-id: /cabal.dist/home/.cabal/store/ghc- +compiler-store-path: /cabal.dist/home/.cabal/store/ghc- store-dir: /cabal.dist/home/.cabal/store config-file: /cabal.dist/home/.cabal/config # cabal path compiler-flavour: ghc compiler-id: ghc- compiler-path: -compiler-project-unit-id: /cabal.dist/home/.cabal/store/ghc- +compiler-store-path: /cabal.dist/home/.cabal/store/ghc- remote-repo-cache: /cabal.dist/home/.cabal/packages # cabal path compiler-flavour: ghc compiler-id: ghc- compiler-path: -compiler-project-unit-id: /cabal.dist/home/.cabal/store/ghc- +compiler-store-path: /cabal.dist/home/.cabal/store/ghc- cache-home: /cabal.dist/home/.cabal remote-repo-cache: /cabal.dist/home/.cabal/packages logs-dir: /cabal.dist/home/.cabal/logs diff --git a/cabal-testsuite/PackageTests/Path/Compiler/cabal.out b/cabal-testsuite/PackageTests/Path/Compiler/cabal.out index 45cb4b5e7e2..c9e828d685b 100644 --- a/cabal-testsuite/PackageTests/Path/Compiler/cabal.out +++ b/cabal-testsuite/PackageTests/Path/Compiler/cabal.out @@ -2,11 +2,11 @@ compiler-flavour: ghc compiler-id: ghc- compiler-path: -compiler-project-unit-id: /cabal.dist/home/.cabal/store/ghc- +compiler-store-path: /cabal.dist/home/.cabal/store/ghc- # cabal path -{"cabal-version":"","compiler":{"flavour":"ghc","id":"ghc-","path":"","project-unit-id":"/cabal.dist/home/.cabal/store/ghc-"}} +{"cabal-version":"","compiler":{"flavour":"ghc","id":"ghc-","path":"","store-path":"/cabal.dist/home/.cabal/store/ghc-"}} # cabal path compiler-flavour: ghc compiler-id: ghc- compiler-path: -compiler-project-unit-id: /cabal.dist/home/.cabal/store/ghc- +compiler-store-path: /cabal.dist/home/.cabal/store/ghc- From ac06d79172b96e25393b0fdc950c9670a66968ea Mon Sep 17 00:00:00 2001 From: Sean D Gillespie Date: Tue, 11 Nov 2025 16:02:38 -0500 Subject: [PATCH 4/5] Add another Path test This adds a new test that verifies the output of `compiler-store-path` when the store-dir is explicitly configured. --- cabal-testsuite/PackageTests/Path/Compiler/cabal.out | 5 +++++ cabal-testsuite/PackageTests/Path/Compiler/cabal.test.hs | 1 + 2 files changed, 6 insertions(+) diff --git a/cabal-testsuite/PackageTests/Path/Compiler/cabal.out b/cabal-testsuite/PackageTests/Path/Compiler/cabal.out index c9e828d685b..5070211e681 100644 --- a/cabal-testsuite/PackageTests/Path/Compiler/cabal.out +++ b/cabal-testsuite/PackageTests/Path/Compiler/cabal.out @@ -10,3 +10,8 @@ compiler-flavour: ghc compiler-id: ghc- compiler-path: compiler-store-path: /cabal.dist/home/.cabal/store/ghc- +# cabal path +compiler-flavour: ghc +compiler-id: ghc- +compiler-path: +compiler-store-path: fake-dir/ghc- diff --git a/cabal-testsuite/PackageTests/Path/Compiler/cabal.test.hs b/cabal-testsuite/PackageTests/Path/Compiler/cabal.test.hs index b70251cf574..f6ba2720755 100644 --- a/cabal-testsuite/PackageTests/Path/Compiler/cabal.test.hs +++ b/cabal-testsuite/PackageTests/Path/Compiler/cabal.test.hs @@ -5,3 +5,4 @@ main = cabalTest $ do void $ cabal "path" ["-z", "--output-format=key-value", "--compiler-info"] void $ cabal "path" ["-z", "--output-format=json", "--compiler-info"] void $ cabal "path" ["-z", "--compiler-info"] + void $ cabalG ["--store-dir=fake-dir"] "path" ["-z", "--compiler-info"] From f8322e68b910052411d14801655935d77ae6db53 Mon Sep 17 00:00:00 2001 From: Sean D Gillespie Date: Tue, 11 Nov 2025 22:05:11 -0500 Subject: [PATCH 5/5] Add compiler-abi-tag to path command --- cabal-install/src/Distribution/Client/CmdPath.hs | 4 ++++ cabal-testsuite/PackageTests/Path/All/cabal.out | 16 ++++++++++++---- .../PackageTests/Path/Compiler/cabal.out | 5 ++++- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/cabal-install/src/Distribution/Client/CmdPath.hs b/cabal-install/src/Distribution/Client/CmdPath.hs index 066886b376d..9beacf73287 100644 --- a/cabal-install/src/Distribution/Client/CmdPath.hs +++ b/cabal-install/src/Distribution/Client/CmdPath.hs @@ -324,6 +324,7 @@ data PathOutputs = PathOutputs data PathCompilerInfo = PathCompilerInfo { pathCompilerInfoFlavour :: CompilerFlavor , pathCompilerInfoId :: CompilerId + , pathCompilerInfoAbiTag :: String , pathCompilerInfoPath :: FilePath , pathCompilerInfoStorePath :: FilePath } @@ -334,6 +335,7 @@ mkCompilerInfo compilerProgram compiler storeLayout = PathCompilerInfo { pathCompilerInfoFlavour = compilerFlavor compiler , pathCompilerInfoId = compilerId compiler + , pathCompilerInfoAbiTag = showCompilerIdWithAbi compiler , pathCompilerInfoPath = programPath compilerProgram , pathCompilerInfoStorePath = storeDirectory storeLayout compiler } @@ -380,6 +382,7 @@ compilerInfoToJson pci = .= Json.object [ "flavour" .= jdisplay (pathCompilerInfoFlavour pci) , "id" .= jdisplay (pathCompilerInfoId pci) + , "abi-tag" .= Json.String (pathCompilerInfoAbiTag pci) , "path" .= Json.String (pathCompilerInfoPath pci) , "store-path" .= Json.String (pathCompilerInfoStorePath pci) ] @@ -410,6 +413,7 @@ compilerInfoToKeyValue :: PathCompilerInfo -> [(String, String)] compilerInfoToKeyValue pci = [ ("compiler-flavour", prettyShow $ pathCompilerInfoFlavour pci) , ("compiler-id", prettyShow $ pathCompilerInfoId pci) + , ("compiler-abi-tag", pathCompilerInfoAbiTag pci) , ("compiler-path", pathCompilerInfoPath pci) , ("compiler-store-path", pathCompilerInfoStorePath pci) ] diff --git a/cabal-testsuite/PackageTests/Path/All/cabal.out b/cabal-testsuite/PackageTests/Path/All/cabal.out index cd77b0ca6db..9f184076494 100644 --- a/cabal-testsuite/PackageTests/Path/All/cabal.out +++ b/cabal-testsuite/PackageTests/Path/All/cabal.out @@ -1,11 +1,11 @@ # cabal path -{"cabal-version":"","compiler":{"flavour":"ghc","id":"ghc-","path":"","store-path":"/cabal.dist/home/.cabal/store/ghc-"},"logs-dir":"/cabal.dist/home/.cabal/logs","installdir":"/cabal.dist/home/.cabal/bin"} +{"cabal-version":"","compiler":{"flavour":"ghc","id":"ghc-","abi-tag":"ghc-","path":"","store-path":"/cabal.dist/home/.cabal/store/ghc-"},"logs-dir":"/cabal.dist/home/.cabal/logs","installdir":"/cabal.dist/home/.cabal/bin"} # cabal path -{"cabal-version":"","compiler":{"flavour":"ghc","id":"ghc-","path":"","store-path":"/cabal.dist/home/.cabal/store/ghc-"},"store-dir":"/cabal.dist/home/.cabal/store","config-file":"/cabal.dist/home/.cabal/config"} +{"cabal-version":"","compiler":{"flavour":"ghc","id":"ghc-","abi-tag":"ghc-","path":"","store-path":"/cabal.dist/home/.cabal/store/ghc-"},"store-dir":"/cabal.dist/home/.cabal/store","config-file":"/cabal.dist/home/.cabal/config"} # cabal path -{"cabal-version":"","compiler":{"flavour":"ghc","id":"ghc-","path":"","store-path":"/cabal.dist/home/.cabal/store/ghc-"},"remote-repo-cache":"/cabal.dist/home/.cabal/packages"} +{"cabal-version":"","compiler":{"flavour":"ghc","id":"ghc-","abi-tag":"ghc-","path":"","store-path":"/cabal.dist/home/.cabal/store/ghc-"},"remote-repo-cache":"/cabal.dist/home/.cabal/packages"} # cabal path -{"cabal-version":"","compiler":{"flavour":"ghc","id":"ghc-","path":"","store-path":"/cabal.dist/home/.cabal/store/ghc-"},"cache-home":"/cabal.dist/home/.cabal","remote-repo-cache":"/cabal.dist/home/.cabal/packages","logs-dir":"/cabal.dist/home/.cabal/logs","store-dir":"/cabal.dist/home/.cabal/store","config-file":"/cabal.dist/home/.cabal/config","installdir":"/cabal.dist/home/.cabal/bin"} +{"cabal-version":"","compiler":{"flavour":"ghc","id":"ghc-","abi-tag":"ghc-","path":"","store-path":"/cabal.dist/home/.cabal/store/ghc-"},"cache-home":"/cabal.dist/home/.cabal","remote-repo-cache":"/cabal.dist/home/.cabal/packages","logs-dir":"/cabal.dist/home/.cabal/logs","store-dir":"/cabal.dist/home/.cabal/store","config-file":"/cabal.dist/home/.cabal/config","installdir":"/cabal.dist/home/.cabal/bin"} # cabal path {"cabal-version":"","cache-home":"/cabal.dist/home/.cabal"} # cabal path @@ -21,6 +21,7 @@ # cabal path compiler-flavour: ghc compiler-id: ghc- +compiler-abi-tag: ghc- compiler-path: compiler-store-path: /cabal.dist/home/.cabal/store/ghc- logs-dir: /cabal.dist/home/.cabal/logs @@ -28,6 +29,7 @@ installdir: /cabal.dist/home/.cabal/bin # cabal path compiler-flavour: ghc compiler-id: ghc- +compiler-abi-tag: ghc- compiler-path: compiler-store-path: /cabal.dist/home/.cabal/store/ghc- store-dir: /cabal.dist/home/.cabal/store @@ -35,12 +37,14 @@ config-file: /cabal.dist/home/.cabal/config # cabal path compiler-flavour: ghc compiler-id: ghc- +compiler-abi-tag: ghc- compiler-path: compiler-store-path: /cabal.dist/home/.cabal/store/ghc- remote-repo-cache: /cabal.dist/home/.cabal/packages # cabal path compiler-flavour: ghc compiler-id: ghc- +compiler-abi-tag: ghc- compiler-path: compiler-store-path: /cabal.dist/home/.cabal/store/ghc- cache-home: /cabal.dist/home/.cabal @@ -64,6 +68,7 @@ installdir: /cabal.dist/home/.cabal/bin # cabal path compiler-flavour: ghc compiler-id: ghc- +compiler-abi-tag: ghc- compiler-path: compiler-store-path: /cabal.dist/home/.cabal/store/ghc- logs-dir: /cabal.dist/home/.cabal/logs @@ -71,6 +76,7 @@ installdir: /cabal.dist/home/.cabal/bin # cabal path compiler-flavour: ghc compiler-id: ghc- +compiler-abi-tag: ghc- compiler-path: compiler-store-path: /cabal.dist/home/.cabal/store/ghc- store-dir: /cabal.dist/home/.cabal/store @@ -78,12 +84,14 @@ config-file: /cabal.dist/home/.cabal/config # cabal path compiler-flavour: ghc compiler-id: ghc- +compiler-abi-tag: ghc- compiler-path: compiler-store-path: /cabal.dist/home/.cabal/store/ghc- remote-repo-cache: /cabal.dist/home/.cabal/packages # cabal path compiler-flavour: ghc compiler-id: ghc- +compiler-abi-tag: ghc- compiler-path: compiler-store-path: /cabal.dist/home/.cabal/store/ghc- cache-home: /cabal.dist/home/.cabal diff --git a/cabal-testsuite/PackageTests/Path/Compiler/cabal.out b/cabal-testsuite/PackageTests/Path/Compiler/cabal.out index 5070211e681..5a852bdc866 100644 --- a/cabal-testsuite/PackageTests/Path/Compiler/cabal.out +++ b/cabal-testsuite/PackageTests/Path/Compiler/cabal.out @@ -1,17 +1,20 @@ # cabal path compiler-flavour: ghc compiler-id: ghc- +compiler-abi-tag: ghc- compiler-path: compiler-store-path: /cabal.dist/home/.cabal/store/ghc- # cabal path -{"cabal-version":"","compiler":{"flavour":"ghc","id":"ghc-","path":"","store-path":"/cabal.dist/home/.cabal/store/ghc-"}} +{"cabal-version":"","compiler":{"flavour":"ghc","id":"ghc-","abi-tag":"ghc-","path":"","store-path":"/cabal.dist/home/.cabal/store/ghc-"}} # cabal path compiler-flavour: ghc compiler-id: ghc- +compiler-abi-tag: ghc- compiler-path: compiler-store-path: /cabal.dist/home/.cabal/store/ghc- # cabal path compiler-flavour: ghc compiler-id: ghc- +compiler-abi-tag: ghc- compiler-path: compiler-store-path: fake-dir/ghc-