cabal
cabal copied to clipboard
cabal accidentally doesn't include abi hash for development compilers
The current logic says
compilerAbiTag :: AbiTag
compilerAbiTag = maybe NoAbiTag AbiTag (Map.lookup "Project Unit Id" ghcInfoMap >>= stripPrefix (prettyShow compilerId <> "-"))
If we look at ghc --info for a development build of GHC then we see..
("Project Unit Id","ghc-9.11-inplace")
but the version is reported as
The Glorious Glasgow Haskell Compilation System, version 9.11.20240612
So the call to stripPrefix will fail and no ABI tag will be used because the Project Unit Id is not prefixed by ghc-9.11.20240612.
Perhaps a more robust but confusing tactic is to hash the contents of Project Unit Id rather than attempting to parse it.