Skip to content

Commit bfe52e3

Browse files
hsyl20claude
andcommitted
Docs: fix the tutorial project for Plinth 1.66
Running the tutorial verbatim no longer worked. Verified end to end against a ghcup-installed uplc-ghc 9.6.166.1 and fixed: - the plugin option prefix is now Plinth.Plugin, not PlutusTx.Plugin (the old spelling is silently ignored, so target-version was not applied) - plutus-tx-plugin is no longer needed: the compiler is built into uplc-ghc - plutus 1.66 needs aeson >= 2.3: bump the index-states, pin the cardano-base fork to a rebase of the use-haskell-clibs patch onto current upstream master (no more crypto-stack constraint pins), and allow-newer microstache's aeson bound (via criterion) Same fixes applied to how-to/use.md, which shows the same cabal.project. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 70941c8 commit bfe52e3

2 files changed

Lines changed: 26 additions & 17 deletions

File tree

how-to/use.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,17 @@ repository cardano-haskell-packages
3434
d4a35cd3121aa00d18544bb0ac01c3e1691d618f462c46129271bccf39f7e8ee
3535

3636
index-state:
37-
, hackage.haskell.org 2025-09-21T21:31:06Z
38-
, cardano-haskell-packages 2026-01-24T11:25:12Z
37+
, hackage.haskell.org 2026-08-06T04:37:23Z
38+
, cardano-haskell-packages 2026-08-05T05:00:53Z
3939
```
4040

4141
Adapt the two `index-state` dates to your project: they pin the CHaP and Hackage
4242
package sets.
4343

44-
The Plinth libraries themselves (`plutus-tx`, `plutus-core`, `plutus-tx-plugin`)
45-
are neither bundled with the compiler nor taken from CHaP. Pull them from the
46-
`ghc-plinth-plutus` fork that `uplc-ghc` was built against:
44+
The Plinth libraries themselves (`plutus-tx`, `plutus-core`) are neither
45+
bundled with the compiler nor taken from CHaP. Pull them from the
46+
`ghc-plinth-plutus` fork that `uplc-ghc` was built against (`plutus-tx-plugin`
47+
is not needed: the compiler is built into `uplc-ghc`):
4748

4849
```haskell
4950
source-repository-package
@@ -52,7 +53,6 @@ source-repository-package
5253
tag: 2e582ecde824238f927322d208740322eada8115
5354
subdir: plutus-tx
5455
plutus-core
55-
plutus-tx-plugin
5656
```
5757

5858
Use the `ghc-plinth-plutus` commit that matches your `uplc-ghc`: the compiler
@@ -75,7 +75,7 @@ handle real funds.
7575
source-repository-package
7676
type: git
7777
location: https://github.com/hsyl20/cardano-base
78-
tag: 8ea819bb548583b63b4926170a891e91e4f7c17b
78+
tag: 055ebbcc73e1cb234f1fd3fa237a4fb087130183
7979
subdir: cardano-crypto-class
8080
cardano-crypto-praos
8181

@@ -107,6 +107,11 @@ package sodium-clib
107107
-- disable -fPIE: the static boot libraries are not built with it, so the
108108
-- link phase fails otherwise.
109109
configure-options: --enable-pie=no
110+
111+
-- criterion (a plutus-core dependency) pulls microstache, whose aeson upper
112+
-- bound predates the aeson >= 2.3 that plutus-core requires.
113+
allow-newer:
114+
, microstache:aeson
110115
```
111116

112117
Then refresh the package index and build:

tutorials/first-smart-contract.md

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ If you have already installed it this way, skip to step 2.
5151
Make a new directory and add the three files below.
5252

5353
**`cabal.project`** wires up the build. It points cabal at `uplc-ghc`; pulls the
54-
Plinth libraries (`plutus-tx`, `plutus-core`, `plutus-tx-plugin`) from the
54+
Plinth libraries (`plutus-tx`, `plutus-core`) from the
5555
`ghc-plinth-plutus` fork the compiler was built against; uses the Cardano
5656
package repository (CHaP) for the remaining dependencies; and builds the Cardano
5757
crypto C libraries (`libsodium`, `secp256k1`, `blst`) from source via the
@@ -74,22 +74,22 @@ repository cardano-haskell-packages
7474
d4a35cd3121aa00d18544bb0ac01c3e1691d618f462c46129271bccf39f7e8ee
7575

7676
index-state:
77-
, hackage.haskell.org 2025-09-21T21:31:06Z
78-
, cardano-haskell-packages 2026-01-24T11:25:12Z
77+
, hackage.haskell.org 2026-08-06T04:37:23Z
78+
, cardano-haskell-packages 2026-08-05T05:00:53Z
7979

80-
-- The Plinth libraries, from the fork uplc-ghc was built against.
80+
-- The Plinth libraries, from the fork uplc-ghc was built against. The
81+
-- compiler itself is built into uplc-ghc, so plutus-tx-plugin is not needed.
8182
source-repository-package
8283
type: git
8384
location: https://github.com/input-output-hk/ghc-plinth-plutus
8485
tag: 2e582ecde824238f927322d208740322eada8115
8586
subdir: plutus-tx
8687
plutus-core
87-
plutus-tx-plugin
8888

8989
source-repository-package
9090
type: git
9191
location: https://github.com/hsyl20/cardano-base
92-
tag: 8ea819bb548583b63b4926170a891e91e4f7c17b
92+
tag: 055ebbcc73e1cb234f1fd3fa237a4fb087130183
9393
subdir: cardano-crypto-class
9494
cardano-crypto-praos
9595

@@ -121,6 +121,11 @@ package sodium-clib
121121
-- disable -fPIE: the static boot libraries are not built with it, so the
122122
-- link phase fails otherwise.
123123
configure-options: --enable-pie=no
124+
125+
-- criterion (a plutus-core dependency) pulls microstache, whose aeson upper
126+
-- bound predates the aeson >= 2.3 that plutus-core requires.
127+
allow-newer:
128+
, microstache:aeson
124129
```
125130

126131
Use the `ghc-plinth-plutus` commit that matches your `uplc-ghc`: the compiler and
@@ -154,16 +159,15 @@ executable plinth-add
154159
, base
155160
, text
156161
, prettyprinter
157-
, plutus-tx ^>=1.57
158-
, plutus-core ^>=1.57
159-
, plutus-tx-plugin
162+
, plutus-tx
163+
, plutus-core
160164
ghc-options:
161165
-fexternal-interpreter
162166
-fobject-code -fno-full-laziness -fno-ignore-interface-pragmas
163167
-fno-omit-interface-pragmas -fno-spec-constr -fno-specialise
164168
-fno-strictness -fno-unbox-small-strict-fields
165169
-fno-unbox-strict-fields
166-
-fplugin-opt PlutusTx.Plugin:target-version=1.1.0
170+
-fplugin-opt Plinth.Plugin:target-version=1.1.0
167171
```
168172

169173
**`Main.hs`** is the whole program. It defines the on-chain function, compiles

0 commit comments

Comments
 (0)