-
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
[RFC] cargo install
should ignore the default build target
#5850
Comments
@alexcrichton Interesting! The case I'm describing is about installing a general purpose tool like ripgrep or racer. In my mind, by typing So, IMO, either cc @matklad |
Could bundle this behaviour change to |
I think that makes sense to me to ignore env vars and |
make `cargo install` ignore .cargo/config closes #5850 r? @alexcrichton
Regarding the question of whether anyone was relying on this, I was relying on this to set While it is surprising that a Perhaps the actually correct behavior is that That is, the expected behavior is that no value, not just |
@traviscross sorry for the breakage, but that sounds pretty reasonable to me! @japaric would that solution cause issues for the embedded usage perhaps? |
@alexcrichton No, I don't see any trouble. We only use project local |
Ok great! @traviscross want to open a dedicated issue for this? |
Thanks @alexcrichton, @japaric; sure, it's now opened as #6025. |
Voidlinux relied on this. It would be nice to have breaking changes mentioned in the release notes, independent of whether someone beliefs if people rely on it. |
Between this ticket and #6025, and the history Alex linked at the beginning of this ticket, there are quite a few use cases. Looking at the void-linux/void-packages#4373 I wonder if |
This is a papercut embedded users often encounter as our templates ship with a
.cargo/config
filethat sets a default build target:
The issue is that
cargo-install
compilescargo-binutils
for thethumbv7em-none-eabi
targetand that fails because there's no pre-compiled
std
for that target. Even if the compilationdid succeed that would result in an ARM binary being installed and a x86_64 host would not be able
to run it in most cases.
I propose that
cargo-install
ignores the default build target if one is set in a Cargoconfiguration file. In the, IMO, rare case where one does want to install a cross compiled binary
cargo install --target $T
would be the way to go.This is technically a breaking change but I doubt anyone is relying on this.
Thoughts?
cc @alexcrichton
The text was updated successfully, but these errors were encountered: