aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad Richardson <everythingfunctional@protonmail.com>2020-10-29 11:56:15 -0500
committerBrad Richardson <everythingfunctional@protonmail.com>2020-10-29 11:56:15 -0500
commita07bf3fb3fc07a2c3bf13f8c36a158108a38cefa (patch)
tree5ff21b2d980612f2b6ff7d331cb7963306365f51
parentfa04b1f441b18cc50af403a0a58c38681c2e66d7 (diff)
downloadfpm-a07bf3fb3fc07a2c3bf13f8c36a158108a38cefa.tar.gz
fpm-a07bf3fb3fc07a2c3bf13f8c36a158108a38cefa.zip
Change build directory hashes to hex format
-rw-r--r--bootstrap/src/Fpm.hs9
1 files changed, 5 insertions, 4 deletions
diff --git a/bootstrap/src/Fpm.hs b/bootstrap/src/Fpm.hs
index c23263e..18831d8 100644
--- a/bootstrap/src/Fpm.hs
+++ b/bootstrap/src/Fpm.hs
@@ -33,6 +33,7 @@ import Development.Shake.FilePath ( (</>)
, exe
, splitDirectories
)
+import Numeric (showHex)
import Options.Applicative ( Parser
, (<**>)
, (<|>)
@@ -681,15 +682,15 @@ makeBuildPrefix compiler flags = do
-- Probably version, and make sure to not include path to the compiler
versionInfo <- readProcess compiler ["--version"] []
let compilerName = last (splitDirectories compiler)
- let versionHash = hash versionInfo
- let flagsHash = hash flags
+ let versionHash = abs (hash versionInfo)
+ let flagsHash = abs (hash flags)
return
$ "build"
</> compilerName
++ "_"
- ++ show versionHash
+ ++ showHex versionHash ""
++ "_"
- ++ show flagsHash
+ ++ showHex flagsHash ""
{-
Fetching the dependencies is done on a sort of breadth first approach. All