-
Notifications
You must be signed in to change notification settings - Fork 12.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Find references even when TypeScript sub-projects not yet open #30823
Comments
Confirmed with TypeScript 3.5.0-dev.20190407 |
This is currently known issue in which if the file is not open or declaration maps are not present it cannot find all references in sibling projects. #28261 is wip for this but needs more work before can be merged in since we need to be smart about when to lookup symbol in other projects(as loading projects in most common scenarios is costly and can result in delay when someone does first time find all references) |
@RyanCavanaugh I believe the |
This blocks us from splitting our code into multiple smaller projects as (consistent!) renaming across the entire codebase is very important to us. We would love to have this feature! |
Personally, I will happily trade off performance for "Find all references" and "Rename symbol" that actually works. In https://github.com/strongloop/loopback-next, we have configured TypeScript to treat the entire monorepo as a single project, so that we can use "Find all references" and "Rename symbol". This setup works pretty well for us and I am not aware of any performance or memory limitation when working in VS Code. If the performance of #28261 is similar, then I would happily accept it. Why we want to migrate from our single-project setup to project references when VS Code experience is good now? The problem is that our build times are super slow. We are building each monorepo package independently, because each package has its own Anyhow. Is there a way how to finish #28261 sooner, possibly without performance optimizations and perhaps behind a new feature flag? |
I currently have a code base that uses composite projects and has 34 sub-projects. Having to open all 34 sub-projects to "Find all references" is a little tiring =/ |
Hi @mjbvz @RyanCavanaugh apologies in advance for the direct mention. Are there any plans to prioritise this? We've recently migrated a very large frontend codebase to sub-projects, and opening files from each before finding references isn't feasible, so we seem to be stuck with grepping for now, or switching to IntelliJ which doesn't seem to rely on TS server to do the references. Edit: I've just been pointed at #33287 so perhaps a fix is already in progress? |
I have a similar problem in a case implementing scenario described in the project references documentation. There is a root https://github.com/pablobirukov/vs-core-project-references |
For what it's worth, in order to get this to work, we had to add a "solution"
We were able to automate generating this list using meta-updater. See our meta-updater config for more details |
I did all, i created a root I found a hack, I added |
From microsoft/vscode#65102...
It seems like with a multiple-tsconfig.json setup, VS Code can't find all references. (Even though technically all of them should be "joined" via a root tsconfig.json that uses project references.)
Here's a minimal repro of my setup: https://github.com/dcecile/typescript-references-test
The text was updated successfully, but these errors were encountered: