Repository navigation
Conversation
Signed-off-by: CarlOlson <CarlOlson@users.noreply.github.com>
Fix the review finding where a namespace entry compiled against dev aliases produced an interface incompatible with the exported namespace. Keep the internal namespace first for ordinary modules, and cover entry consumers with a clean and incremental build. Signed-off-by: CarlOlson <CarlOlson@users.noreply.github.com>
Why:
Dependency dev aliases can shadow local test modules after opening a
dependency namespace. Match the Rust fix while keeping namespace-entry
interfaces compatible with the namespace exported to consumers.
Representation modified (namespace interfaces):
Before (text):
Local modules and consumers use the same namespace, including dev aliases.
After (text):
Ordinary local modules use the full namespace in lib/bs.
Consumers and namespace entries use the filtered namespace in lib/ocaml.
Preserve internal namespace invalidation across publication failures. Add
include-precedence assertions and a changelog fragment. Validation passed:
48 OCaml unit tests and the full shared build-system suite, including the
dev-module and namespace-entry regressions.
Signed-off-by: CarlOlson <CarlOlson@users.noreply.github.com>
Changelog🐛 Bug fix
Semantic Diff3 commits · Full page Compile namespace entries against the public namespaced71a9fb · CarlOlson · Oct 27, 2026, 14:20 UTC Fix the review finding where a namespace entry compiled against dev aliases produced an interface incompatible with the exported namespace. Keep the internal namespace first for ordinary modules, and cover entry consumers with a clean and incremental build. Isolate dependency dev namespaces in OCaml rewatchc4a7b26 · CarlOlson · Oct 27, 2026, 14:29 UTC
Representation modified (namespace interfaces)
-Local modules and consumers use the same namespace, including dev aliases.
+Ordinary local modules use the full namespace in lib/bs.
+Consumers and namespace entries use the filtered namespace in lib/ocaml.Preserve internal namespace invalidation across publication failures. Add include-precedence assertions and a changelog fragment. Validation passed: 48 OCaml unit tests and the full shared build-system suite, including the dev-module and namespace-entry regressions. |
Thanks a lot for tracking this down and fixing both build systems! The diagnosis is right: the namespace module aliases the package's dev modules, so I'm hesitant about the two-map approach, though. It compiles two different I think one case still breaks: a namespace-entry package that has dev modules, where a test uses the entry module ( An alternative that avoids two versions of one interface: a separate dev-only namespace.
This makes dev modules private to their package. Another package can no longer reach them as Would you be up for reworking the PR in this direction? Your shell test is a good base for the regression test. I'd also add the namespace-entry case and a non-dev module that uses a dev module. For 12.3.2, the same change in the Rust rewatch alone should be a small backport. Happy to help, or to take it over if you prefer. |
Checklist
changes/README.md), or no release notes are needed and a maintainer should applychangelog:skip.git commit -s).