Closed srid closed 2 years ago
I think yes, and AFAICT the core library should still compile fine, even if the tests don't.
So, when using the flake.nix
from this PR, and changing ghcVersion
to ghc8107
- I seem to be getting compile errors for fourmolu during nix develop
-
src/Ormolu/Utils/Extensions.hs:24:1: error:
Could not find module ‘Distribution.Utils.Path’
Perhaps you meant
Distribution.Utils.IOData (from Cabal-3.2.1.0)
Distribution.Utils.MD5 (from Cabal-3.2.1.0)
Distribution.Utils.Base62
is it expecting a more up to date cabal version?
That flake which is internal to MLabs is not designed to support GHC 8.10.7. If you don't use the same cabalProjectLocal
, etc. it should work absolutely fine with GHC 8.10.7.
FWIW I did get that flake and everything to work with 8.10.7 by removing fourmolu.
@TotallyNotChase Why not modify Plutarch's flake.nix
? Basically https://github.com/Plutonomicon/plutarch/commit/2c4690e4767c5f0490283ff504faf55473dd0e0c Did you notice it requiring more than compiler version change?
¯_(ツ)_/¯ I'm just not very good with nix. It works flawlessly on my testbed with ghc8107 after removing fourmolu. I'm sure you could make it work with fourmolu as well by modifying the nix a bit.
For the record, it only requires changing compiler version, removing fourmolu/ format checks and adding back HLS.
Diff: https://github.com/Plutonomicon/plutarch/compare/staging...srid/ghc8107
Everything but the examples build:
https://hercules-ci.com/github/Plutonomicon/plutarch/jobs/354
I wonder if all of this can be parameterized so we can do nix develop
using either of the compilers.
I think we should at the very least in CI make sure compilation with GHC 8.10.7 works.
I changed the name of the issue.
The tests can't be run. They depend on GHC 9.2.1.
Only a couple of test suites depend on GHC 9, Fields and API I think. We could guard them in examples/Main.hs
with #if MIN_VERSION_GLASGOW_HASKELL(9,1)
.
@blamario Do you know of a way to check for GHC version in plutarch.cabal
?
https://cabal.readthedocs.io/en/3.4/cabal-package.html#conditions
if impl(ghc >= 9.0)
should do it.
I didn't know you could do that!
8.10 generates a slightly different error for pattern match failures, and that broke one golden test:
I'm starting to think most compilation outputs are rather flaky
At least it is flakiness across space (ghc versions) rather than flakiness across time. The latter being non-deterministic is the annoying one.
This also happens in 8.10 (but not 9.2):
EDIT: seems to be false alarm
Once staging is merged, will Plutarch continue to support GHC 8.10?
I think it should, because not all smart contracts will be moving over to GHC 9.2.