Apply disableReferencedProjectLoad to getOriginalLocationEnsuringConfiguredProject#44836
Merged
amcasey merged 4 commits intomicrosoft:mainfrom Jul 6, 2021
Merged
Apply disableReferencedProjectLoad to getOriginalLocationEnsuringConfiguredProject#44836amcasey merged 4 commits intomicrosoft:mainfrom
amcasey merged 4 commits intomicrosoft:mainfrom
Conversation
Member
Author
|
I'm still working on tests, but I believe the product code is ready for buddy testing. |
Member
Author
|
If you look at the diff for the fourth commit, you can see the comments flagging the baselines affected by this change. |
andrewbranch
approved these changes
Jul 6, 2021
Member
andrewbranch
left a comment
There was a problem hiding this comment.
Thanks for the IRL refresher on what all these options mean!
RyanCavanaugh
approved these changes
Jul 6, 2021
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
disableReferencedProjectLoadwas intended to prevent project loading during find-all-references (FAR), as an escape valve for teams with very large solutions. However, there's a case it doesn't cover - when the declaration is actually in another project but was pulled into the open project by project reference redirects, the "default" configured project containing the declaring file will be loaded, possibly causing a long delay or an OOM crash.Note that, while we don't want to load the declaring project, we do want to search it if it's already open.
There's also a weird corner case where
disableSourceOfProjectReferenceRedirectis enabled, but a .d.ts.map file exists, which causes the .ts file from the referenced project to be discovered anyway. When this happens, we use the .ts file if it's in some open project and the .d.ts file (which is definitely in an open project, or we wouldn't have found it) otherwise.