-
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
Remove yarn check #106
Remove yarn check #106
Conversation
@arcanis our current use case for Things we considered:
How do you guys typically handle this scenario? cc @betaorbust |
Right now we simply make our development server restart (and run I think the solution will eventually be in the form of the project-local cache folder. It's currently a work in progress (which will probably be shipped as an experimental feature early next year), but the idea I'm working on is to make Yarn a development-only tool: you wouldn't need to run it at all on production / CI. In fact, you wouldn't have to run it at all except when running In order to do this, the cache folder (that would be reworked to only contain zip files) along with the |
In CocoaPods we solved this by having a manifest of what got installed inside the dependencies directory that CocoaPods would check for and compare to the lockfile in the project during a build. In the case of Yarn when running a command through |
|
||
## 2. Detailed Design | ||
|
||
We'll remove the `yarn check` command in Yarn 2.0. |
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 as yarn 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.
At Artsy we’ve been telling everybody to run |
|
||
## 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 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
Why isn't this mentioned anywhere on the website or in the yarn repo for 1.x? A little frustrated as we lost a day to this and had to do some sizable reverts. |
They have been deprecated by yarn: yarnpkg/rfcs#106
Hello, I would like to add a
I read the page at https://yarnpkg.com/en/docs/cli/check, and found this issue. But it looks like
Also I'm trying to get some other warnings/errors to show up with a CLI flag, but it seems like I need to run:
I would like to check for all of these warnings and errors in my CI builds, and fail the build if there are any problems with my |
Cf document for motivations; in short this command is of little to no use to us, but contributes to our users being confused by its buggy behavior.