Skip to content

[release/dev18.3] Ensure GetFirstRelatedDocumentId doesn't return non-source documents#81923

Merged
jasonmalinowski merged 1 commit intorelease/dev18.3from
backport/pr-81893-to-release/dev18.3
Jan 9, 2026
Merged

[release/dev18.3] Ensure GetFirstRelatedDocumentId doesn't return non-source documents#81923
jasonmalinowski merged 1 commit intorelease/dev18.3from
backport/pr-81893-to-release/dev18.3

Conversation

@github-actions
Copy link
Contributor

@github-actions github-actions bot commented Jan 8, 2026

Backport of #81893 to release/dev18.3

/cc @jasonmalinowski

Customer Impact

If the user adds a .cs file to one of their projects as additional files, we may break when we try to unify syntax trees for them, since the additional files don't actually have syntax trees.

Regression

Unclear; this might have been an older regression when we introduced this mechanism. The customer who reported it said itw as a regression but since they had made a lot of changes to their code around that time that would have exposed it.

Testing

Unit tests were added. They were validated to produce the same exception as is being reported from the customer.

Risk

Low.

The expectation of our "related" document helpers seems to be they
only operate on regular documents. If we didn't do this, and we have a
regular source file also being added as an additional file somewhere,
callers of this method get surprised.

Fixes https://developercommunity.visualstudio.com/t/Constant-Feature-X-is-currently-unava/11023066
@github-actions github-actions bot requested a review from a team as a code owner January 8, 2026 18:30
@jasonmalinowski jasonmalinowski self-assigned this Jan 8, 2026
@jasonmalinowski jasonmalinowski merged commit 64a0ad8 into release/dev18.3 Jan 9, 2026
26 checks passed
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.

2 participants