-
Notifications
You must be signed in to change notification settings - Fork 147
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
Remove yarn check #106
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | ||
|
||
## 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. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
As well as
yarn install --check-files
, I assume?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.
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 asyarn check
.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.
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.