-
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
cargo install [--git?] ignores .cargo/config.toml, making packages publishable-but-unbuildable, allthewhile they work when built normally #14001
Comments
The config |
And yet it is the only way to achieve feature parity of win32 targets with unix ones, since I use it for st_dev and st_ino (rust-lang/rust#63010). But, whatever. Indeed, I haven't tested cargo install --git on windows, but this does also break that:
So this is not "RUSTC_BOOTSTRAP doesn't inherit", as I thought, but Fixing "we choose to make certain packages publishable-but-unbuildable by ignoring configuration found in the distribution that allows them to be built in the usual case" is done by just not doing that. Or, as I have just tested, having users set |
#![feature]
may not be used on the stable release channel"…ursuant to the aforementioned. Import Debian repository info
So if I'm understanding, you are wanting Config is environmental and not tied to the project (#2930, see #12738 for finding ways the right abstraction for representing config in the project). According to these rules, |
Well, if I publish a package (be it via git or by uploading a tarball to crates.io), the fundamental expectation is that it will be built in the same way on the user's machine. This expectation is not being up-held when using the If you already have an exception for cargo install for "various reasons", then this means that you can append this issue to those reasons and edit the exception to use the package's configuration, rather than none at all. |
That is not a fundamental expectation. btw #11036 is a related issue. And as mentioned, that this is behaving something like $ cargo build --manifest-path ~/.cargo/git/checkouts/somedep-e7ff1db891893a9e/d04355a/Cargo.toml (ie we aren't changing the current-dir on the users behalf) The difference is that current-dir is ignored. This gets to the core of problem: config is environmental and not scoped to a project. If you aren't in the environment then Cargo doesn't load the config.
This is something that could be re-evaluated. It would take some research to see what the trade offs would be. However, more likely to move forward is efforts like #12738. Either way, this would be use-case driven and |
if you're trying to imply that because cargo install defaults to --release (which you, in your belaboured expansion, also omitted, like me, because it's irrelevant) while cargo build doesn't, and this is ideologically significant, then idk what to tell you except "lol" If it's ignored, then unignore it and use the one next to the manifest. or chdir to the build root. this seems very easy to fix. And no, I'm publishing a package that can work on stable releases which include the windows_by_handle feature in its current or similar form, which is all of them since 1.38 (if I'm reading github's git tag --contains equivalent right; the code, after moving twice, is unchanged and still blames back to the original merge from exactly 5 years ago); this is no different to using any other feature, other than you don't like it. It's also obviously false that it requires a nightly toolchain, as proven by me using a range of stable toolchains to build it for the past seven years. |
I recommend to please respectfully engage with others and assume they are trying to also participate in good faith with you. I am going to step away from this conversation for several days (at least) to let things calm down before further participation. |
Hey folks, please treat each other with kindness and respect. |
Problem
As given in title.
Steps
git clone --branch v2.0.0 https://github.com/thecoshman/http
cargo build
it from the directory (works)cargo install --git --branch v2.0.0 https://github.com/thecoshman/http
(or whatever the spelling is, this is currently HEAD) –Possible Solution(s)
No response
Notes
May have something to do with
.cargo/config.toml
settingenv.RUSTC_BOOTSTRAP = 1
? But the thing it's used for in the crate itself does work.Version
The text was updated successfully, but these errors were encountered: