cabal icon indicating copy to clipboard operation
cabal copied to clipboard

cabal accidentally doesn't include abi hash for development compilers

Open mpickering opened this issue 1 year ago • 1 comments

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.

mpickering avatar Jul 03 '24 12:07 mpickering