Our MSRV is much higher than 1.77. Also, as time goes on, there is less
incentive to drop it below 1.77, especially with the MSRV-aware resolver
in 1.84
### What does this PR try to resolve?
Fixes#8716
This splits `-C metdata` and `-C extra-filename` and adds `RUSTFLAGS` to
`-C extra-filename` in the hope that we can still make PGO and
reproducible builds work while caching artifacts per RUSTFLAGS used.
### How should we test and review this PR?
### Additional information
### What does this PR try to resolve?
The documentation that was added was pulled straight from a comment in
`custom_build.rs`:
> This cfg is always true and misleading, so avoid setting it.
> That is because Cargo queries rustc without any profile settings.
It is therefore misleading to expose this in the API
### How should we test and review this PR?
### Additional information
### What does this PR try to resolve?
As the test updates in this PR show, RUSTFLAGS and extra-flags have the
same
behavior: they don't affect `-Cextra-filename` or `-Cmetadata`.
I also verified this by code inspection.
I'm not sure why the table says this.
### How should we test and review this PR?
### Additional information
As the prior test updates show, RUSTFLAGS and extra-flags have the same
behavior: they don't affect `-Cextra-filename` or `-Cmetadata`.
I also verified this by code inspection.
I'm not sure why the table says this.
### What does this PR try to resolve?
Fixes#14893
In writing a test for this, I had a hard time finding the other tests as
they mixed
- Having an `add_` prefix
- Calling this fuzzy vs normalized
So I made the test names consistent
### How should we test and review this PR?
### Additional information
The tests were comparing rustc vs RUSTFLAGS which was obscuring the case
it was trying to test which was that different remaps shouldn't cause
different results.
### What does this PR try to resolve?
Technically, the edition doesn't affect the workspace. We could adjust
this as we're inheriting to not be a problem.
But it feels weird to keep this around in newer editions. We could frame
this as around the what the package is, including inheritance. The nice
thing is that default-features works for all versions that inheritance
works so we're not forcing the users hand with multiple editions in a
workspace.
Fixes#14886
### How should we test and review this PR?
### Additional information
### What does this PR try to resolve?
`test_std_on_unsupported_target` never really succeed to build those
targets, due to
* local rustup may not have `{aarch64,x86_64}-unknown-none` installed.
* `core` and `compiler-builtins` mock crate are not `no_std` nor
`no_core`
* the dummy `main.rs` uses `println!` and is not `no_std`.
This commit make it compile, if you have those targets installed.
### How should we test and review this PR?
Change this line to `.build_std_arg(&setup, "core")`.
05f54fdc34/tests/testsuite/standard_lib.rs (L410)
And delete these liens:
05f54fdc34/src/cargo/core/compiler/standard_lib.rs (L75-L84)
Then the test project should compile.
`test_std_on_unsupported_target` never really succeed to build those targets, due to
* local rustup may not have `{aarch64,x86_64}-unknown-none` installed.
* `core` and `compiler-builtins` mock crate are not `no_std` nor `no_core`
* the dummy `main.rs` uses `println!` and is not `no_std`.
This commit make it compile, if you have those targets installed.
### What does this PR try to resolve?
Only run PGO test on nightly,
so it won't run on rust-lang/rust's CI
because `CARGO_TEST_DISABLE_NIGHTLY` is set on that.
### How should we test and review this PR?
This is a temporary fix to unblock Cargo submoule update (assume that
rust-lang/rust#133675 won't be fixed this week).
In the future We should seek a solution that
* Disable test on rust-lang/rust's CI
* Maximize test coverage on different channels and platforms on Cargo's
CI.
### What does this PR try to resolve?
Was about to point someone to the docs when I found this
### How should we test and review this PR?
### Additional information
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| [cargo_metadata](https://redirect.github.com/oli-obk/cargo_metadata) |
workspace.dependencies | minor | `0.18.1` -> `0.19.0` |
---
### Release Notes
<details>
<summary>oli-obk/cargo_metadata (cargo_metadata)</summary>
###
[`v0.19.0`](https://redirect.github.com/oli-obk/cargo_metadata/blob/HEAD/CHANGELOG.md#0190---2024-11-20)
[Compare
Source](https://redirect.github.com/oli-obk/cargo_metadata/compare/0.18.1...0.19.0)
##### Added
- Re-exported `semver` crate directly.
- Added implementation of `std::ops::Index<&PackageId>` for `Resolve`.
- Added `pub fn is_kind(&self, name: TargetKind) -> bool` to `Target`.
- Added derived implementations of `PartialEq`, `Eq` and `Hash` for
`Metadata` and its members' types.
- Added default fields to `PackageBuilder`.
- Added `pub fn new(name:version:id:path:) -> Self` to `PackageBuilder`
for providing all required fields upfront.
##### Changed
- Bumped MSRV from `1.42.0` to `1.56.0`.
- Made `parse_stream` more versatile by accepting anything that
implements `Read`.
- Converted `TargetKind` and `CrateType` to an enum representation.
##### Removed
- Removed re-exports for `BuildMetadata` and `Prerelease` from `semver`
crate.
- Removed `.is_lib(…)`, `.is_bin(…)`, `.is_example(…)`, `.is_test(…)`,
`.is_bench(…)`, `.is_custom_build(…)`, and `.is_proc_macro(…)` from
`Target` (in favor of adding `.is_kind(…)`).
##### Fixed
- Added missing `manifest_path` field to `Artifact`. Fixes
[#​187](https://redirect.github.com/oli-obk/cargo_metadata/issues/187).
</details>
---
### Configuration
📅 **Schedule**: Branch creation - "before 5am on the first day of the
month" (UTC), Automerge - At any time (no schedule defined).
🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.
♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.
🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box
---
This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/rust-lang/cargo).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xOS4wIiwidXBkYXRlZEluVmVyIjoiMzkuMTkuMCIsInRhcmdldEJyYW5jaCI6Im1hc3RlciIsImxhYmVscyI6W119-->
### What does this PR try to resolve?
close https://github.com/rust-lang/cargo/issues/14810
Remove the registry description to reduce confusion, as the `spec`
already explains local `Cargo.toml` inspection behavior.
### How should we test and review this PR?
The unit test has been updated.
### Additional information
r? @epage