Fix buffer overrun in cargo metadata command #4673
Closed
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.
↪️ Pull Request
Adds the
--no-deps
argument to reduce output length. A quick local testcuts the output from ~1MB to ~10KB so with a default buffer of 1024*1024
bytes this should open up a lot more overhead.
Closes #1573
💻 Examples
Running
parcel build
orparcel path/to/index.html
now no longer fails withsrc/lib.rs: stdout maxBuffer length exceeded
🚨 Test instructions
I believe this issue only occurs with larger projects. I have a cargo workspace containing an API server with a bunch of dependencies which I believe causes a huge amount of output. Testing this PR in that workspace with the added
--no-deps
flag makes it work.I guess the test instructions would be to create/find a project with a bunch of dependencies and check the NPM version of parcel against an
yarn link
/npm link
of this PR.✔️ PR Todo