Skip to content

Repo: Can't develop because of yarn1 #6150

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

Closed
liuxingbaoyu opened this issue Dec 2, 2022 · 9 comments · Fixed by #6162
Closed

Repo: Can't develop because of yarn1 #6150

liuxingbaoyu opened this issue Dec 2, 2022 · 9 comments · Fixed by #6162
Assignees
Labels
accepting prs Go ahead, send a pull request that resolves this issue has pr there is a PR raised to close this repo maintenance things to do with maintenance of the repo, and not with code/docs

Comments

@liuxingbaoyu
Copy link
Contributor

liuxingbaoyu commented Dec 2, 2022

Suggestion

There are some issues with yarn1 that will never be fixed, such as not being able to run any commands with yarn1 when there are unicode characters in the windows username.
This pretty much means that these users (like me) can't build, debug and develop at all.

Migrating to yarn3 seems like a good approach, it is actively maintained.

@liuxingbaoyu liuxingbaoyu added repo maintenance things to do with maintenance of the repo, and not with code/docs triage Waiting for team members to take a look labels Dec 2, 2022
@JoshuaKGoldberg JoshuaKGoldberg changed the title Repo: Migrate to yarn3 Repo: Can't develop because of yarn1 Dec 2, 2022
@JoshuaKGoldberg
Copy link
Member

Hmm, that doesn't sound great.

some issues with yarn1

I need more specificity please 😄. What are the exact list of issues that are blocking you from developing on us? For example...

not being able to run any commands with yarn1 when there are unicode characters in the windows username

Issue link please?

Btw, I renamed this issue because we might not necessarily go to yarn3. I've been using pnpm successfully in other projects. More investigation required.

@JoshuaKGoldberg JoshuaKGoldberg added the awaiting response Issues waiting for a reply from the OP or another party label Dec 2, 2022
@Josh-Cena
Copy link
Member

I strongly recommend Yarn3. It has a better CLI interface. It supports plugins. By switching to the node-modules mode, you basically get everything you miss from the old days (easy debugging by hacking node_modules; hoist-everything, which Docusaurus actually relies on because it shares contexts between packages; no cross-platform issues you get with symlinks). While the performance gains of pnpm is not that significant because you won't run install every hour.

@liuxingbaoyu
Copy link
Contributor Author

image
yarnpkg/yarn#7939
I opened a pr, but unfortunately it was not merged.

@JoshuaKGoldberg
Copy link
Member

strongly recommend Yarn3

Cool, those points sound good to me 😄 and I'm convinced. Since this is a pretty farreaching change also want to hear from @bradzacher @JamesHenry - especially on how it interacts with Nx, if at all.

@JamesHenry
Copy link
Member

It's less Nx and more Lerna that comes to mind for this, but for that reason I think it's great! It would give me a real world repo to dogfood on. We focused a lot on pnpm recently on the lerna side and it is in a good state now, but yarn 2+ hasn't yet been in focus. So maybe I'll take this one and verify that everything looks good across Nx and Lerna?

@bradzacher
Copy link
Member

As long as we keep the node_modules folder to patch locally and poke around in I'm good with upgrading.
We have some patches we need to apply to TS types for our repo to work.

I also tend spend a lot of time looking at our dependencies' code whilst working (tsutils and eslint in particular) so that is something important to me to be able to keep doing.

Plus I personally never really liked the external linking thing considering they have to hack and patch packages on install (like TS) to make that work.

@JamesHenry
Copy link
Member

Thanks @bradzacher - that's a great call out, we will not use any of the PnP features etc, the usage needs to match how we do things today.

If that's not adequately doable in yarn 3, then probably npm v9 workspaces make the most sense, if yarn 1 is proving a barrier to contributions?

@JamesHenry JamesHenry self-assigned this Dec 3, 2022
@Josh-Cena
Copy link
Member

If that's not adequately doable in yarn 3

Yarn3 + node-modules mode will behave almost exactly like today.

@liuxingbaoyu
Copy link
Contributor Author

If that's not adequately doable in yarn 3

This is possible. Except that the commands are different from yarn1, other changes are not significant. (babel is doing this)

@JamesHenry JamesHenry added has pr there is a PR raised to close this and removed triage Waiting for team members to take a look labels Dec 3, 2022
@JoshuaKGoldberg JoshuaKGoldberg added accepting prs Go ahead, send a pull request that resolves this issue and removed awaiting response Issues waiting for a reply from the OP or another party labels Dec 3, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepting prs Go ahead, send a pull request that resolves this issue has pr there is a PR raised to close this repo maintenance things to do with maintenance of the repo, and not with code/docs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants