-
-
Notifications
You must be signed in to change notification settings - Fork 408
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
Propose pnpm support #907
Propose pnpm support #907
Conversation
562a1fc
to
a76159f
Compare
I understand the desire to have ember-cli's pnpm support match its npm and yarn support, but personally I think that in the long run it's better to drop most / all of the package-manager related responsibilities from ember-cli. This would include:
Back when npm was the sole / most used package manager, having the I would rather see Running the Slows down blueprint generation and doesn't always work reliably. It lint fixes the entire codebase and not just the newly generated files. Also, most teams probably already have tooling in place that makes running the Auto-installing other addons and packages when running a blueprint: Addons could / should define their peer dependencies in their I think ideally, ember-cli (and the rest of the Ember ecosystem) works fluently under any package manager, but should try to remain agnostic about them as much as possible. I think this train of thought is similar to other efforts in the Ember ecosystem where we try to get rid of Emberisms to align more closely with the wider JS ecosystem. |
I can somewhat relate to the arguments @bertdeblock brought up here. But that goes far beyond just dropping package manager responsibilities:
So unless we have an alternative RFC that proposes what @bertdeblock did and also tackles all those open questions, I think it is not justified to hold back this RFC based on this. |
I support adding pnpm support but I don't want to remove the conveniences that Ember provides, so I agree with the what I inferred from @simonihmig's response --considering other things such as "should we really even have P.S. I really like |
It feels difficult to me to answer the question: "Should we officially add pnpm support?" without questioning things like To be clear, it's not my intention to hold back or block any RFCs, I'm just saying what I feel is the right thing to do. |
@bertdeblock agree, I think that I like the UX of just typing Does adding support for pnpm mean that we would no longer be able to support |
|
||
#### `--skip-npm` | ||
|
||
The `--skip-npm` flag _actually means_ "skip installation of dependencies" when using `ember addon` and `ember new`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we propose a change of this flag to --skip-deps
? Maybe that's separate but I can see it being related.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should -- I personally don't think that needs an RFC, (and is out of scope for this one) but I think it should happen.
RFC could then be put up for deprecating --skip-npm
- `ember install ember-resources` with `pnpm-lock.yaml` present will use `pnpm` | ||
- `ember install ember-resources` without `pnpm-lock.yaml` present will use npm | ||
- `ember install ember-resources --pnpm` will use `pnpm` | ||
- `ember install ember-resources --no-pnpm` will use npm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the use case for this? If you had a pnpm-lock.yaml and didn't want to use pnpm?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a consequence of our arg-parsing tool. boolean flags have equiv negated no-prefixed versions
- Are there any other references in the guides to `npm` or `yarn`? | ||
The only place I could find that _mentioned_ `yarn` is here: https://guides.emberjs.com/release/addons-and-dependencies/ | ||
- Is there a `--package-manager` flag / option in `ember-cli`? for blueprint authors, that may be useful. | ||
- Should `--skip-npm` be aliased to `--skip-install`? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh okay I see this part. Yes I think it should be aliased to something more generic. --skip-deps
, --skip-install-deps
, etc.
@NullVoxPopuli Should we generate an My (initial) preference is to generate one with: auto-install-peers=true I'm curious whether people have a preference around other settings. I'm also curious about any problems that might arise in practice with auto-installed peers. |
I'm personally against auto-install-peers, because it introduces surprises. I think folks should have correct package.jsons, and correctly declare which packages are needed by their direct dependencies. |
I agree with @NullVoxPopuli, but ultimately it is not for these reasons that I would not include the feature (generating a |
Personally I suspect most addon installs should move to an executable remote command that isn't ember-cli based. e.g. |
|
Notes from discussion with core framework team: Alternative ideas like "let's just drop ember-install" would be fine as followup separate RFCs, but that shouldn't necessarily block this RFC. In practice we already have support for pnpm in several places, and we have existing documentation about package managers, so improving consistency by officially documenting pnpm alongside npm and yarn is strictly an improvement, and doesn't limit our future options. Before this RFC can move forward we probably do need to resolve some details around:
|
Pnpm 8 just came out, and they decided for us, for auto install peers, no need for consensus. |
Something @runspired mentioned, that we should probably change the default
|
@NullVoxPopuli Do you know what you want to say in the RFC as far as guides or should we chat some? |
yeah, with how i'm thinking about this right now, I think chatting would be helpful <3 atm, I'm not sure what would be useful to say about pnpm, specifically (at least, in any way that would be different from how we handle npm vs yarn (which is already very minimal)). I think the ember guides could use a section on general topics like:
But that's something that should just happen (imo, ofc), independent of this RFC. |
I've added a section about addons in the latest commit. Hoping to make some progress on this RFC -- as I work on v2 conversions for Footnotes
|
Atm, I think all open questions / concerns are resolved, with the last question not directly addressed in comments:
This is already included: https://github.com/emberjs/rfcs/pull/907/files#diff-116076a2d4078dfbf8de672a7b681ed1635715f3acfbfd31a1e7009251eef70dR134-R136 The explicitness is deliberately left vague, because a refactor of words is needed, as for example, in the CLI guides, this is the current phrasing:
I think we'd probably want to update that to instead of being an "Example use" of the nearest heading, "Create a new app", to be "Specifying a package manager" with the existing text (tweaked a bit) being under a Personally I think this restructuring of this section of the docs is out of scope for the RFC, as the details such a change are more an implementation detail of "add equivalent Example of how I'm thinking about the update though:
|
This has been moved to Final Comment Period! |
Accepted since we made it though the FCP period! |
rendered (from fork)