Skip to content

Add Agda certifier integration with source location tracking#7660

Draft
zeme-wana wants to merge 6 commits intomasterfrom
agda-certifier
Draft

Add Agda certifier integration with source location tracking#7660
zeme-wana wants to merge 6 commits intomasterfrom
agda-certifier

Conversation

@zeme-wana
Copy link
Collaborator

  • Refactor source location tracking in plutus-tx-plugin to flow through ReaderT
    CompileContext (ccCurrentLoc) instead of invasive function parameters on
    compileExpr.
  • Add --certify[=DIR] plugin option that invokes the Agda certifier for each
    compiled Plutus script, embedding package name, module name, and source location in
    the certificate metadata.
  • Simplify compileMarkedExprs (remove stateful go lastLoc loop), stripAnchors
    (single pattern match instead of recursive go), and package name resolution
    (lookupUnit / thisPackageName / stripVersionFromUnitId fallback chain).
  • Improve Certifier.hs: include certifier report in error messages, use
    createDirectoryIfMissing, remove noisy console output.
  • Encode TH source locations in structured format (encodeTHLoc) so the plugin can
    recover RealSrcSpan from the type-level string.
  • Add CI workflow (plinth-certifier-tests.yml) and test script
    (scripts/plinth-certifier-tests.py).

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