Skip to content

Conversation

@amcasey
Copy link
Member

@amcasey amcasey commented Jun 30, 2021

disableReferencedProjectLoad was 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 disableSourceOfProjectReferenceRedirect is 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.

@typescript-bot typescript-bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Jun 30, 2021
@amcasey
Copy link
Member Author

amcasey commented Jun 30, 2021

I'm still working on tests, but I believe the product code is ready for buddy testing.
cc @DanielRosenwasser

@amcasey amcasey marked this pull request as ready for review July 1, 2021 18:45
@amcasey
Copy link
Member Author

amcasey commented Jul 1, 2021

If you look at the diff for the fourth commit, you can see the comments flagging the baselines affected by this change.

@amcasey amcasey requested a review from andrewbranch July 1, 2021 20:14
Copy link
Member

@andrewbranch andrewbranch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the IRL refresher on what all these options mean!

@amcasey amcasey merged commit 4d5978d into microsoft:main Jul 6, 2021
@amcasey amcasey deleted the FARLoading branch July 6, 2021 22:22
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants