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

5.2.0~alpha1: ocamlc -pack changed the expected naming convention for the cmi files #12984

Closed
kit-ty-kate opened this issue Feb 21, 2024 · 3 comments · Fixed by #12987
Closed

Comments

@kit-ty-kate
Copy link
Member

The following test case works with OCaml 5.1 but fails with OCaml 5.2:

touch test.ml test.mli

ocamlc -c -o test.cmi test.mli
ocamlc -g -c -o test.d.cmo test.ml
ocamlc -g -pack -o pack.d.cmo test.d.cmo

with the following error message:

Error: I/O error: test.d.cmi: No such file or directory

I'm not seeing any related items in the changelog of 5.1.0~alpha1 so i believe this is an unexpected regression.

The test-case shown above can be seen with build-systems such as ocamlbuild.

@gasche
Copy link
Member

gasche commented Feb 21, 2024

My money is on #12389 and #12545.

@lthls
Copy link
Contributor

lthls commented Feb 21, 2024

There's no -for-pack involved ? I'm very much convinced that we shouldn't support the sequence of compilation commands shown above.
I'll try to look at ocamlbuild's code and see if I can make a patch.
Is there a specific package I can use to reproduce the error ?

@kit-ty-kate
Copy link
Member Author

There's no -for-pack involved ?

there is, i just wanted to make the test-case here as short as possible.

Is there a specific package I can use to reproduce the error ?

yes, i originally noticed this issue in Snowflake.0.02.03

Octachron added a commit that referenced this issue Feb 27, 2024
* Restore cmi companion specific notion of prefix
Octachron added a commit that referenced this issue Feb 27, 2024
* Restore cmi companion specific notion of prefix

(cherry picked from commit 33502d6)
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 a pull request may close this issue.

3 participants