Fix spurious circular-base-type diagnostics after invalid model is usage#10692
Merged
Conversation
Agent-Logs-Url: https://github.com/microsoft/typespec/sessions/4badfa04-1b8e-435e-aeb1-53cb7df6dcc4 Co-authored-by: timotheeguerin <1031227+timotheeguerin@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix early-return errors in checkModelIs function
Fix spurious May 14, 2026
circular-base-type diagnostics after invalid model is usage
commit: |
Member
|
@copilot add changelog |
Agent-Logs-Url: https://github.com/microsoft/typespec/sessions/5a200c04-3879-41fe-bcc2-3d69183cd2cd Co-authored-by: timotheeguerin <1031227+timotheeguerin@users.noreply.github.com>
Contributor
Author
Added the changelog entry in |
|
You can try these changes here
|
markcowl
approved these changes
May 14, 2026
…8-52-27.md Co-authored-by: Mark Cowlishaw <1054056+markcowl@users.noreply.github.com>
Contributor
|
All changed packages have been documented.
Show changes
|
markcowl
requested changes
May 14, 2026
markcowl
approved these changes
May 14, 2026
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.
checkModelIsstarted a base-type pending resolution but did not always finish it on early error returns. This could leak pending state and cause unrelated latermodel isreferences to report a falsecircular-base-typediagnostic.Checker: close pending resolution on all error exits
checkModelIsinpackages/compiler/src/core/checker.tsto call:pendingResolutions.finish(modelSymId, ResolutionKind.BaseType)return undefinedpath:iswith a model expressionTypeReferencepathisexpression pathRegression coverage: prevent duplicate/spurious diagnostics
packages/compiler/test/checker/model.test.tsto verify invalidmodel isdoes not leave resolver state behind.is-modelerror is emitted when another model later references the invalid model.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
telemetry.astro.build/home/REDACTED/.n/bin/node node /home/REDACTED/work/typespec/typespec/website/node_modules/.bin/../astro/bin/astro.mjs build sh -c ebsite/src/content/docs/docs/emitters/openapi3/reference node bin/node ld.json && pnpm node bash /.bin/node sh /nod�� tspd --enable-experimental gen-extern-signature . node 2/dist/node-gyp-bin/sh r --no-emit l/reference /.bin/node node(dns block)If you need me to access, download, or install something from one of these locations, you can either: