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

Does not work with cargo bench #9

Closed
velvia opened this issue Feb 20, 2019 · 5 comments
Closed

Does not work with cargo bench #9

velvia opened this issue Feb 20, 2019 · 5 comments

Comments

@velvia
Copy link

velvia commented Feb 20, 2019

After installing and trying cargo with "echo {bin}" -- bench

Error: ErrorMessage { msg: "Unable to convert \'bench\' into a cargo subcommand" }

stack backtrace:
   0: failure::backtrace::internal::InternalBacktrace::new::h59b3db8423e4cf5e (0x10e71c9b8)
   1: <failure::backtrace::Backtrace as core::default::Default>::default::ha057354baab460c1 (0x10e71cc64)
   2: cargo_with::cargo::Cmd::from_strs::h41a41d93068aa265 (0x10e7123cd)
   3: cargo_with::runner::runner::h426b4b78cc407ce9 (0x10e717517)
   4: cargo_with::main::h57a9494064ed692b (0x10e70d932)
   5: std::rt::lang_start::{{closure}}::h6a72812a9432124a (0x10e71663a)
   6: std::panicking::try::do_call::hb3270f6ae846849d (0x10e80f837)
   7: ___rust_maybe_catch_panic (0x10e8215be)
   8: std::rt::lang_start_internal::ha07e743882e341f3 (0x10e8101ca)
   9: _main (0x10e70daf8)
@barskern
Copy link
Collaborator

This is by design as we only currently support cargo run and cargo test. However it could be extended to also work with cargo bench.

@cbourjau
Copy link
Owner

cbourjau commented Feb 20, 2019

Thanks a lot for pointing this out @velvia! bench should really be supported as well. It is only a question of fishing out the right build artifact from cargo's output which is messier than it sounds. I am actually just setting up a few minimal example projects and one of them will have benchmarks. So that should be a good starting point if you would like to take a swing at it?

@cbourjau
Copy link
Owner

This might have been easier than anticipated and should be fixed with PR #12

barskern added a commit that referenced this issue Mar 6, 2019
Add support for cargo bench (Fixes #9)
@velvia
Copy link
Author

velvia commented Mar 12, 2019 via email

@barskern
Copy link
Collaborator

You could clone the project and run cargo install --path . in the root of the project.

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

No branches or pull requests

3 participants