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

[Feature] PnPify (Typescript) for VSCode workspaces #1469

Closed
2 tasks
MrEfrem opened this issue Jun 11, 2020 · 6 comments
Closed
2 tasks

[Feature] PnPify (Typescript) for VSCode workspaces #1469

MrEfrem opened this issue Jun 11, 2020 · 6 comments
Labels
enhancement New feature or request stale Issues that didn't get attention waiting for feedback Will autoclose in a while unless more data are provided

Comments

@MrEfrem
Copy link
Contributor

MrEfrem commented Jun 11, 2020

  • I'd be willing to implement this feature
  • This feature can already be implemented through a plugin

Describe the user story

I develop a big system that includes many Git repos. All repos use Typescript and they're added to one VSCode workspace. I very often do refactoring on all repos together. Howerer, PnPify always installed in projects folders. So I can't refactor all repos together because PnPify can't process all .pnp.js at once.

Describe the solution you'd like

I want that it would be possible to install PnPify on the VSCode workspace level and it processes all .pnp.js at once.

Describe the drawbacks of your solution

I think that all projects in a workspace should use PnP, I.e. I guess it's impossible to mix projects with and without PnP.

Describe alternatives you've considered

There aren't alternatives that can satisfy it.

@MrEfrem MrEfrem added the enhancement New feature or request label Jun 11, 2020
@MrEfrem
Copy link
Contributor Author

MrEfrem commented Jun 19, 2020

@arcanis I meant that the PnPify would support this feature https://code.visualstudio.com/docs/editor/multi-root-workspaces. Is it possible to implement?

@missing1984
Copy link
Contributor

I've been orchestrating a similar setup, not a typical monorepo but a repo with many independent yarn projects. Would like to know if there's any way to make this better.

@arcanis
Copy link
Member

arcanis commented Sep 11, 2020

We'll need a repro we can just clone to be sure we're talking about the same thing, and more info as to what doesn't work exactly would be useful (and perhaps even why?).

Note that I've never used project references so I'm unlikely to make it a priority of mines, but the more info there is the more likely it is that someone will be able to find a fix if they want to address whatever the problem is.

@arcanis arcanis added the waiting for feedback Will autoclose in a while unless more data are provided label Sep 11, 2020
@yarnbot
Copy link
Collaborator

yarnbot commented Oct 11, 2020

Hi! 👋

It seems like this issue as been marked as probably resolved, or missing important information blocking its progression. As a result, it'll be closed in a few days unless a maintainer explicitly vouches for it.

@yarnbot yarnbot added the stale Issues that didn't get attention label Oct 11, 2020
@yarnbot yarnbot closed this as completed Oct 16, 2020
@doman412
Copy link

doman412 commented Jan 2, 2021

I'm having issues with this as well. I'm not sure if this is necessarily a yarn/berry issue or something that vscode is incapable of doing at the moment. My use case is that I have a single workspace for a backend that has multiple services, each with their own repo.

You should be able to repro this by creating a new workspace with multiple folders:

  • Open a new vscode window
  • cmd-palette: >Workspaces: Add Folder to Workspace
    • add 2 projects that use yarn2/pnp with the vscode sdk
  • Checking the .vscode/settings.json you should see:
    Screen Shot 2021-01-01 at 6 43 00 PM
    • this causes modules to not resolve

There is a related issue over at microsoft/vscode#108866 that didn't gain enough thumbs unfortunately.

@JackCA
Copy link

JackCA commented May 10, 2021

I also just tracked down my same issue to this.

Is it correct to say that in order to use yarn 2 pnp workspaces you must create a different vscode workspace per directory?

Also, this user says they have created a forked version of vscode's native tsserver to support his use case: microsoft/vscode#108866 (comment) but I haven't tried it personally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request stale Issues that didn't get attention waiting for feedback Will autoclose in a while unless more data are provided
Projects
None yet
Development

No branches or pull requests

6 participants