-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
In 2018 edition, warn about cargo install
ing the current crate
#5327
Labels
Comments
I'll take a crack at this. |
@matklad how should the different behaviour when varying rust editions be tested? I can't find any prior art in https://github.com/rust-lang/cargo/issues?utf8=%E2%9C%93&q=sort%3Aupdated-desc+2018 |
@dwijnand here's a example of a test with an edition: bbb2b92#diff-851ff422b9a34b41d197ada1851b7fbbR1469 |
bors
added a commit
that referenced
this issue
Apr 11, 2018
Warn/error when cargo installing the cwd in 2015/2018 Fixes #5327 submitted for early review. feedback very welcome, I'm happy to iterate (and learn).
uqs
pushed a commit
to freebsd/freebsd-ports
that referenced
this issue
Dec 16, 2018
`cargo install` currently fails with: error: Using `cargo install` to install the binaries for the package in current working directory is no longer supported, use `cargo install --path .` instead. Also see rust-lang/cargo#5327 git-svn-id: svn+ssh://svn.freebsd.org/ports/head@487583 35697150-7ecd-e111-bb59-0022644237b5
uqs
pushed a commit
to freebsd/freebsd-ports
that referenced
this issue
Dec 16, 2018
`cargo install` currently fails with: error: Using `cargo install` to install the binaries for the package in current working directory is no longer supported, use `cargo install --path .` instead. Also see rust-lang/cargo#5327
Jehops
pushed a commit
to Jehops/freebsd-ports-legacy
that referenced
this issue
Dec 16, 2018
`cargo install` currently fails with: error: Using `cargo install` to install the binaries for the package in current working directory is no longer supported, use `cargo install --path .` instead. Also see rust-lang/cargo#5327 git-svn-id: svn+ssh://svn.freebsd.org/ports/head@487583 35697150-7ecd-e111-bb59-0022644237b5
swills
pushed a commit
to swills/freebsd-ports
that referenced
this issue
Dec 16, 2018
`cargo install` currently fails with: error: Using `cargo install` to install the binaries for the package in current working directory is no longer supported, use `cargo install --path .` instead. Also see rust-lang/cargo#5327 git-svn-id: svn+ssh://svn.freebsd.org/ports/head@487583 35697150-7ecd-e111-bb59-0022644237b5
AnderEnder
pushed a commit
to AnderEnder/tarpaulin
that referenced
this issue
Dec 18, 2018
warning: Using `cargo install` to install the binaries for the package in current working directory is no longer supported, use `cargo install --path .` instead. Also see rust-lang/cargo#5327
AnderEnder
pushed a commit
to AnderEnder/tarpaulin
that referenced
this issue
Dec 19, 2018
warning: Using `cargo install` to install the binaries for the package in current working directory is no longer supported, use `cargo install --path .` instead. Also see rust-lang/cargo#5327
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Running
cargo install
installs the binaries for the project in current working directory. This might be a surprising behavior for people coming from other ecosystems, especially the node one. The confusion here is that, in Cargo, you don't need to "install" a library to actually use it. At the same time, installing local crates seems like a niche use-case, one typically installs crates from crates.io.So let's fix confusion by printing a warning, in the next edition, when a user invokes
cargo install
. The warning should say:cargo build
cargo install --path .
The code for install command is here:
cargo/src/bin/commands/install.rs
Line 81 in d8b2031
To check the current edition, one can use this method:
cargo/src/cargo/core/manifest.rs
Line 409 in d8b2031
The tests for install are here:
https://github.com/rust-lang/cargo/blob/d8b20310217e5e2bc515c13111ab9a7789709e42/tests/testsuite/install.rs
The text was updated successfully, but these errors were encountered: