-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Allow running "cargo install" in a workspace #7124
Comments
I'm surprised this is not supported yet. |
It does seem strange that it's unsupported. I'm currently just manually copying the binaries from the workspace |
Unfortunately, "cargo install" does not know about workspaces: rust-lang/cargo#7124 So let's add a "scripts/cargo-install" that installs "chiseld" and "chisel" to "$HOME/.cargo/bin", which makes it easier to use the tool locally during development.
Unfortunately, "cargo install" does not know about workspaces: rust-lang/cargo#7124 So let's add a "scripts/cargo-install" that installs "chiseld" and "chisel" to "$HOME/.cargo/bin", which makes it easier to use the tool locally during development.
I propose that cargo-install adopt the
Did I miss anything? In the meanwhile, nightly appears to have: cargo build --release --workspace --out-dir somewhere/on/my/path This may permit install-like behavior for workspaces. This does not use the cargo-install machinery. It won't register the crates for |
There seems to be a difference in behavior when installing a workspace binary from Git vs from a local tree? Where
In both cases,
Note that setting |
Building via cargo install needs a root package instead of a virtual manifest. See <rust-lang/cargo#7124>.
Triage: Looks pretty similar to #4101. |
Bumping this :) |
Closing in favor of #4101. If there is a meaningful distinction that we should keep this open instead, let us know! |
For some reason, cargo install and cargo build do not do exactly the same thing. My commit at ed6ce14 broke cargo install without us noting it or CI catching it. This commit adds a test to cover this. It should be noted that Rust does not yet cargo install with workspace, so we need to point it to each of the individual binaries that we want to install, for reference see: - rust-lang/cargo#7599 - rust-lang/cargo#4101 - rust-lang/cargo#7124 We install each of the binaries into a temporary directory that will be cleaned up automatically by the runner when the job finishes. Signed-off-by: Arnaud de Grandmaison <arnaud.degrandmaison@arm.com>
For some reason, cargo install and cargo build do not do exactly the same thing. My commit at ed6ce14 broke cargo install without us noting it or CI catching it. This commit adds a test to cover this. It should be noted that cargo install does not yet (or still does not !) play nice with workspace, so we need to point it to each of the individual binaries that we want to install, for reference see: - rust-lang/cargo#7599 - rust-lang/cargo#4101 - rust-lang/cargo#7124 We install each of the binaries into a temporary directory provided by the runner and that will be cleaned up automatically when the job finishes. Signed-off-by: Arnaud de Grandmaison <arnaud.degrandmaison@arm.com>
For some reason, cargo install and cargo build do not do exactly the same thing. My commit at Arnaud-de-Grandmaison-ARM@ed6ce14 broke cargo install without us noting it or CI catching it. This commit adds a test to cover this. It should be noted that cargo install does not yet (or still does not !) play nice with workspace, so we need to point it to each of the individual binaries that we want to install, for reference see: - rust-lang/cargo#7599 - rust-lang/cargo#4101 - rust-lang/cargo#7124 We install each of the binaries into a temporary directory provided by the runner and that will be cleaned up automatically when the job finishes. Signed-off-by: Arnaud de Grandmaison <arnaud.degrandmaison@arm.com>
I have a project that is split into several crates in the same workspace. Some of these crates enable certain features for some dependencies. When I run
cargo build
from the workspace level, all the subcrates are built and features are properly enabled for the project as a whole.Now if I want to install those, I have to go into each crate, then run
cargo install --path=.
, which triggers some rebuild for each crate even if I already have a clean release build.I would love being able to run, at the workspace level, something like
cargo install --path=. --all
orcargo install --path=. --crates=foo,bar
orcargo install --path=foo --path=bar
or anything like that, which would trigger a single build for all the crates, and then proceed with the installThe text was updated successfully, but these errors were encountered: