Skip to content

feat(melange): deprecate melange.compile_flags in Dune 3.26 - #214

Closed
anmonteiro wants to merge 40 commits into
mainfrom
melange/deprecate-compile-flags
Closed

anmonteiro wants to merge 40 commits into
mainfrom
melange/deprecate-compile-flags

Conversation

@anmonteiro

@anmonteiro anmonteiro commented Sep 28, 2026 •

Copy link
Copy Markdown
Owner

Add melange.flags in Dune 3.26 and deprecate melange.compile_flags, retaining compatibility with older language versions. Leave melange.emit compilation flags unchanged.

Follow-up to #188.

Codex session: 019ea5b2-acde-7141-bcbd-e3c833c8eefe.

@anmonteiro
anmonteiro marked this pull request as ready for review September 28, 2026 01:55
@anmonteiro

Copy link
Copy Markdown
Owner Author

Validation: @check, @fmt, @runtest-melange, the workspace-env regression, and dune_lang tests pass. Full @runtest was also run before the implementation and failed on existing macOS FSEvents, signal-watcher, gcc lookup, and Nix code-signing problems. No unrelated test expectations were changed.

@anmonteiro anmonteiro changed the title feat(melange): deprecate melange.compile_flags in Dune 3.25 feat(melange): deprecate melange.compile_flags in Dune 3.26 Oct 2, 2026
shunueda and others added 27 commits October 3, 2026 23:31
Empty patches are rejected by Dune, while Opam accepts it as a no-op.
Add a cram reproducer for the regression from ocaml#16362, recording the
failure for a local package dependency under `(lang dune 2.0)` and a
successful 2.9 control.

Upstreams #216.

Signed-off-by: Antonio Nuno Monteiro <[email protected]>
Preserve the Dune 2.9 gate for explicitly requested installed packages
while allowing installed packages discovered through a local package's
library closure on older language versions.

Alternative to ocaml#16528.

Signed-off-by: Antonio Nuno Monteiro <[email protected]>
Make `Rules.Dir_rules.Alias_spec` abstract, exposing singleton
construction and list conversion instead of its `Appendable_list`
representation. Keep the reversal inside `Alias_spec` so `Load_rules` no
longer needs to know how expansions accumulate. Existing expansion order
and behavior are preserved.

Signed-off-by: Rudi Grinberg <[email protected]>
Signed-off-by: Antonio Nuno Monteiro <[email protected]>
Add a portable singleton check to Stdune.Map, with tests. Preparation
for ocaml#16498.

Signed-off-by: Antonio Nuno Monteiro <[email protected]>
Use Map.is_singleton for the single-context fallback in runtest.
Follow-up to ocaml#16533.

Signed-off-by: Antonio Nuno Monteiro <[email protected]>
Add the compatible singleton check to the bootstrap map wrapper and
avoid full cardinality scans. Follow-up to ocaml#16533.

Signed-off-by: Antonio Nuno Monteiro <[email protected]>
…16537)

Reproduce incorrect implementation/interface reader selection and
ambiguous lookup by filename without extension.

Test-only extraction from ocaml#16536; expected output records the existing
buggy behavior.

Signed-off-by: Antonio Nuno Monteiro <[email protected]>
Cover legacy Merlin lookup for unconventional filenames with an
interface and copy-line chains through filename aliases.

Test-only extraction from ocaml#16536; both cases pass on main.

Signed-off-by: Antonio Nuno Monteiro <[email protected]>
Reuse the expander directory for glob evaluation and relative result
paths.

Upstreams #127.

Signed-off-by: Antonio Nuno Monteiro <[email protected]>
Reuse the dependency expander's directory and project when evaluating
included dependency specifications.

Upstreams #86.

Signed-off-by: Antonio Nuno Monteiro <[email protected]>
…#16536)

Select the correct Merlin reader for preprocessed filenames while
preserving legacy fallback and copy-line lookup.

Fixes the reader-selection case covered by ocaml#16537; compatibility tests
are in ocaml#16540. Prerequisite for ocaml#16522.

