Skip to content

ocaml: map ppx typedtree sources to real files#20

Merged
subsetpark merged 1 commit into
masterfrom
zax/ocaml-pp-typedtree-source
Jun 8, 2026
Merged

ocaml: map ppx typedtree sources to real files#20
subsetpark merged 1 commit into
masterfrom
zax/ocaml-pp-typedtree-source

Conversation

@subsetpark

@subsetpark subsetpark commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

What

Fix the OCaml typedtree artifact mapper for Dune/PPX-generated source paths.

Dune records preprocessed modules in .cmt/.cmti metadata as paths like lib/orchestrator.pp.ml, but archlint collects the real source path lib/orchestrator.ml. That made the adapter fail with missing typedtree artifacts even though the artifacts existed.

This normalizes full typedtree source paths from *.pp.ml / *.pp.mli back to *.ml / *.mli before matching, preserving directory context so duplicate basenames like lib/git_env.ml and lib_test/git_env.ml resolve correctly.

Tests

  • ARCHLINT_OPAM_SWITCH="$PWD/ocaml" sh ocaml/test.sh
  • uv run --project . python evaluate_test.py
  • local onton run: uv run --project . python evaluate.py --repo-root /Users/zax/code-src/onton --adapter ocaml --ocaml-root .

View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.

@flowglad-review-service

Copy link
Copy Markdown

Review Summary

Stage: behavior. I reviewed the diff and did not find any actionable in-scope issues to raise.

Severity Count
Must-fix 0
Should-fix 0
Note 0

Variant: convergence-v2

Candidates: 0 | Posted: 0 | Suppressed: 0


0 comments posted · Model: gpt-5.4 (sonnet) · Tokens: 116278 in / 169 out · Cache: 0 created / 78464 read · Context: 116 items · Review mode: agentic · Turns: 4 · Tool calls: 0

@subsetpark subsetpark merged commit bfaee5d into master Jun 8, 2026
7 checks passed
@subsetpark subsetpark deleted the zax/ocaml-pp-typedtree-source branch June 8, 2026 19:25
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