Skip to content
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 bin/yarn to avoid running "yarn install" unnecessarily #5453

Merged
merged 1 commit into from
Sep 28, 2021

Conversation

mitchellhenke
Copy link
Contributor

When attempting to yarn install in offline mode (#5419), I noticed we were still running yarn installs when compiling assets. This webpacker issue suggests deleting bin/yarn, which was generated and added as part of the Rails 6.1 upgrade.

Removing this file doesn't appear to break any of our setup scripts, tests, or build processes.

Copy link
Contributor

@zachmargolis zachmargolis left a comment

Choose a reason for hiding this comment

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

LGTM

@mitchellhenke mitchellhenke merged commit f816ba1 into main Sep 28, 2021
@mitchellhenke mitchellhenke deleted the mitchellhenke/remove-bin-yarn branch September 28, 2021 20:01
Copy link
Member

@aduth aduth left a comment

Choose a reason for hiding this comment

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

Interesting, looks like it's coming from Sprockets:

https://github.com/rails/rails/blob/6-1-stable/railties/lib/rails/tasks/yarn.rake#L27-L30

Alternatively, we could remove the yarn install from deploy/build and enhance bin/yarn to handle offline? Not much difference anyways.

I notice Rails also passes --no-progress. Makes me recall how NPM's progress bar had a noticeable performance impact a long while ago (npm/npm#11283), though I dunno if it actually applies here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants