-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using dkml-base-compiler instead of ocaml-base-compiler #327
Comments
Hi @jonahbeckford. I'm afraid that's currently not possible since the compiler names are hardcoded because for dependency resolution these have to be special-cased. However, it should be possible to rework the code to e.g. allow overwriting the default name of the compiler and using the |
This changes the logic from hardcoding the compiler "base packages" to instead read the OPAM flags to check whether the package in question is a compiler in which case it will be considered a base package. It also adds code to check for packages whether they are `conf` packages, which could be used to check for virtual packages. Inspired by tarides#327, this would allow `dkml-base-compiler` to be considered a base package and not accidentally vendor it. However it doesn't yet allow using the DKML compiler, because the name of the `ocaml` conf package is still hardcoded with no way to override it (yet).
This changes the logic from hardcoding the compiler "base packages" to instead read the OPAM flags to check whether the package in question is a compiler in which case it will be considered a base package. It also adds code to check for packages whether they are `conf` packages, which could be used to check for virtual packages. Inspired by tarides#327, this would allow `dkml-base-compiler` to be considered a base package and not accidentally vendor it. However it doesn't yet allow using the DKML compiler, because the name of the `ocaml` conf package is still hardcoded with no way to override it (yet).
This changes the logic from hardcoding the compiler "base packages" to instead read the OPAM flags to check whether the package in question is a compiler in which case it will be considered a base package. It also adds code to check for packages whether they are `conf` packages, which could be used to check for virtual packages. Inspired by tarides#327, this would allow `dkml-base-compiler` to be considered a base package and not accidentally vendor it. However it doesn't yet allow using the DKML compiler, because the name of the `ocaml` conf package is still hardcoded with no way to override it (yet).
dkml-base-compiler is a new compiler package in the Opam repository. Among other things, it builds a cross-compiler for macOS (x86_64 + ARM64) and unofficially can build cross-compilers for Android (ARM32, etc.).
I can't figure out the command line options so that
dkml-base-compiler.4.12.1~v1.0.0
is used as the compiler duringopam monorepo lock
rather thanocaml-base-compiler.VERSION
.Context: For my own internal needs I have been using the dunified Opam repository but do not use the
opam monorepo
tools; instead I use Opam build command configuration so thatopam install .
usesdune -x darwin_arm64
to build every Opam package dependency. That style of cross-compilation may be too complicated for other people. So not only would I like others to useopam monorepo
withdkml-base-compiler
but I've got some "dkml-workflows" tooling I'll be releasing that will create "native" (including cross-compiled) artifacts on GitHub Actions.If needed, I have a Makefile that can be used to see the problems doing
opam monorepo lock
withdkml-base-compiler
:For now I'm hand editing the
.locked
file.The text was updated successfully, but these errors were encountered: