Skip to content

Tests: pin the default error locations and cross-package code - #6

Merged
hsyl20 merged 2 commits into
masterfrom
q4-milestone-hardening
Nov 17, 2026
Merged

hsyl20 merged 2 commits into
masterfrom
q4-milestone-hardening

Conversation

@hsyl20

@hsyl20 hsyl20 commented Nov 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

Hardening for the Q4 2026 milestone ("INLINEABLE pragma no longer required across modules. All compilation errors traceable to Haskell source locations. Testsuite for cross-module usability and source-location errors delivered.").

  • plinth/test/errors: each case now runs in two modes, with preserve-source-locations (golden/<series>/) and without it (golden/<series>/nolocs/). The second mode pins what a user gets by default.
  • plinth/test/errors: a check that does not depend on the goldens fails a case whose error has no File.hs:l:c: error: header, also with ACCEPT=1.
  • New error cases: CrossModule (the error is in an imported module and points into it) and InvalidMarker (PLINTH-00006).
  • no-pragmas: also uses functions of another package (plinth/test/no-pragmas-dep) that sets no Plinth-specific GHC flag and has no INLINABLE pragma.
  • Bump plutus to plinth: report an error without a span at the start of the module ghc-plinth-plutus#10: an error without a span is reported at the start of the module, not with <no location info>.

Test plan

  • Local, GHC 9.6, Linux x86-64, compiler rebuilt with the plutus change: no-pragmas passes; 56 of 56 error runs pass.
  • CI: the compiler test-suites of plinthc-test.sh (plutus-tx-plugin, plutus-tx). The local run of these suites did not finish.
  • CI on macOS, Windows and Linux ARM: the nolocs goldens were generated on Linux x86-64 only.
  • Not done: golden/9.12 for the new cases and the nolocs mode. The ghc-9.12 branch gets the port separately.
  • This pull request and Plinth status: check on-chain code at type-checking time #1 (plinth-status) both change run-error-tests.sh; the second one to merge must combine the mode loops.

🤖 Generated with Claude Code

Error-message suite (plinth/test/errors):
- Run each case in two modes: with preserve-source-locations (goldens in
  golden/<series>/) and without it (golden/<series>/nolocs/), to pin
  what a user gets by default.
- Fail a case whose error has no located header, also with ACCEPT=1.
  See Note [Every error has a location] in run-error-tests.sh.
- New cases: CrossModule (the error is in an imported module) and
  InvalidMarker (PLINTH-00006).

no-pragmas suite: use functions of another package (plinth-test-dep)
that sets no Plinth-specific GHC flag and has no INLINABLE pragma.

Bump plutus (ican-group/ghc-plinth-plutus#10): an error without a span
is reported at the start of the module.

The golden/9.12 files for the new cases and the nolocs mode are not
generated yet: the ghc-9.12 branch gets the port separately.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
macOS has bash 3.2, which rejects the expansion of an empty array under
set -u. The nolocs mode has no additional argument, so each of its
cases failed with "mode_args[@]: unbound variable".

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@hsyl20
hsyl20 merged commit 5ce7e72 into master Nov 17, 2026
1 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant