Skip to content

fix(artifact)!: Remove compat mode from artifacts#17016

Merged
weihanglo merged 1 commit into
rust-lang:masterfrom
epage:artifact
May 20, 2026
Merged

fix(artifact)!: Remove compat mode from artifacts#17016
weihanglo merged 1 commit into
rust-lang:masterfrom
epage:artifact

Conversation

@epage

@epage epage commented May 20, 2026

Copy link
Copy Markdown
Contributor

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.

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.
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 20, 2026
@rustbot

rustbot commented May 20, 2026

Copy link
Copy Markdown
Collaborator

r? @weihanglo

rustbot has assigned @weihanglo.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @ehuss, @epage, @weihanglo
  • @ehuss, @epage, @weihanglo expanded to ehuss, epage, weihanglo
  • Random selection from ehuss, weihanglo

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());
}
}

@weihanglo weihanglo May 20, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While this, we forgot to update documentation when we added this compat layer

Note that `<NAME>` is not modified in any way from the `name` specified in the crate supplying the artifact, or the crate name if not specified; for instance, it may be in lowercase, or contain dashes.

View changes since the review

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was taking that crate to mean "build target" and not .crate file

@weihanglo weihanglo added this pull request to the merge queue May 20, 2026
Merged via the queue into rust-lang:master with commit c75a40b May 20, 2026
29 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 20, 2026
@epage epage deleted the artifact branch May 20, 2026 12:08
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)
@rustbot rustbot added this to the 1.98.0 milestone May 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants