Add GetLanguageService overload for binary compatibility#27557
Merged
sharwell merged 1 commit intodotnet:dev15.8-preview3from Jun 7, 2018
Merged
Add GetLanguageService overload for binary compatibility#27557sharwell merged 1 commit intodotnet:dev15.8-preview3from
sharwell merged 1 commit intodotnet:dev15.8-preview3from
Conversation
jinujoseph
approved these changes
Jun 7, 2018
Contributor
|
Approved to merge for 15.8.Preview3 (To unblock insertion) |
| public static TLanguageService GetLanguageService<TLanguageService>(this TextDocument document) where TLanguageService : class, ILanguageService | ||
| => document?.Project?.LanguageServices?.GetService<TLanguageService>(); | ||
|
|
||
| // ⚠ Verify IVTs do not use this method before removing it. |
Member
There was a problem hiding this comment.
I both love the emoji and fear for what it will break.
Contributor
Author
There was a problem hiding this comment.
I've used it in a few other cases and it seems to work great.
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.
Failed TypeScript build:
https://devdiv.visualstudio.com/DevDiv/_git/VS/pullrequest/126057?_a=overview
Customer scenario
Internal product build failed.
Bugs this fixes
Here is the internal insertion PR that failed:
https://devdiv.visualstudio.com/DevDiv/_git/VS/pullrequest/126057?_a=overview
Workarounds, if any
N/A
Risk
Low.
Documentderives fromTextDocument, so the pair of overloads will not result in ambiguities at the call site.Performance impact
No observable impact.
Is this a regression from a previous update?
Yes.
Root cause analysis
We have a large number of
InternalsVisibleTo(IVT) attributes applied with no validation running during the pull request builds. There is no reasonable expectation that this type of failure will be avoided, so we get to fix it when things fail during insertions.How was the bug found?
Insertion build.
Test documentation updated?
N/A