fix(artifact)!: Remove compat mode from artifacts#17016
Merged
Conversation
Was reminded about this when looking at rust-lang#17013. It has been enough years, it seems reasonable enough to remove this as it is an unstable feature.
Collaborator
|
r? @weihanglo rustbot has assigned @weihanglo. Use Why was this reviewer chosen?The reviewer was selected based on:
|
weihanglo
reviewed
May 20, 2026
Comment on lines
-70
to
-86
| // In older releases, lib-targets defaulted to the name of the package. Newer releases | ||
| // use the same name as default, but with dashes replaced. Hence, if the name of the | ||
| // target was inferred by Cargo, we also set the env-var with the unconverted name for | ||
| // backwards compatibility. | ||
| let need_compat = unit_dep.unit.target.is_lib() && unit_dep.unit.target.name_inferred(); | ||
| if need_compat { | ||
| let var_compat = format!( | ||
| "CARGO_{}_FILE_{}_{}", | ||
| artifact_type_upper, | ||
| dep_name_upper, | ||
| unit_dep.unit.pkg.name(), | ||
| ); | ||
| if var_compat != var_file { | ||
| env.insert(var_compat, artifact_path.to_owned().into()); | ||
| } | ||
| } | ||
|
|
Member
There was a problem hiding this comment.
While this, we forgot to update documentation when we added this compat layer
cargo/src/doc/src/reference/unstable.md
Line 1069 in 4b98db0
Contributor
Author
There was a problem hiding this comment.
I was taking that crate to mean "build target" and not .crate file
weihanglo
approved these changes
May 20, 2026
rust-bors Bot
pushed a commit
to rust-lang/rust
that referenced
this pull request
May 27, 2026
Update cargo submodule 13 commits in 4d1f984518c77fad6eeef4f40153b002a659e662..fbb61be30e5f9ac3a6ad58e56a5c0f5db2d2b3ef 2026-05-15 17:12:01 +0000 to 2026-05-26 15:08:03 +0000 - fix(compiler): forward verbose flag to rustc for local crates (rust-lang/cargo#17006) - Fix CVE-2026-5222 and CVE-2026-5223 (rust-lang/cargo#17031) - Don't use the network for a publish dry-run test (rust-lang/cargo#17027) - feat: Break out `RegistryConfig` and `crate_url` for interpreting `RegistryConfig::dl` (rust-lang/cargo#17011) - refactor(diag): Sort the PARSE_PASS_RULES (rust-lang/cargo#17019) - fix(artifact)!: Remove compat mode from artifacts (rust-lang/cargo#17016) - refactor(diag): Simplify adding of new diagnostics (rust-lang/cargo#17015) - test(package): Mark a network test that timed out on me (rust-lang/cargo#17017) - refactor(diag): Pull in the parse pass (rust-lang/cargo#17008) - test(lints): Avoid compiling where possible (rust-lang/cargo#17007) - fix(diag): Report deferred diagnostics like other diagnostics (rust-lang/cargo#16994) - refactor: drop `-Zunstable-options` for `rustdoc --emit` (rust-lang/cargo#17002) - chore(deps): update msrv (1 version) to v1.95 (rust-lang/cargo#17001)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR try to resolve?
Reduce the risk of accidentally stabilizing this.
How to test and review this PR?
Was reminded about this when looking at #17013.
It has been enough years,
it seems reasonable enough to remove this as it is an unstable feature.