Skip to content

Commit a07bf3f

Browse files
Change build directory hashes to hex format
1 parent fa04b1f commit a07bf3f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

bootstrap/src/Fpm.hs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import Development.Shake.FilePath ( (</>)
3333
, exe
3434
, splitDirectories
3535
)
36+
import Numeric (showHex)
3637
import Options.Applicative ( Parser
3738
, (<**>)
3839
, (<|>)
@@ -681,15 +682,15 @@ makeBuildPrefix compiler flags = do
681682
-- Probably version, and make sure to not include path to the compiler
682683
versionInfo <- readProcess compiler ["--version"] []
683684
let compilerName = last (splitDirectories compiler)
684-
let versionHash = hash versionInfo
685-
let flagsHash = hash flags
685+
let versionHash = abs (hash versionInfo)
686+
let flagsHash = abs (hash flags)
686687
return
687688
$ "build"
688689
</> compilerName
689690
++ "_"
690-
++ show versionHash
691+
++ showHex versionHash ""
691692
++ "_"
692-
++ show flagsHash
693+
++ showHex flagsHash ""
693694

694695
{-
695696
Fetching the dependencies is done on a sort of breadth first approach. All

0 commit comments

Comments
 (0)