Skip to content

test(melange): show single context melange loses ppx snippet previews - #14697

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

anmonteiro merged 1 commit into
ocaml:mainfrom
anmonteiro:anmonteiro/test-repro-melange-ppx

Conversation

@anmonteiro

Copy link
Copy Markdown
Collaborator

No description provided.

@anmonteiro anmonteiro added melange Melange rules and generator single-context-universal labels May 24, 2026
@anmonteiro
anmonteiro merged commit 26985a6 into ocaml:main May 24, 2026
29 checks passed
@anmonteiro
anmonteiro deleted the anmonteiro/test-repro-melange-ppx branch May 24, 2026 21:09
shonfeder pushed a commit that referenced this pull request Jun 11, 2026
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