cabal icon indicating copy to clipboard operation
cabal copied to clipboard

Add MHS as a recognized compiler.

Open augustss opened this issue 10 months ago • 6 comments

The title says it all.

augustss avatar Apr 09 '24 19:04 augustss

I don't care about additional code right now. I just want to have mhs be recognized as a valid Haskell compiler to be used in .cabal files.

To build things with mhs I use mcabal anyway.

augustss avatar Apr 09 '24 20:04 augustss

Looks like a hash needs to be updated:

  Distribution.Utils.Structured
    GenericPackageDescription:                                           FAIL (0.02s)
      tests/UnitTests/Distribution/Utils/Structured.hs:31:
      expected: 5a48c6570cbcf96af4c51f38962e37b5
       but got: f6306d42af1d4f88b269cbd6a7879e6d
      Use -p '/Distribution.Utils.Structured.GenericPackageDescription/' to rerun this test only.
    LocalBuildInfo:                                                      FAIL (0.02s)
      tests/UnitTests/Distribution/Utils/Structured.hs:31:
      expected: 6d668de33d7b4d5df3830e65e6941373
       but got: 214d441d7d9bf881624984de13980b37
      Use -p '/LocalBuildInfo/' to rerun this test only.

geekosaur avatar Apr 09 '24 20:04 geekosaur

Let me rebase to verify CI passes after we worked around the github changes breakage.

Mikolaj avatar May 01 '24 10:05 Mikolaj

@mergify rebase

Mikolaj avatar May 01 '24 10:05 Mikolaj

rebase

✅ Branch has been successfully rebased

mergify[bot] avatar May 01 '24 10:05 mergify[bot]

Actually, @geekosaur was right all along --- the hashes need to be updated to the ones given in https://github.com/haskell/cabal/actions/runs/8908155162/job/24463289224?pr=9878. @augustss: I'm afraid that's the task of the PR author. We'd also need a tiny changelog file: https://github.com/haskell/cabal/blob/master/CONTRIBUTING.md#changelog. I think, we can skip a test in this case, but it never hurts to add one. Thank you for the PR!

Mikolaj avatar May 01 '24 10:05 Mikolaj

Is there any chance this fix could be merged soon? I'm not asking for very much, just that one more compiler is recognized so I can upload my packages that has 'impl(mhs)' in them. Or should I just give up and pretend my compiler is called ghc?

augustss avatar Jun 13 '24 07:06 augustss

@augustss , for this to be merged you need to update the hashes, like @geekosaur suggested.

I would also add a simple comment to specify what MHS is longhand,

ffaf1 avatar Jun 13 '24 08:06 ffaf1

I've added a comment, added a changelog entry, and updated the checksums.

augustss avatar Jun 14 '24 11:06 augustss

It's been sitting for a while, so I take the liberty and apply the delay-passed label.

ulysses4ever avatar Jun 15 '24 20:06 ulysses4ever

@mergify backport 3.12

ulysses4ever avatar Jun 15 '24 20:06 ulysses4ever

backport 3.12

✅ Backports have been created

mergify[bot] avatar Jun 15 '24 20:06 mergify[bot]

@Mergify refresh

ulysses4ever avatar Jun 15 '24 20:06 ulysses4ever

refresh

✅ Pull request refreshed

mergify[bot] avatar Jun 15 '24 20:06 mergify[bot]

Thanks!

augustss avatar Jun 15 '24 23:06 augustss

Too late now, but adding new constructors constitutes a breaking change. It should not have happened without bumping a major version of Cabal-syntax package:

  • https://hackage.haskell.org/package/Cabal-syntax-3.12.0.0/docs/Distribution-Compiler.html#t:CompilerFlavor
  • https://hackage.haskell.org/package/Cabal-syntax-3.12.1.0/docs/Distribution-Compiler.html#t:CompilerFlavor

Bodigrim avatar Jun 28 '24 22:06 Bodigrim