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

cargo run with a huge number of arguments doesn’t work #3547

Closed
ariasuni opened this issue Jan 16, 2017 · 7 comments
Closed

cargo run with a huge number of arguments doesn’t work #3547

ariasuni opened this issue Jan 16, 2017 · 7 comments
Labels
C-bug Category: bug

Comments

@ariasuni
Copy link

I have a folder with 16’000 files. When I run cargo run folder/*, Cargo seems blocked and takes a lot of RAM. However, when I run the exec directly (e.g. ./target/debug/exec) it works perfectly well.

@alexcrichton
Copy link
Member

Thanks for the report! If possible, could you get a snapshot/profile of where the time is being spent in Cargo?

@ariasuni
Copy link
Author

I used callgrind, waited 20 seconds before terminating the program with Ctrl+c, and I got that: https://gist.github.com/ariasuni/26822c6dc6121167a5b226c636779582

@alexcrichton
Copy link
Member

Thanks! I've reported upstream at docopt/docopt.rs#207

@carols10cents carols10cents added blocked C-bug Category: bug labels Sep 29, 2017
@Eh2406
Copy link
Contributor

Eh2406 commented Mar 26, 2018

with #5152 we are using clap. Move to close?

@ariasuni
Copy link
Author

ripgrep, which is using Clap, don’t choke with twice as much as arguments on the command line.

@matklad
Copy link
Member

matklad commented Mar 26, 2018

@ariasuni could you verify just in case that Cargo itself works ok with huge number of arguments now? The fact that we”ve switched to clap does not mean we use it 100% correct :)

@ariasuni
Copy link
Author

I just compiled master branch of cargo and ran it with cargo run --release <39498 arguments> and it said error: no such subcommand in a very few seconds, so it’s 100% confirmed now. :)

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

No branches or pull requests

5 participants