You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Linter diagnostics on library-defined model properties are dropped #12558
A linter diagnostic targeting a property declared in a library model is silently dropped when that model is used by a project operation. This is not the template-instantiation case in #11861: neither the property nor its type comes from a user-supplied template argument.
A rule that reports on SharedQuery.top (for example, one checking query parameters on collection GETs) produces no diagnostic. The target's source is in the library, so the linter filters it out instead of surfacing it at the operation's use site.
Linter diagnostics targeting properties declared in library models are discarded even when a project operation directly uses those properties. This creates a blind spot for rules that should report actionable diagnostics at the project use site.
The affected component is the compiler's linter diagnostic pipeline. The likely cause is project/library filtering based only on the diagnostic target's declaration source: SharedQuery.top is classified as library-owned, so the diagnostic is dropped without relocating or associating it with the project operation that spreads the model.
This is related to #1997's broader request to show library diagnostics at their use site. #11861 has similar symptoms but a distinct template-instantiation path; this report covers direct use of a non-template library model. The playground preserves the reported source shape, but reproducing the source-context filtering requires placing SharedQuery in an actual library package.
📝 Suggested next steps
Add a compiler linter regression test with a library-defined non-template model spread into a project operation.
Determine the project use-site target or trace that should retain the diagnostic without exposing unrelated library-internal diagnostics.
Activity
github-actions commentedon Nov 12, 2026
🎯 Issue Triage
Linter diagnostics targeting properties declared in library models are discarded even when a project operation directly uses those properties. This creates a blind spot for rules that should report actionable diagnostics at the project use site.
Category: Bug
Area:
compiler:core🔗 [Playground Reproduction]((typespec.io/redacted)
📋 Reproduction code
🔍 Analysis
The affected component is the compiler's linter diagnostic pipeline. The likely cause is project/library filtering based only on the diagnostic target's declaration source:
SharedQuery.topis classified as library-owned, so the diagnostic is dropped without relocating or associating it with the project operation that spreads the model.This is related to #1997's broader request to show library diagnostics at their use site. #11861 has similar symptoms but a distinct template-instantiation path; this report covers direct use of a non-template library model. The playground preserves the reported source shape, but reproducing the source-context filtering requires placing
SharedQueryin an actual library package.📝 Suggested next steps