ocaml / ocaml/dune

Generate cmi files that match the input

Open
#8,709 2 comments 1 reaction 1 assignee View on GitHub

@ElectreAAS is already working on this.

Since Dec 21, 2023.

build
Dominant language
OCaml
Stars
1.9k
Forks
500
Avg merge
15h 21m
Merged PRs (30d)
277

Description

Expected Behavior

A recent unintended regression in the compiler's trunk branch caused QCheck to not build anymore: https://github.com/ocaml/ocaml/issues/12543
This was quickly fixed, however the change surfaced an underlying file naming issue in dune that you may be interested in.

For context, QCheck uses file names such as src/core/QCheck2.ml with two capital letters 'Q' and 'C', so that the module can be refered to as QCheck2 in OCaml code.

With that in mind, the regression revealed that:

the interface for QCheck2.ml generated by dune is named qCheck2.cmi instead of QCheck2.cmi, so with the new handling of filenames the compiler ignores it.
I think dune should be patched so that it stops generating output filenames that do not match the input.

Actual Behavior

the interface for QCheck2.ml generated by dune is named qCheck2.cmi

Reproduction

opam install qcheck-core or

  1. git clone git@github.com:c-cube/qcheck.git
  2. cd qcheck
  3. dune build @install

Specifications

  • Version of dune (output of dune --version): dune.3.10.0
  • Version of ocaml (output of ocamlc --version) ocaml.5.2.0
  • Operating system (distribution and version): Linux - Mint 5.15.0-84-generic + Debian 11 + Linux/macOS/Windows through GitHub actions

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.