Merged
Conversation
|
Congrats for all this work!
I find the explanation super easy to read and digestible, especially if
compared with the ton of details it took to make this apparently simple
goal reachable.
|
This was referenced Sep 15, 2025
Member
|
All PRs have now been merged, so I think it is time to approve the RFC :-) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rendered version. The first proof-of-concept of this work was presented at OCaml Workshop 2022.
The OCaml compiler distribution requires the Standard Library to be stored in a fixed location, specified when the compiler itself was compiled. Executables produced by the bytecode compiler (
ocamlc) by default also require the interpreter (ocamlrun) and the Standard Library to be stored in a similarly-fixed location.A consequence of this is that in order to "move" the compiler to a new location, it is necessary to build a new compiler from scratch, configured with the new location, and then recompile any bytecode executables which were built with the previous compiler.
This can be readily seen in
opamtoday:ocamlc.bytecannot be run, because the interpreter specified in its "shebang" line (#!/home/dra/work/_opam/bin/ocamlrun) no longer exists.ocamlc.optcan be run, but returns the original location of the Standard Library, which no longer exists, rather than the new location of the files in/home/dra/new-work/_opam/lib/ocaml.Relocatable OCaml proposes to fix this. An intended consequence of the proposal here is that not only can the directory containing a compiler installation be moved, but it may also be copied, specifically: