Skip to content

fix: rebuild consumers after private module interface changes - #16204

Draft
Alizter wants to merge 2 commits into
ocaml:mainfrom
Alizter:push-rvnyvqnxrump
Draft

fix: rebuild consumers after private module interface changes#16204
Alizter wants to merge 2 commits into
ocaml:mainfrom
Alizter:push-rvnyvqnxrump

Conversation

@Alizter

@Alizter Alizter commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

Description

Track both public and hidden CMI directories in library compilation dependencies. This ensures that changing a private module interface invalidates consumers which read it through a public module alias, instead of leaving stale artifacts that fail during linking.

The regression test added in #16174 now succeeds.

Related Issue and Motivation

Fixes #16071.

@Alizter
Alizter force-pushed the push-rvnyvqnxrump branch from 94f3023 to 1a4c702 Compare August 25, 2026 14:14
Signed-off-by: Ali Caglayan <alizter@gmail.com>
@Alizter
Alizter force-pushed the push-rvnyvqnxrump branch from 1a4c702 to be25f20 Compare August 25, 2026 14:20
Replace hidden CMI directory globs with exact dependencies derived from the library module set. This preserves private-interface invalidation without eagerly building unrelated public or virtual-library wrapper CMIs.

Signed-off-by: Ali Caglayan <alizter@gmail.com>
@Alizter
Alizter force-pushed the push-rvnyvqnxrump branch from a448897 to a5365ff Compare August 25, 2026 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Editing a (private_modules ...) interface does not rebuild consumers; the build then fails with "inconsistent assumptions over interface"

1 participant