@@ -49,7 +49,6 @@ normalizeOutput nenv =
49
49
" /incoming/new-<RAND>"
50
50
-- Normalize architecture
51
51
. resub (posixRegexEscape (display (normalizerPlatform nenv))) " <ARCH>"
52
- . normalizeBuildInfoJson
53
52
-- Some GHC versions are chattier than others
54
53
. resub " ^ignoring \\ (possibly broken\\ ) abi-depends field for packages" " "
55
54
-- Normalize the current GHC version. Apply this BEFORE packageIdRegex,
@@ -63,19 +62,28 @@ normalizeOutput nenv =
63
62
++ " (-[a-z0-9]+)?" )
64
63
" <GHCVER>"
65
64
else id )
65
+ . normalizeBuildInfoJson
66
+ . normalizePathCmdOutput
66
67
-- hackage-security locks occur non-deterministically
67
68
. resub " (Released|Acquired|Waiting) .*hackage-security-lock\n " " "
68
69
where
69
70
packageIdRegex pid =
70
71
resub (posixRegexEscape (display pid) ++ " (-[A-Za-z0-9.-]+)?" )
71
72
(prettyShow (packageName pid) ++ " -<VERSION>" )
72
73
74
+ normalizePathCmdOutput =
75
+ -- clear the ghc path out of all supported output formats
76
+ resub (" compiler-path: " <> posixRegexEscape (normalizerGhcPath nenv))
77
+ " compiler-path: <GHCPATH>"
78
+ . resub (" \" compiler-path\"\\ s*:\\ s*\" " <> posixRegexEscape (normalizerGhcPath nenv) <> " \" " )
79
+ " \" compiler-path\" : \" <GHCPATH>\" "
80
+
73
81
-- 'build-info.json' contains a plethora of host system specific information.
74
82
--
75
83
-- This must happen before the root-dir normalisation.
76
84
normalizeBuildInfoJson =
77
85
-- Remove ghc path from show-build-info output
78
- resub (" \" path\" :\" [^ \" ]* \" }" )
86
+ resub (" \" path\" :\" " <> posixRegexEscape (normalizerGhcPath nenv) <> " \" }" )
79
87
" \" path\" :\" <GHCPATH>\" }"
80
88
-- Remove cabal version output from show-build-info output
81
89
. resub (" {\" cabal-version\" :\" " ++ posixRegexEscape (display (normalizerCabalVersion nenv)) ++ " \" " )
@@ -104,6 +112,7 @@ data NormalizerEnv = NormalizerEnv
104
112
-- `/var` is a symlink for `/private/var`.
105
113
, normalizerGblTmpDir :: FilePath
106
114
, normalizerGhcVersion :: Version
115
+ , normalizerGhcPath :: FilePath
107
116
, normalizerKnownPackages :: [PackageId ]
108
117
, normalizerPlatform :: Platform
109
118
, normalizerCabalVersion :: Version
0 commit comments