Plutonomicon / Shrinker

Shrink Plutus scripts
Apache License 2.0
6 stars 3 forks source link

Got compilation error #2

Closed anton-k closed 2 years ago

anton-k commented 2 years ago

I've tried to use shrinker but got this on compilation:

Configuring library for shrinker-0.1..
Preprocessing library for shrinker-0.1..
Building library for shrinker-0.1..
[1 of 9] Compiling Shrink.Types     ( src/Shrink/Types.hs, dist/build/Shrink/Types.o, dist/build/Shrink/Types.dyn_o )
[2 of 9] Compiling Shrink.ScopeM    ( src/Shrink/ScopeM.hs, dist/build/Shrink/ScopeM.o, dist/build/Shrink/ScopeM.dyn_o )
[3 of 9] Compiling Shrink.Tactics.Util ( src/Shrink/Tactics/Util.hs, dist/build/Shrink/Tactics/Util.o, dist/build/Shrink/Tactics/Util.dyn_o )
[4 of 9] Compiling Shrink.Tactics.Safe ( src/Shrink/Tactics/Safe.hs, dist/build/Shrink/Tactics/Safe.o, dist/build/Shrink/Tactics/Safe.dyn_o )
[5 of 9] Compiling Shrink.Tactics.Tactics ( src/Shrink/Tactics/Tactics.hs, dist/build/Shrink/Tactics/Tactics.o, dist/build/Shrink/Tactics/Tactics.dyn_o )
[6 of 9] Compiling Shrink.Names     ( src/Shrink/Names.hs, dist/build/Shrink/Names.o, dist/build/Shrink/Names.dyn_o )
[7 of 9] Compiling Shrink           ( src/Shrink.hs, dist/build/Shrink.o, dist/build/Shrink.dyn_o )
[8 of 9] Compiling Shrink.PlutusTX  ( src/Shrink/PlutusTX.hs, dist/build/Shrink/PlutusTX.o, dist/build/Shrink/PlutusTX.dyn_o )

src/Shrink/PlutusTX.hs:26:9: error:
    • The constructor ‘SerializedCode’ should have 3 arguments, but has been given 2
    • In the pattern: SerializedCode _ maybePirByteString
      In a case alternative:
          SerializedCode _ maybePirByteString
            -> SerializedCode scriptBc maybePirByteString
      In the expression:
        case comped of
          SerializedCode _ maybePirByteString
            -> SerializedCode scriptBc maybePirByteString
          DeserializedCode _ maybePir -> DeserializedCode prog maybePir
   |
26 |         SerializedCode _ maybePirByteString -> SerializedCode scriptBc maybePirByteString
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cabal: Failed to build shrinker-0.1 (which is required by
test:gero-onchain-test from gero-gov-0.1.0.0, test:gero-gov-test from
gero-gov-0.1.0.0 and others). See the build log above for details.

Maybe it's caused by plutus version mismatch. we use on our project plutus: c8c5183f7facd967d48fe07b3b14465b8dd48fe7 (2021-12-27)

Geometer1729 commented 2 years ago

Yup that was a plutus version mismatch, sorry about that. it should be fixed in the latest commit 6cd3e on staging.