plutus
plutus copied to clipboard
No instance for (HasErrorCode (Error _a _b _c))
Summary
Getting the following error trying to build latest plutus.
Preprocessing library for plutus-tx-plugin-1.0.0.0..
Building library for plutus-tx-plugin-1.0.0.0..
<no location info>: warning: [-Wunused-packages]
The following packages were specified via -package or -package-id flags,
but were not needed for compilation:
- transformers-0.5.6.2-6oYLJTvwHu7IJotjDUgOmp
- ghc-prim-0.8.0
- ghc-9.2.2-6TLZzObrRFC7DHAxONXPLT
[ 1 of 16] Compiling PlutusTx.Annotation ( src/PlutusTx/Annotation.hs, dist/build/PlutusTx/Annotation.o, dist/build/PlutusTx/Annotation.dyn_>
[ 2 of 16] Compiling PlutusTx.Compiler.Error ( src/PlutusTx/Compiler/Error.hs, dist/build/PlutusTx/Compiler/Error.o, dist/build/PlutusTx/Com>
src/PlutusTx/Compiler/Error.hs:42:38: error:
• No instance for (HasErrorCode (Error _a _b _c))
arising from a use of ‘errorCode’
There are instances for similar types:
instance HasErrorCode (PIR.Error _a _b _c)
-- Defined in ‘PlutusIR.Error’
instance HasErrorCode (PLC.Error _a _b _c)
-- Defined in ‘PlutusCore.Error’
• In the expression: errorCode e
In an equation for ‘errorCode’:
errorCode (NoContext e) = errorCode e
In the instance declaration for
‘HasErrorCode (CompileError _a _b _c)’
|
42 | errorCode (NoContext e) = errorCode e
| ^^^^^^^^^
Steps to reproduce the behavior
Using these shas
- git: https://github.com/Quid2/flat.git
commit: 559617e058098b776b431e2a67346ad3adea2440
- git: https://github.com/input-output-hk/cardano-crypto.git
commit: 07397f0e50da97eaa0575d93bee7ac4b2b2576ec
# nix-sha256: sha256-oxIOVlgm07FAEmgGRF1C2me9TXqVxQulEOcJ22zpTRs=
- git: https://github.com/input-output-hk/cardano-base
commit: 1587462ac8b2e50af2691f5ad93d3c2aa4674ed1
subdirs:
- base-deriving-via
- binary
- binary/test
- cardano-crypto-class
- cardano-crypto-praos
- cardano-crypto-tests
- measures
- orphans-deriving-via
- slotting
- strict-containers
- git: https://github.com/mlabs-haskell/cardano-prelude
commit: 713c7ae79a4d538fcd653c976a652913df1567b9
subdirs:
- cardano-prelude
- cardano-prelude-test
# nix-sha256: sha256-E+YSfUsvxdoOr7n7fz4xd7zb4z8XBRGNYOKipc2A1pw=
- git: https://github.com/input-output-hk/Win32-network
commit: 3825d3abf75f83f406c1f7161883c438dac7277d
- git: https://github.com/input-output-hk/plutus
commit: 64ab860d953cd0eb8aa35801e36cce280df920f4
subdirs:
- plutus-core
- plutus-ledger-api
- plutus-tx
- plutus-tx-plugin
- word-array
- prettyprinter-configurable
- stubs/plutus-ghc-stub
# nix-sha256: sha256-HpI/ZXoj6SHlDYZQNkbzWEVMyPfZLrO8itUWQHD/I9Y=
Actual Result
It does not build
Expected Result
It would expect it to build
Describe the approach you would take to fix this
No response
System info
NixOS
Repro here: https://github.com/locallycompact/plutus-tx-plugin-fail
ghc-9.2.2-6
Are you trying to build with GHC 9.2? That's an extremely relevant piece of information. Who knows what might have changed then. I don't think we're going to invest effort in making things compile with 9.2 right now, although I'd take compatibility patches if you make them.
Yes I'm taking a stab at this now.
We will probably try and move the whole Cardano stack to 9.2 after Vasil, though.
We will probably try and move the whole Cardano stack to 9.2 after Vasil, though.
That has happened, plus we just killed the whole ErrorCode thing, thus closing.