-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Yarn v2 / PnP Support #8164
Comments
I need this so bad. Still looks quite far away :( |
@rwjblue Hi, it has been a while. Are you still pursuing this feature? What are the main blockers? |
I am experimenting with the PnP API to make ember-cli compatible with Yarn PnP. I might open a draft PR at some point to show the progress and get ideas from the community |
How is Yarn PnP compatibility going? |
@sesam for the time being, I use https://github.com/yarnpkg/berry/tree/master/packages/plugin-node-modules @ef4, do you believe embroider will change things regarding yarn PNP ? |
Not sure if I should post this here or make another issue but Seems like v2 of the
|
I spent some time trying to test embroider under PNP and it seems to be blocked on issues within ember-cli itself. For example, I also hit stefanpenner/resolve-package-path#24 The process of debugging this stuff is fairly painful. yarn 2 seems... not really quite done yet. Just getting it to execute ember-cli inside the node debugger was an adventure, requiring hacks. And I still have not managed to get yarn linking of the embroider monorepo's packages into a test app working properly. |
@ef4 I have had similar experiences trying to use yarn 2. For what it's worth, PnP was introduced in yarn classic. You might have a better time testing with that https://classic.yarnpkg.com/en/docs/pnp |
@ef4 I'd like to know what hack you had to use to @chrisvdp I had missed that PnP was actually introduced under yarn 1. Interesting! |
@bartocc I had to make a shim program that I could launch with node like: // launch.js
require('ember-cli/bin/ember') Then something like: node --inspect-brk --require /Path/To/Your/.pnp.js ./launch.js |
thx @ef4 |
FWIW, yarn 2.1 is out now and seems better. |
Anymore news? npm installs are so bad for all of the reasons listed here https://yarnpkg.com/features/pnp |
@rwjblue @ef4 @NullVoxPopuli Pinging to see if we can push this forward again :) |
FWIW it seems that https://pnpm.io is a much easier way to achieve the same goals and aside from ember-cli not supporting it officially yet it works quite well :) |
@Turbo87 Do you have any tips/guide on moving from Yarn Workspaces to pnpm? |
can't say anything about workspaces since I rarely use those, but AFAIK they are supported by pnpm in some way too |
For anyone experiencing this bugaboo, I've created a simple Yarn 2 plugin to mitigate the issue: https://github.com/rewardops/plugin-ignore-add-options |
Thx for this plugin 👍 @shamrt I'm curious, are you using |
Yep, we are 🙂 |
Thanks for the feedback 👍 @rwjblue do you know if there are any plans to make ember-cli compatible with yarn's |
I should mention that we're using Zero-installs as well! |
@rwjblue Could you comment on whether ember-cli plans to support PnP? Our team is reviewing options for where to go after yarn v1. @shamrt If you are using |
Closing this as stale because it's working in yarn 3. |
@ef4 Is there a writeup somewhere on what needs to be done to switch an existing app to PnP? My naive start with setting
|
This issue was created at the time when Yarn 2 forced PnP, so supporting PnP was a blocker for upgrading Yarn. Yarn maintainers eventually realized that wasn't practical and made PnP optional in later 2.x and all of 3.x Yarn. I'm pretty sure the people reporting they're using Yarn 3 are doing it without PnP. I doubt PnP works out of the box. I don't think anybody would be against seeing PnP blockers fixed, but I also don't expect anybody is working on it because the people who would be working on it (1) have adopted pnpm instead and (2) are putting their time into getting us all off Ember-specific build tooling and onto general-Javascript-ecosystem-supported build-tooling (where the issue of "does it work with Yarn PnP" is not one we have to solve by ourselves). |
@ef4 Thanks for the extensive answer. This clarifies things. |
Yarn 1.12 added support for a new "Plug 'n Play" feature by way of an
--pnp
option. This issue is meant to track adding support forember new foo --yarn
to support using--pnp
without issue.Further Reading:
Current known issues:
node_modules appears empty, you may need to run 'yarn install'
warning when.pnp.js
is presentresolve
including the changes fromImplementsAdds support for "paths" being a function browserify/resolve#172, Implements skipNodeModules browserify/resolve#173. and Implements a "normalize-options" pseudo-hook browserify/resolve#174 (to ensureuseProcessResolution
browserify/resolve#170resolve.sync
usage is aware of PnP)ember-cli-dependency-checker
Yarn PnP Support quaertym/ember-cli-dependency-checker#92ember-cli-version-checker
to address Yarn PnP Support ember-cli-version-checker#78The text was updated successfully, but these errors were encountered: