Skip to content

Unexpected find result concerning included module #6153

@n-osborne

Description

@n-osborne

Expected Behavior

Dune should build the project or tell me what's wrong.

Actual Behavior

$ dune build
Internal error, please report upstream including the contents of _build/log.
Description:
  ("Unexpected find result", { found = Not_found; lib.name = "lib_core" })
Raised at Stdune__code_error.raise in file "otherlibs/stdune/code_error.ml",
  line 11, characters 30-62
Called from Fiber__scheduler.exec in file "src/fiber/scheduler.ml", line 69,
  characters 8-11
-> required by ("<unnamed>", ())
-> required by ("<unnamed>", ())
-> required by ("<unnamed>", ())
-> required by ("load-dir", In_build_dir "default/bin")
-> required by ("<unnamed>", ())
-> required by ("build-alias", { dir = "default"; name = "default" })
-> required by ("toplevel", ())

I must not crash.  Uncertainty is the mind-killer. Exceptions are the
little-death that brings total obliteration.  I will fully express my cases.
Execution will pass over me and through me.  And when it has gone past, I
will unwind the stack along its path.  Where the cases are handled there will
be nothing.  Only I will remain.

Reproduction

I manage to come up with a minimal example:

  1. download and unzip dune-bug.zip
  2. cd dune-bug
  3. dune build

There is a package pack with

  • a private module lib_core
  • a package pack containing
  • a library lib_dep that open lib_core
  • a top-level library LIB with a public name, opening lib_dep and including lib_core

And, in another directory bin, a program depending on this package pack.

❗ The problem occurs when there is a dune-project file in the bin directory.

Specifications

  • Version of dune (output of dune --version): 3.3.1
  • Version of ocaml (output of ocamlc --version) 5.0.0~alpha1
  • Operating system (distribution and version): Manjaro

Additional information

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions