Repository navigation
fix: treat all compilers >= 5.5 as relocatable - #15444
Conversation
Fixes ocaml#15443 Signed-off-by: Ali Caglayan <[email protected]>
punchagan
left a comment
There was a problem hiding this comment.
The code change looks reasonable to me, but I didn't follow why we completely replaced the part testing depending on the relocatable package.
|
@punchagan The relocatable package is a virtual package in the vanilla opam repository that servers as a marker for an opam switch. Non-relocatable packages such as older compilers and a few other user packages are marked as conflicting with this virtual package. The previous heuristic assumed that any solution including a relocatable compiler in the vanilla opam repository would have this package in it's solution. This doesn't seem to be the case since the release of 5.5, and looking back it doesn't seem like it was ever the case even for the alpha releases. This is likely a misunderstanding on my part on the setup for the relocatable compiler in the vanilla opam repository which is slightly different to that of the previous overlay repository. There are other markers like |
ElectreAAS
left a comment
There was a problem hiding this comment.
Aside from my small comment, looks good :)
Co-authored-by: Ambre Austen Suhamy <[email protected]> Signed-off-by: Ali Caglayan <[email protected]>
Signed-off-by: Ali Caglayan <[email protected]>
Signed-off-by: Ali Caglayan <[email protected]>
CHANGES: ### Fixed - Fix an internal error (`modules_and_obj_dir: failed lookup`) when generating `js_of_ocaml` archive rules for a dune file that defines two libraries with the same name distinguished by mutually exclusive `enabled_if` clauses, as `ocaml-re` does for `ppx_expect_common` (ocaml/dune#14904, fixes ocaml/dune#14775, @vouillon) - Fix passing environment variables to formatter actions (ocaml/dune#15386, @anmonteiro) - Fix missing source dependency in the sandbox when preprocessing Melange sources (ocaml/dune#15395, @anmonteiro) - Treat OCaml compiler packages version 5.5 or newer as relocatable so their installations do not use the toolchain cache (ocaml/dune#15444, fixes ocaml/dune#15443, @Alizter) - Fix `build_runtime_flags` given in a `js_of_ocaml`/`wasm_of_ocaml` field of an executable being silently ignored in separate compilation mode: such executables were given the workspace-shared standalone runtime, which is built with the default flags. Executables customizing `build_runtime_flags` now get their own standalone runtime again. (ocaml/dune#15455, @hhugo) - Use installed filenames for local package binaries in `%{bin:...}` PATH layouts on Windows (ocaml/dune#15518, fixes ocaml/dune#15512, @Alizter) ### Changed - Revert sandboxing Melange rules by default in the `(library ..)` and `(melange.emit ..)` stanzas. In Melange libraries with many modules, sandbox creation / destruction dominates build time and adds significant overhead to build time (ocaml/dune#15418, @anmonteiro)
CHANGES: ### Fixed - Fix an internal error (`modules_and_obj_dir: failed lookup`) when generating `js_of_ocaml` archive rules for a dune file that defines two libraries with the same name distinguished by mutually exclusive `enabled_if` clauses, as `ocaml-re` does for `ppx_expect_common` (ocaml/dune#14904, fixes ocaml/dune#14775, @vouillon) - Fix passing environment variables to formatter actions (ocaml/dune#15386, @anmonteiro) - Fix missing source dependency in the sandbox when preprocessing Melange sources (ocaml/dune#15395, @anmonteiro) - Treat OCaml compiler packages version 5.5 or newer as relocatable so their installations do not use the toolchain cache (ocaml/dune#15444, fixes ocaml/dune#15443, @Alizter) - Fix `build_runtime_flags` given in a `js_of_ocaml`/`wasm_of_ocaml` field of an executable being silently ignored in separate compilation mode: such executables were given the workspace-shared standalone runtime, which is built with the default flags. Executables customizing `build_runtime_flags` now get their own standalone runtime again. (ocaml/dune#15455, @hhugo) - Use installed filenames for local package binaries in `%{bin:...}` PATH layouts on Windows (ocaml/dune#15518, fixes ocaml/dune#15512, @Alizter) ### Changed - Revert sandboxing Melange rules by default in the `(library ..)` and `(melange.emit ..)` stanzas. In Melange libraries with many modules, sandbox creation / destruction dominates build time and adds significant overhead to build time (ocaml/dune#15418, @anmonteiro)
Description
Treat compiler packages with version >= 5.5.0 as relocatable package installs, so Dune does not route them through the toolchain cache. Keep the existing legacy marker handling for older relocatable compiler packages.
Related Issue and Motivation
OCaml 5.5 and newer compiler packages are relocatable by version, and the previous solution-wide marker heuristic misses that shape.
Fixes #15443
Checklist