Skip to content

test(melange): reproduce reason source location regression#14714

Merged
anmonteiro merged 1 commit into
ocaml:mainfrom
anmonteiro:anmonteiro/melange-reason-location-repro
May 25, 2026
Merged

test(melange): reproduce reason source location regression#14714
anmonteiro merged 1 commit into
ocaml:mainfrom
anmonteiro:anmonteiro/melange-reason-location-repro

Conversation

@anmonteiro

Copy link
Copy Markdown
Collaborator

No description provided.

@anmonteiro anmonteiro force-pushed the anmonteiro/melange-reason-location-repro branch 4 times, most recently from 64d4dbf to 2f44258 Compare May 25, 2026 05:28
@anmonteiro anmonteiro marked this pull request as ready for review May 25, 2026 05:28
@anmonteiro anmonteiro added melange Melange rules and generator single-context-universal labels May 25, 2026
Signed-off-by: Antonio Nuno Monteiro <anmonteiro@gmail.com>
@anmonteiro anmonteiro force-pushed the anmonteiro/melange-reason-location-repro branch from 2f44258 to a1e8115 Compare May 25, 2026 05:44
@anmonteiro anmonteiro merged commit 7ef623e into ocaml:main May 25, 2026
1 of 2 checks passed
@anmonteiro anmonteiro deleted the anmonteiro/melange-reason-location-repro branch May 25, 2026 05:44
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 single-context-universal

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants