Skip to content
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

[Bug]: Typescript/PnP: "Find all references"/rename refactoring does not work across project references #3176

Open
1 task done
andreialecu opened this issue Jul 26, 2021 · 2 comments
Labels
bug Something isn't working upholded Real issues without formal reproduction

Comments

@andreialecu
Copy link
Contributor

andreialecu commented Jul 26, 2021

Self-service

  • I'd be willing to implement a fix

Describe the bug

One of the benefits of using project references with typescript is that it allows rename refactoring and finding all references of certain exports across all consumers.

It appears however that when PnP is enabled and a shared project has any peer dependencies (and thus becomes a virtual), this functionality is lost.

Please see more in the README of the repro at: https://github.com/andreialecu/yarn-repro-references

To reproduce

Repro at: https://github.com/andreialecu/yarn-repro-references

Environment

  System:
    OS: macOS 11.4
    CPU: (8) arm64 Apple M1
  Binaries:
    Node: 15.9.0 - /private/var/folders/9p/k1yqxx0d7rn1nlztg_wm7sbw0000gn/T/xfs-72df935c/node
    Yarn: 2.4.2 - /private/var/folders/9p/k1yqxx0d7rn1nlztg_wm7sbw0000gn/T/xfs-72df935c/yarn
    npm: 7.7.4 - ~/.nvm/versions/node/v15.9.0/bin/npm

Additional context

Related: #1932 which was fixed via arcanis/TypeScript#4

Also some related discussion on discord at: https://discord.com/channels/226791405589233664/226793713722982400/869138563080531978

@andreialecu andreialecu added the bug Something isn't working label Jul 26, 2021
@yarnbot
Copy link
Collaborator

yarnbot commented Aug 25, 2021

Hi! 👋

This issue looks stale, and doesn't feature the reproducible label - which implies that you didn't provide a working reproduction using Sherlock. As a result, it'll be closed in a few days unless a maintainer explicitly vouches for it or you edit your first post to include a formal reproduction (you can use the playground for that).

Note that we require Sherlock reproductions for long-lived issues (rather than standalone git repositories or similar) because we're a small team. Sherlock gives us the ability to check which bugs are still affecting the master branch at any given point, and decreases the amount of code we need to run on our own machines (thus leading to faster bug resolutions). It helps us help you! 😃

If you absolutely cannot reproduce a bug on Sherlock (for example because it's a Windows-only issue), a maintainer will have to manually add the upholded label. Thanks for helping us triaging our repository! 🌟

@yarnbot yarnbot added the stale Issues that didn't get attention label Aug 25, 2021
@merceyz merceyz added the upholded Real issues without formal reproduction label Aug 25, 2021
@yarnbot yarnbot removed the stale Issues that didn't get attention label Aug 25, 2021
@andreialecu
Copy link
Contributor Author

andreialecu commented Jan 29, 2023

This issue has been really affecting our DX lately :(

We've split our projects across multiple workspaces, and making any change in a referenced project is not picked up by TypeScript until doing a "TypeScript: Restart TS Server" from the VSCode palette.

It doesn't see newly exported classes and such, so auto-fix imports are not working. Restarting TS Server every time has been a nuisance, considering it takes almost a minute in our project.

It seems I will have to switch to a non-PnP linker until a solution is found. 😢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upholded Real issues without formal reproduction
Projects
None yet
Development

No branches or pull requests

3 participants