plutus
plutus copied to clipboard
Add PyF>=0.11 constraint to cabal
PyF < 0.11 is broken on ghc >= 9.2
You saw the link to the 1PyF
issue, right? https://github.com/guibou/PyF/issues/111
I didn't try to minimize it, but that might be a good next step.
I was unable to replicate the bug, so I hoped that adding the 0.11 constraint Would Just Work :( What did you test it on? Which ghc/PyF versions? cabal repl or ghci? I'm testing on ghc8107 and PyF 0.11.0.0 with cabal repl and it works fine... yet the nix build fails.
I could replicate it with cabal build
in the nix-shell
, I think? I'll check.
Yep, can reproduce.
cabal build plutus-tx-plugin
@zliu41 I've been informed you were the proponent of PyF.
PyF does have a more powerful and slimmer API, but again this is blocking the ghc9.2 migration.
Are you happy replacing it with string-interpolate
?
Hello, PyF author here.
I'm sorry to learn about your problem and I would like to find a solution suitable for your needs.
- I can fix PyF
<= 0.10
for ghc 9.2 (and 9.4), it should be easy. - I can also, as proposed in https://github.com/guibou/PyF/issues/115, avoid the
unsafeRunTcm
trick, or at least set a flag to disable it. Actually, I'm using this "trick" in two contexts, one for error reporting with correct location, and one to detect if a variable is in scope, which was the problem observed in https://github.com/guibou/PyF/issues/111.
Do you have a reproduction of the issue which may help me try and see what solution would be the best?
Hey @guibou thank you for reaching out.
Fixing PyF 0.10 for ghc >=9.2 would be great!
We can reproduce the error only when using PyF 0.11 as a build dependency using the patched GHC coming from haskell-nix
on linux (macSO works fine it seems).
To reproduce you could enter the nix-shell
(any revision behind the current master, which now uses string-interpolate
) after setting PyF to ==0.11.0.0 in the cabal files, and running e.g. cabal build plutus-tx-plugin
.
But that is not at all a minimal reproducible example...
~~Would you mind testing https://github.com/guibou/PyF/pull/117 which move the "dangerous" function under the cabal flag -unsafe_error_reporting
.~~
~~You may want to use PyF with this flag set to True
when developing locally (i.e. no cross compilation, better error reporting) and set the flag to False
in your CI.~~
But that is not at all a minimal reproducible example...
That's minimal enough, I'll try that, thank you ;)
https://hackage.haskell.org/package/PyF-0.11.1.0/changelog fixs the build in your codebase.
@bezirg this is getting reverted