Fix module type strengthen - #1485
Open
jonludlam wants to merge 3 commits into
Open
Conversation
[include module type of M], where M belongs to a wrapped library, re-exports M's module types as paths rather than expanding them. Such a module type has no expansion of its own, so no page is generated for it, and references to it have to link to the module type that does have one. The spec line does. The links from the value that came in through the same include do not - they point at a page that was never generated. The expected output below records that. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Strengthening replaces a module type by a path back to the prefix, so it no longer has an expansion of its own. Paths pointing at it were left alone, so references resolved to a module type with no page. Modules already handle this: Strengthen collects the ids it strengthened and Subst.path_invalidate_module records them in a field of its own, so that resolved_module_path can re-resolve those paths through the prefix. Give module types the same treatment. That path was previously unusable because Cpath.unresolve_resolved_module_type_path returned `Local unchanged, where the module version returns the unresolved `Local, so unresolving an invalidated path looped. Make the two agree. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
jonludlam
force-pushed
the
fix-module-type-strengthen
branch
from
September 2, 2026 22:30
76cb914 to
0e25ba2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There was some missing logic in the strengthening code around module type aliases. This PR regularises the handling of module and module type aliases, and fixes some broken links.