ocaml / ocaml/dune

no-cmx-file warning emitted for external dependency after adding internal library

Open
#5,486 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Expected Behavior

No warnings!

Actual Behavior

Warning 58 [no-cmx-file] emitted for modules from external dependency (jsoo-react):

opam exec -- dune build @@default
File "_none_", line 1:   
Warning 58 [no-cmx-file]: no cmx file was found in path for module React, and its interface was not compiled with -opaque
File "_none_", line 1:
Warning 58 [no-cmx-file]: no cmx file was found in path for module React__Dom_html, and its interface was not compiled with -opaque

Reproduction

git clone git@github.com:glennsl/jsoo-react-no-cmx-file-repro
cd jsoo-react-no-cmx-file-repro
make create-switch
make init
make build

Specifications

  • Version of dune (output of dune --version): 2.9.3
  • Version of ocaml (output of ocamlc --version): 4.13.1
  • Operating system (distribution and version): Arch Linux

Additional information

Repository will full repro and verbose output at: https://github.com/glennsl/jsoo-react-no-cmx-file-repro
Commit with minimal change causing the problem at: https://github.com/glennsl/jsoo-react-no-cmx-file-repro/commit/634b3b26c76b8ff0e5fef63adeee703208a1ec5e

It was speculated on Discord that this could have something to do with jsoo-react having implicit_transitive_deps set to false, but removing it made no difference.

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.

Research direction

Clone the linked jsoo-react-no-cmx-file-repro repository and run make create-switch, make init, and make build, then inspect the verbose output around the reported Warning 58 messages. Compare the minimal change in commit 634b3b26c76b8ff0e5fef63adeee703208a1ec5e and verify that building after the fix emits no warnings for the external React modules.

Written by the indexing model from the issue text.

Assessment

Tech stack
ocaml
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.