Skip to content

test(melange): accept ppx loc-filename in fixtures#14708

Merged
anmonteiro merged 1 commit into
ocaml:mainfrom
anmonteiro:anmonteiro/fix-melange-ppx-test-fixtures
May 24, 2026
Merged

test(melange): accept ppx loc-filename in fixtures#14708
anmonteiro merged 1 commit into
ocaml:mainfrom
anmonteiro:anmonteiro/fix-melange-ppx-test-fixtures

Conversation

@anmonteiro

Copy link
Copy Markdown
Collaborator

No description provided.

Signed-off-by: Antonio Nuno Monteiro <anmonteiro@gmail.com>
@anmonteiro anmonteiro force-pushed the anmonteiro/fix-melange-ppx-test-fixtures branch from 5ee2b45 to 368b7a2 Compare May 24, 2026 23:12
@anmonteiro anmonteiro marked this pull request as ready for review May 24, 2026 23:12
@anmonteiro anmonteiro added melange Melange rules and generator preprocessing Issue linked to preprocessing labels May 24, 2026
@anmonteiro anmonteiro merged commit c2e4d21 into ocaml:main May 24, 2026
22 of 23 checks passed
@anmonteiro anmonteiro deleted the anmonteiro/fix-melange-ppx-test-fixtures branch May 24, 2026 23:39
shonfeder pushed a commit that referenced this pull request Jun 11, 2026
Signed-off-by: Antonio Nuno Monteiro <anmonteiro@gmail.com>
shonfeder added a commit that referenced this pull request Jun 11, 2026
Backport #14715 onto 3.24.0-rc.

Fixes the melange build failure on OCaml 4.14 where dune emits an `I/O
error: jscomp/runtime/.melange_src/X.mli: No such file or directory`
against every `melange-re/melange.*-414` reverse dep (see
ocaml/opam-repository#29996 — the 3.24.0~alpha2 release PR). The fix is
to skip the line directive in `setup_melange_sources_copy_rules` when a
module uses non-staged PPX, since the PPX pipeline now passes
`-loc-filename` separately and adding the directive would double-shift
diagnostics.

The fix has a small precursor chain on `main`; bringing the headline
`#14715` alone doesn't apply cleanly because subsequent PRs introduced
the test files and machinery the fix's diff targets. Included PRs
(chronological):

- #14697 — test: show single context melange loses ppx snippet previews
- #14698 — test: show single context reason+melange loses ppx snippet
previews
- #14708 — test: accept ppx loc-filename in fixtures
- #14706 — **fix**: preserve original ppx source locations (introduces
`-loc-filename`)
- #14714 — test: reproduce reason source location regression
- #14715 — **fix**: avoid line directive when passing `-loc-filename`
@Alizter Alizter added this to the 3.25.0 milestone Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

melange Melange rules and generator preprocessing Issue linked to preprocessing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants