-
Notifications
You must be signed in to change notification settings - Fork 147
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
Soft Engines Check #69
Conversation
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.
This is the proper default; thanks!
We specifically chose a strict engine check with Yarn to encourage the ecosystem to properly use the This justification in this RFC for relaxing this is mostly "npm doesn't do this and have deprecated it". Obviously we aren't adherent to the changes of npm and we deliberately deviated. |
When this was initially discussed, (throwing a hard warning on engine mismatch) we knew it was going to cause some friction, however we also hypothesized that it would greatly help the community to actually use the engine field. (much like the npm licence bot that went through and updated the license field in package.json) Take for instance the following real world example: If you want to ship a package that will not work with an older version of node, it is quite hard, especially if you want to use new syntax like await / async or arrow functions (since they will throw quite odd errors at runtime to the user). One example of this is jsdom, a very popular library that dropped older node support a while ago. Even though mainline jsdom did not work with older node, if someone on an earlier version of node would install it, it would install and then raise an exception at runtime :(. With yarn, the dependency refuses to install on engine mismatch \o/. To the point about 1 bad dependency causing you to use the ignore-engine flag, that is by design, you (the developer) are being explicit that you are opting out of the check for a reason and assuming the risk. And to the point about this making the entire feature not valuable, I would say that using the flag is infact what npm is doing already, however is doing in a non-explicit (and unexpected) way. |
I'm convinced. Thanks for the inputs guys 👍 |
Thanks, @gsklee, for leading the conversation and cleaning up the tasks, much appreciated. |
Could this behavior be communicated to the community via Yarn's blog? (Similar to the excellent blog post on the differences in the deterministic behavior of each package manager) Also, if it's alright with the core team, could @gsklee submit an RFC that documents this behavior? I'd like to be able to point others to a spec. |
+1 on documentation or a blog post. |
Go ahead with the post @gsklee, if you have time!
…On 15 June 2017 at 00:18, G. Kay Lee ***@***.***> wrote:
I can write a post on this if @kittens <https://github.com/kittens> or
@samccone <https://github.com/samccone> are not able to find the time to
do it.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#69 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ACBdWN1XYRBINEjnKOWGWI3hP0EyGf1pks5sENqugaJpZM4N5iF2>
.
|
sorry for asking here, but is there a way to check the yarn version that the team members use for development (and fail on e.g. |
@havenchyk this seems like an interesting feature, mind creating another rfc? |
@havenchyk @samccone was another RFC created? can it be linked here? I too would like that feature |
@rattrayalex-stripe nope, it wasn't. Still on my todo list, but if you would like, take care of it |
Could yarn at least log which module is causing the error? I'm just getting the error
in my package.json I have exactly:
So I don't know who/what is causing the error... |
@BorntraegerMarc please run |
@hbetts ah that explains it. Version |
Yarn enforces strict engine testing yarnpkg/rfcs#69 (comment) so this manifests as an error rather than a warning.
Can we include a message like "use --ignore-engines to bypass engines check"? |
Yarn enforces strict engine testing yarnpkg/rfcs#69 (comment) so this manifests as an error rather than a warning.
Yarn enforces strict engine testing yarnpkg/rfcs#69 (comment) so this manifests as an error rather than a warning.
See here.