Signed-off-by: Antonio Nuno Monteiro <[email protected]>
Use local-library metadata directly instead of converting through
generic library values.

Upstreams #137.

Signed-off-by: Antonio Nuno Monteiro <[email protected]>
This is a cram test to reproduce a bug where building a rule that runs a
binary fails with a symlink error, when the rule also has a `(deps ...)`
entry for the package that provides that binary.

Signed-off-by: Puneeth Chaganti <[email protected]>
This is a cram test to reproduce a bug where building an action that
runs a binary fails with a symlink error, when the rule also has a
`(deps ...)` entry for the package that provides that binary.

## Checklist

- [x] Tests added, if applicable.
- [ ] [Change log entry
added](../CONTRIBUTING.md#updating-the-changelog) for any user-facing
changes.
- [ ] Documentation added for any user-facing changes.
…6556)

This adds a failing test case that documents ocaml#16555

## Checklist

- [x] Tests added, if applicable.
- [ ] [Change log entry
added](../CONTRIBUTING.md#updating-the-changelog) for any user-facing
changes.
- [ ] Documentation added for any user-facing changes.
OCaml 5.6 only keeps the optimization hints of compilation units in a
bytecode executable when linked with -bytecode-hints.

Signed-off-by: Jérôme Vouillon <[email protected]>
Starting with OCaml 5.6, pass -bytecode-hints when linking the bytecode
executable compiled by js_of_ocaml and wasm_of_ocaml in whole program
mode, so that the optimization hints are available to them.

Signed-off-by: Jérôme Vouillon <[email protected]>
Starting with OCaml 5.6, pass -bytecode-hints when linking the bytecode
executable compiled by js_of_ocaml and wasm_of_ocaml in whole program
mode, so that the [optimization
hints](ocaml/ocaml#13438) are available to them.
Record acceptance of populated and empty directories declared as file
targets. Also demonstrate that changing only a cached directory target
declaration to a file target restores the old directory.

Use direct build commands and trace the shared-cache hit.

Signed-off-by: Ali Caglayan <[email protected]>
ppxlib 0.39 drops stdlib-shims from its dependency graph, breaking
the describe snapshots while Nix still uses ppxlib 0.38.

Signed-off-by: Ali Caglayan <[email protected]>
Alizter and others added 12 commits October 8, 2026 17:07
Temporarily cap development-only ppxlib at `< 0.39.0`. Version 0.39
drops `stdlib-shims`, breaking the `describe` snapshots while Nix still
uses 0.38.

Build/format checks, opam generation/lint, and `describe` tests pass.
Full tests have unrelated baseline Menhir/bubblewrap failures.
Revert ocaml#16562, refresh the Nix flake lock, and promote the ppxlib 0.39
describe snapshots.

Signed-off-by: Antonio Nuno Monteiro <[email protected]>
…caml#16571)

Verify that Merlin-only configuration changes update Merlin directives
without recompiling an up-to-date library.

Upstream version of #243.

Signed-off-by: Antonio Nuno Monteiro <[email protected]>
…aml#16572)

Cover dependency source directories shared by multiple consumers,
context-specific generated modules, and source-directory additions.

Upstream version of #244.

Signed-off-by: Antonio Nuno Monteiro <[email protected]>
Signed-off-by: Antonio Nuno Monteiro <[email protected]>
anmonteiro added a commit to ocaml/dune that referenced this pull request Oct 18, 2026
Add `melange.flags` for libraries and `env` stanzas in Dune 3.26,
deprecating `melange.compile_flags` while retaining compatibility.
`melange.emit` keeps `compile_flags`.

Upstreams anmonteiro#214; follow-up to #16501.

---------

Signed-off-by: Antonio Nuno Monteiro <[email protected]>
@anmonteiro

Copy link
Copy Markdown
Owner Author

Merged upstream as ocaml#16573.

@anmonteiro anmonteiro closed this Oct 25, 2026
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.

7 participants