Type resolver experiement#10701
Draft
timotheeguerin wants to merge 9 commits into
Draft
Conversation
…le detection Add a centralized request-based type resolver (inspired by Swift's Evaluator) that provides: - Stack-based cycle detection with full cycle chain visibility - Result caching per (sym, kind) pair - Rich cycle diagnostics showing the complete dependency chain - Unified resolution lifecycle management This is Phase 1 of the checker circularity rearchitecture. The TypeResolver will progressively replace the scattered pendingResolutions pattern. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Integrate the TypeResolver into the checker for model extends/is, scalar extends, and operation is resolution. The TypeResolver provides stack-based cycle detection with full cycle chain visibility in non-template contexts. The old pendingResolutions flat set is retained for template contexts where the same model statement is legitimately re-entered with different type arguments. Both systems run in parallel during this migration phase. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…Resolver Add TypeResolver tracking alongside pendingResolutions for: - Alias type resolution (AliasTarget kind) - Const value resolution (ConstValue kind) - Model property type resolution (PropertyType kind) The TypeResolver stack now tracks these resolutions, building toward full cycle chain diagnostics. The old pendingResolutions remains for backward compatibility during the migration. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add TypeResolver tracking for template constraint resolution (Constraint kind). The stack-based resolver now tracks constraint resolution in non-template contexts alongside the existing pendingResolutions. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
All pendingResolutions usage sites now have corresponding TypeResolver tracking. The TypeResolver stack now covers: - BaseType (model extends/is, scalar extends, operation is) - AliasTarget (alias resolution, template container resolution) - ConstValue (const value resolution) - Constraint (template parameter constraints) - PropertyType (model property type resolution) The old PendingResolutions is retained for template-context cycle detection where flat-set semantics are needed. Both systems run in parallel. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… late-bound member resolution - Phase 6: ensureResolved now tracks deferred completions in TypeResolver for better debugging and diagnostics. assertNoPendingResolutions reports unresolved deferred completions. - Phase 7: getCanonicalResolvedMemberSymbol now tracks MemberType resolution in TypeResolver when triggering lateBindMembers, with cycle detection. - Phase 8: Full compiler test suite passes (3915 tests). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
# Conflicts: # packages/compiler/src/core/checker.ts
Contributor
|
❌ There is undocummented changes. Run The following packages have changes but are not documented.
Show changes |
commit: |
|
You can try these changes here
|
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.
No description provided.