Skip to content

OCaml 5.0: use the compiler META files when available#5824

Closed
Octachron wants to merge 1 commit intoocaml:mainfrom
Octachron:compiler_META
Closed

OCaml 5.0: use the compiler META files when available#5824
Octachron wants to merge 1 commit intoocaml:mainfrom
Octachron:compiler_META

Conversation

@Octachron
Copy link
Copy Markdown
Member

The compiler is considering the option to ship its own META file in ocaml/ocaml#11007 .

This change would remove the need for dune to generate dummy META files for libraries bundled with the compiler when ocamlfind is not installed.

This draft PR is a proof concept to check that dune can support this new installation process with few changes.

@nojb
Copy link
Copy Markdown
Collaborator

nojb commented Jun 3, 2022

Is this enough when neither opam nor ocamlfind are in the environment? Doesn't the compiler's $libdir need to be added to Dune's "load path" in that case?

@Octachron
Copy link
Copy Markdown
Member Author

I will check that use case, thanks for reminding me! But since dune needs to find META files for other libraries too, I expect that the change will also be sufficient in this case.

After a quick glance, dune uses ocamlpath @ $(ocamlc -where)/../../lib as findlib path when there is no ocamlfind information. Thus in this case, the compiler should be configure to install META files in either the location defined by ocamlpath or in the same location used by opam.
I will have a better look on Monday.


let has_sandboxed_otherlibs version = version >= (5, 0, 0)

let has_META_files version = version >= (5, 0, 0)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just adding a note in order not to forget - this is not part of 5.0, right?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is expected to land in 5.0.0~alpha1

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice! just a reminder not to merge this until it's the case then.

@emillon
Copy link
Copy Markdown
Collaborator

emillon commented Jun 14, 2022

thanks for this. this will probably supersede (part of) #4197 .

@Octachron
Copy link
Copy Markdown
Member Author

Superseded by #5916

@Octachron Octachron closed this Jun 27, 2022
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.

4 participants