Skip to content

Remove yarn check #106

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

Merged
merged 1 commit into from
Feb 18, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions accepted/0000-remove-yarn-check.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
- Start Date: 30 Oct 2018
- RFC PR: https://github.com/yarnpkg/rfcs/pull/106
- Yarn Issue: n/a

# Remove `yarn check`

## 1. Motivation

Running `yarn install` should work out of the box. There's no reason for `yarn check` to exist from a user perspective - they should never have to run it, because installs must always be right.

Being not particularly useful, the `yarn check` command receives less attention and as a result it often yields wrong / confusing results. This leads users to believe that `yarn install` is broken when it's in fact `yarn check` (https://twitter.com/betaorbust/status/1055610508533878784).

## 2. Detailed Design

We'll remove the `yarn check` command in Yarn 2.0.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As well as yarn install --check-files, I assume?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So --check-files is a bit different - it doesn't actually check 😅

It has to do with the way we make an early bailout if the node_modules is already there (to avoid running an installation if there is no need). Without --check-files Yarn will only checks for the various folders to exist (plus various other settings), whereas with --check-files it will also check for all the registered files to exist. It's not super useful anymore, but it's not as redundant as yarn check.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I see. That’s unfortunate, I like the integrity check of —check-files, but for most people I can see checking of the expected directories exist is probably enough.


## 3. How Can We Teach This

This command will be marked as deprecated, and running it will exit with an error code and an error message explaining why it got removed.

## 4. Drawbacks

- The one use of `yarn check` is to provide debug information when installs aren't properly made. In practice it's never used this way, even by maintainers.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ha true, it'd point out any glaring issues but I'd agree the results aren't reliable at all, esp with workspaces and resolutions


## 5. Alternatives

- We could fix `yarn check`. This would prove time consuming, of little value because of the reasons detailed above, and resources would be better spent on other worksites.