Skip to content

module artifact targets %{cmi:...} etc. crash on duplicate leaf module names #14496

@Alizter

Description

@Alizter

Under (include_subdirs qualified), building any module artifact pform target (%{cmi:...}, %{cmo:...}, %{cmx:...}, %{cmt:...}, %{cmti:...}) crashes with an internal error when two qualified subdirectories define modules with the same leaf name:

Internal error! ...
Description:
  ("Map.add_exn: key already exists", { key = "Group" })

The normal build (dune build @check) of the same stanza succeeds — only the artifact-target lookup fails.

Cram repro forthcoming in a follow-up PR adding test/blackbox-tests/test-cases/include-qualified/module-artifact-targets.t.

Also reproduces in this repo: dune build %{cmi:bin/main} hits the same crash because bin/ uses (include_subdirs qualified) and contains four group.ml files (bin/{coq,rpc,tools,pkg}/group.ml).

Metadata

Metadata

Assignees

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions