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

fix(E2BIG): Ignore potentially large vscode keys #7419

Merged
merged 1 commit into from Jul 23, 2019

Conversation

eamodio
Copy link
Contributor

@eamodio eamodio commented Jul 19, 2019

Summary

Ignores 2 VS Code extension specific package.json keys that tend to get large and can cause E2BIG errors. I just moved my vscode extension (GitLens) from npm to yarn hoping this issue (a large package.json) wouldn't manifest itself, but sadly it was still an issue.

Here is the original issue I commented on: #5420 (comment)

Fixes #5420 for another instance.

@eamodio
Copy link
Contributor Author

eamodio commented Jul 19, 2019

@BYK I submitted the simple version. Wasn't sure where a warning should really go -- directly here: https://github.com/eamodio/yarn/blob/dfe97900ca5f425d8cf303477b66073f4f6cb812/src/util/execute-lifecycle-script.js#L104?

@BYK
Copy link
Member

BYK commented Jul 19, 2019

I think this version is fine since you did not add dropping random stuff based on their sizes. I'll leave the final say to @arcanis.

Btw. I think you need to update some tests or add new ones :)

@BYK BYK changed the title Adds vscode keys - since they can be large (#5420) fix(E2BIG): Ignore potentially large vscode keys from package.json (#5420) Jul 19, 2019
@BYK BYK changed the title fix(E2BIG): Ignore potentially large vscode keys from package.json (#5420) fix(E2BIG): Ignore potentially large vscode keys (#5420) Jul 19, 2019
@BYK BYK changed the title fix(E2BIG): Ignore potentially large vscode keys (#5420) fix(E2BIG): Ignore potentially large vscode keys Jul 19, 2019
@eamodio
Copy link
Contributor Author

eamodio commented Jul 19, 2019

Updated with lint fixes -- oops 😄

@buildsize
Copy link

buildsize bot commented Jul 19, 2019

File name Previous Size New Size Change
yarn-[version].noarch.rpm 1.18 MB 1.18 MB 12 bytes (0%)
yarn-[version].js 4.85 MB 4.85 MB 244 bytes (0%)
yarn-legacy-[version].js 5.04 MB 5.05 MB 244 bytes (0%)
yarn-v[version].tar.gz 1.18 MB 1.19 MB 1.97 KB (0%)
yarn_[version]all.deb 868.29 KB 868.39 KB 104 bytes (0%)

@eamodio
Copy link
Contributor Author

eamodio commented Jul 22, 2019

@arcanis @BYK Does this looks good? Or do I need to make any other changes?

@BYK
Copy link
Member

BYK commented Jul 22, 2019

@eamodio as mentioned before, there should be some updated tests for this change. I'm also waiting for @arcanis to sign off. Guessing he's busy nowadays so will ping him directly.

@arcanis
Copy link
Member

arcanis commented Jul 22, 2019

Sounds all good to me! ☺️ Can you update the changelog?

@eamodio
Copy link
Contributor Author

eamodio commented Jul 22, 2019

@BYK OK, I figured the existing test was enough, since it enumerates all the keys in that list. What else should I test?

@arcanis Will do.

@BYK
Copy link
Member

BYK commented Jul 22, 2019

@BYK OK, I figured the existing test was enough, since it enumerates all the keys in that list. What else should I test?

Hahaha sorry, my bad. I forgot my own refactor making this test future-proof :)

@BYK BYK self-requested a review July 22, 2019 21:42
Copy link
Member

@BYK BYK left a comment

Choose a reason for hiding this comment

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

🚀

@arcanis arcanis merged commit a3b1294 into yarnpkg:master Jul 23, 2019
@eamodio
Copy link
Contributor Author

eamodio commented Jul 23, 2019

Hooray! Thank you!

@eamodio
Copy link
Contributor Author

eamodio commented Jul 30, 2019

@BYK @arcanis any idea of an ETA on the next release of yarn that would include this fix?

@BYK
Copy link
Member

BYK commented Jul 30, 2019

@eamodio not sure about the next release but if you need it, you can use the nightly builds safely as a release is just a tagged version of those (and some packaging magic).

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.

Getting "spawn E2BIG" error after upgrading to yarn v1.5.1
3 participants