Skip to content
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

Always build config.ml in the current opam switch #1245

Open
samoht opened this issue Oct 20, 2021 · 1 comment
Open

Always build config.ml in the current opam switch #1245

samoht opened this issue Oct 20, 2021 · 1 comment

Comments

@samoht
Copy link
Member

samoht commented Oct 20, 2021

This is currently the case if config.ml is at the root of the dune-workspace, as build.config contains:

(data_only_dirs universe)
...

But this is not true, if someone does call opam-monorepo lock manually from a different directory (like https://github.com/mirage/mirage-skeleton/blob/mirage-dev/Makefile#L64) to build a larger monorepo (here to be able to build all the configured unikernels in one go).

We should probably move this in dune-workspace.config - or create a workspace for config and make sure the duniverse directory is ignored in that worskpace.

@TheLortex
Copy link
Member

TheLortex commented Jan 5, 2023

We should probably move this in dune-workspace.config - or create a workspace for config and make sure the duniverse directory is ignored in that worskpace.

There's a lot of scaffolding needed to be able to ignore any duniverse folder in the workspace. I'm not even sure that's possible yet.

For that matter I'm thinking about not using dune to build the config.ml. The file being simple enough, it can be executed as a script, simply using ocaml config.ml. By adding two directives before the beginning of the file, we can execute configurations as is:

#use "topfind"
#require "mirage"

EDIT:
It's not that easy. We want config.ml to be linked with the library that was linked with the mirage executable in scope. It might be in the opam switch, but not necessarily (for example in tests).

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

No branches or pull requests

2 participants