Skip to content

Commit e8a1785

Browse files
committed
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.
1 parent fd9d0b3 commit e8a1785

File tree

3 files changed

+19
-19
lines changed

3 files changed

+19
-19
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ data PathCompilerInfo = PathCompilerInfo
325325
{ pathCompilerInfoFlavour :: CompilerFlavor
326326
, pathCompilerInfoId :: CompilerId
327327
, pathCompilerInfoPath :: FilePath
328-
, pathCompilerInfoProjectUnitId :: FilePath
328+
, pathCompilerInfoStorePath :: FilePath
329329
}
330330
deriving (Show, Eq, Ord)
331331

@@ -335,7 +335,7 @@ mkCompilerInfo compilerProgram compiler storeLayout =
335335
{ pathCompilerInfoFlavour = compilerFlavor compiler
336336
, pathCompilerInfoId = compilerId compiler
337337
, pathCompilerInfoPath = programPath compilerProgram
338-
, pathCompilerInfoProjectUnitId = storeDirectory storeLayout compiler
338+
, pathCompilerInfoStorePath = storeDirectory storeLayout compiler
339339
}
340340

341341
-- ----------------------------------------------------------------------------
@@ -381,7 +381,7 @@ compilerInfoToJson pci =
381381
[ "flavour" .= jdisplay (pathCompilerInfoFlavour pci)
382382
, "id" .= jdisplay (pathCompilerInfoId pci)
383383
, "path" .= Json.String (pathCompilerInfoPath pci)
384-
, "project-unit-id" .= Json.String (pathCompilerInfoProjectUnitId pci)
384+
, "store-path" .= Json.String (pathCompilerInfoStorePath pci)
385385
]
386386
]
387387

@@ -411,5 +411,5 @@ compilerInfoToKeyValue pci =
411411
[ ("compiler-flavour", prettyShow $ pathCompilerInfoFlavour pci)
412412
, ("compiler-id", prettyShow $ pathCompilerInfoId pci)
413413
, ("compiler-path", pathCompilerInfoPath pci)
414-
, ("compiler-project-unit-id", pathCompilerInfoProjectUnitId pci)
414+
, ("compiler-store-path", pathCompilerInfoStorePath pci)
415415
]

cabal-testsuite/PackageTests/Path/All/cabal.out

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# cabal path
2-
{"cabal-version":"<CABAL_INSTALL_VER>","compiler":{"flavour":"ghc","id":"ghc-<GHCVER>","path":"<GHCPATH>","project-unit-id":"<ROOT>/cabal.dist/home/.cabal/store/ghc-<GHCVER>"},"logs-dir":"<ROOT>/cabal.dist/home/.cabal/logs","installdir":"<ROOT>/cabal.dist/home/.cabal/bin"}
2+
{"cabal-version":"<CABAL_INSTALL_VER>","compiler":{"flavour":"ghc","id":"ghc-<GHCVER>","path":"<GHCPATH>","store-path":"<ROOT>/cabal.dist/home/.cabal/store/ghc-<GHCVER>"},"logs-dir":"<ROOT>/cabal.dist/home/.cabal/logs","installdir":"<ROOT>/cabal.dist/home/.cabal/bin"}
33
# cabal path
4-
{"cabal-version":"<CABAL_INSTALL_VER>","compiler":{"flavour":"ghc","id":"ghc-<GHCVER>","path":"<GHCPATH>","project-unit-id":"<ROOT>/cabal.dist/home/.cabal/store/ghc-<GHCVER>"},"store-dir":"<ROOT>/cabal.dist/home/.cabal/store","config-file":"<ROOT>/cabal.dist/home/.cabal/config"}
4+
{"cabal-version":"<CABAL_INSTALL_VER>","compiler":{"flavour":"ghc","id":"ghc-<GHCVER>","path":"<GHCPATH>","store-path":"<ROOT>/cabal.dist/home/.cabal/store/ghc-<GHCVER>"},"store-dir":"<ROOT>/cabal.dist/home/.cabal/store","config-file":"<ROOT>/cabal.dist/home/.cabal/config"}
55
# cabal path
6-
{"cabal-version":"<CABAL_INSTALL_VER>","compiler":{"flavour":"ghc","id":"ghc-<GHCVER>","path":"<GHCPATH>","project-unit-id":"<ROOT>/cabal.dist/home/.cabal/store/ghc-<GHCVER>"},"remote-repo-cache":"<ROOT>/cabal.dist/home/.cabal/packages"}
6+
{"cabal-version":"<CABAL_INSTALL_VER>","compiler":{"flavour":"ghc","id":"ghc-<GHCVER>","path":"<GHCPATH>","store-path":"<ROOT>/cabal.dist/home/.cabal/store/ghc-<GHCVER>"},"remote-repo-cache":"<ROOT>/cabal.dist/home/.cabal/packages"}
77
# cabal path
8-
{"cabal-version":"<CABAL_INSTALL_VER>","compiler":{"flavour":"ghc","id":"ghc-<GHCVER>","path":"<GHCPATH>","project-unit-id":"<ROOT>/cabal.dist/home/.cabal/store/ghc-<GHCVER>"},"cache-home":"<ROOT>/cabal.dist/home/.cabal","remote-repo-cache":"<ROOT>/cabal.dist/home/.cabal/packages","logs-dir":"<ROOT>/cabal.dist/home/.cabal/logs","store-dir":"<ROOT>/cabal.dist/home/.cabal/store","config-file":"<ROOT>/cabal.dist/home/.cabal/config","installdir":"<ROOT>/cabal.dist/home/.cabal/bin"}
8+
{"cabal-version":"<CABAL_INSTALL_VER>","compiler":{"flavour":"ghc","id":"ghc-<GHCVER>","path":"<GHCPATH>","store-path":"<ROOT>/cabal.dist/home/.cabal/store/ghc-<GHCVER>"},"cache-home":"<ROOT>/cabal.dist/home/.cabal","remote-repo-cache":"<ROOT>/cabal.dist/home/.cabal/packages","logs-dir":"<ROOT>/cabal.dist/home/.cabal/logs","store-dir":"<ROOT>/cabal.dist/home/.cabal/store","config-file":"<ROOT>/cabal.dist/home/.cabal/config","installdir":"<ROOT>/cabal.dist/home/.cabal/bin"}
99
# cabal path
1010
{"cabal-version":"<CABAL_INSTALL_VER>","cache-home":"<ROOT>/cabal.dist/home/.cabal"}
1111
# cabal path
@@ -22,27 +22,27 @@
2222
compiler-flavour: ghc
2323
compiler-id: ghc-<GHCVER>
2424
compiler-path: <GHCPATH>
25-
compiler-project-unit-id: <ROOT>/cabal.dist/home/.cabal/store/ghc-<GHCVER>
25+
compiler-store-path: <ROOT>/cabal.dist/home/.cabal/store/ghc-<GHCVER>
2626
logs-dir: <ROOT>/cabal.dist/home/.cabal/logs
2727
installdir: <ROOT>/cabal.dist/home/.cabal/bin
2828
# cabal path
2929
compiler-flavour: ghc
3030
compiler-id: ghc-<GHCVER>
3131
compiler-path: <GHCPATH>
32-
compiler-project-unit-id: <ROOT>/cabal.dist/home/.cabal/store/ghc-<GHCVER>
32+
compiler-store-path: <ROOT>/cabal.dist/home/.cabal/store/ghc-<GHCVER>
3333
store-dir: <ROOT>/cabal.dist/home/.cabal/store
3434
config-file: <ROOT>/cabal.dist/home/.cabal/config
3535
# cabal path
3636
compiler-flavour: ghc
3737
compiler-id: ghc-<GHCVER>
3838
compiler-path: <GHCPATH>
39-
compiler-project-unit-id: <ROOT>/cabal.dist/home/.cabal/store/ghc-<GHCVER>
39+
compiler-store-path: <ROOT>/cabal.dist/home/.cabal/store/ghc-<GHCVER>
4040
remote-repo-cache: <ROOT>/cabal.dist/home/.cabal/packages
4141
# cabal path
4242
compiler-flavour: ghc
4343
compiler-id: ghc-<GHCVER>
4444
compiler-path: <GHCPATH>
45-
compiler-project-unit-id: <ROOT>/cabal.dist/home/.cabal/store/ghc-<GHCVER>
45+
compiler-store-path: <ROOT>/cabal.dist/home/.cabal/store/ghc-<GHCVER>
4646
cache-home: <ROOT>/cabal.dist/home/.cabal
4747
remote-repo-cache: <ROOT>/cabal.dist/home/.cabal/packages
4848
logs-dir: <ROOT>/cabal.dist/home/.cabal/logs
@@ -65,27 +65,27 @@ installdir: <ROOT>/cabal.dist/home/.cabal/bin
6565
compiler-flavour: ghc
6666
compiler-id: ghc-<GHCVER>
6767
compiler-path: <GHCPATH>
68-
compiler-project-unit-id: <ROOT>/cabal.dist/home/.cabal/store/ghc-<GHCVER>
68+
compiler-store-path: <ROOT>/cabal.dist/home/.cabal/store/ghc-<GHCVER>
6969
logs-dir: <ROOT>/cabal.dist/home/.cabal/logs
7070
installdir: <ROOT>/cabal.dist/home/.cabal/bin
7171
# cabal path
7272
compiler-flavour: ghc
7373
compiler-id: ghc-<GHCVER>
7474
compiler-path: <GHCPATH>
75-
compiler-project-unit-id: <ROOT>/cabal.dist/home/.cabal/store/ghc-<GHCVER>
75+
compiler-store-path: <ROOT>/cabal.dist/home/.cabal/store/ghc-<GHCVER>
7676
store-dir: <ROOT>/cabal.dist/home/.cabal/store
7777
config-file: <ROOT>/cabal.dist/home/.cabal/config
7878
# cabal path
7979
compiler-flavour: ghc
8080
compiler-id: ghc-<GHCVER>
8181
compiler-path: <GHCPATH>
82-
compiler-project-unit-id: <ROOT>/cabal.dist/home/.cabal/store/ghc-<GHCVER>
82+
compiler-store-path: <ROOT>/cabal.dist/home/.cabal/store/ghc-<GHCVER>
8383
remote-repo-cache: <ROOT>/cabal.dist/home/.cabal/packages
8484
# cabal path
8585
compiler-flavour: ghc
8686
compiler-id: ghc-<GHCVER>
8787
compiler-path: <GHCPATH>
88-
compiler-project-unit-id: <ROOT>/cabal.dist/home/.cabal/store/ghc-<GHCVER>
88+
compiler-store-path: <ROOT>/cabal.dist/home/.cabal/store/ghc-<GHCVER>
8989
cache-home: <ROOT>/cabal.dist/home/.cabal
9090
remote-repo-cache: <ROOT>/cabal.dist/home/.cabal/packages
9191
logs-dir: <ROOT>/cabal.dist/home/.cabal/logs

cabal-testsuite/PackageTests/Path/Compiler/cabal.out

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
compiler-flavour: ghc
33
compiler-id: ghc-<GHCVER>
44
compiler-path: <GHCPATH>
5-
compiler-project-unit-id: <ROOT>/cabal.dist/home/.cabal/store/ghc-<GHCVER>
5+
compiler-store-path: <ROOT>/cabal.dist/home/.cabal/store/ghc-<GHCVER>
66
# cabal path
7-
{"cabal-version":"<CABAL_INSTALL_VER>","compiler":{"flavour":"ghc","id":"ghc-<GHCVER>","path":"<GHCPATH>","project-unit-id":"<ROOT>/cabal.dist/home/.cabal/store/ghc-<GHCVER>"}}
7+
{"cabal-version":"<CABAL_INSTALL_VER>","compiler":{"flavour":"ghc","id":"ghc-<GHCVER>","path":"<GHCPATH>","store-path":"<ROOT>/cabal.dist/home/.cabal/store/ghc-<GHCVER>"}}
88
# cabal path
99
compiler-flavour: ghc
1010
compiler-id: ghc-<GHCVER>
1111
compiler-path: <GHCPATH>
12-
compiler-project-unit-id: <ROOT>/cabal.dist/home/.cabal/store/ghc-<GHCVER>
12+
compiler-store-path: <ROOT>/cabal.dist/home/.cabal/store/ghc-<GHCVER>

0 commit comments

Comments
 (0)