You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: posts/inside-rust/2024-10-01-this-development-cycle-in-cargo-1.82.md
+12-12
Original file line number
Diff line number
Diff line change
@@ -84,7 +84,7 @@ we put out a new round of [call-for-testing](https://github.com/rust-lang/cargo/
84
84
We're grateful for the feedback we've received!
85
85
86
86
A particularly confusing aspect of the `fallback` strategy is that Cargo may select a dependency that is either
87
-
- Too new for your `package.rust-version` because no MSRV-compatible version was available and so we did a `fallback` to an MSRV-incompatible one
87
+
- Too new for your `package.rust-version` because no MSRV-compatible version was available and so Cargo did a `fallback` to an MSRV-incompatible one
88
88
- Older than is needed by your package if your version requirement is too liberal and your package doesn't set `package.rust-version` but something else in your workspace does
89
89
90
90
After several tweaks to Cargo's locking output (
@@ -95,21 +95,21 @@ After several tweaks to Cargo's locking output (
- when Cargo selected a dependency version that is incompatible with the MSRV of workspace members that transitively depend on it
98
+
), Cargo now report to users
99
+
- when it selected a dependency version that is incompatible with the MSRV of workspace members that transitively depend on it
100
100
- when a newer version of a package is available that is compatible with the MSRV of workspace members that transitively depend on it
101
101
102
102

103
103
104
104
<!-- team meeting: 2024-08-20 -->
105
105
<!-- team meeting: 2024-08-27 -->
106
106
The testing feedback was more than `fallback` behavior being confusing but that it can fail to provide the benefits of an MSRV-aware resolver when in a workspace with multiple MSRVs ([#14414](https://github.com/rust-lang/cargo/issues/14414)).
107
-
The ideal state would be that when resolving a dependency, we only consider the MSRVs of the workspace members that transitively depend on it.
108
-
The problem is that we don't know every path to a dependency until the resolve is done.
109
-
We select a version of a dependency when we first come across it and then only try another version if the selected version is rejected by another path to it.
107
+
The ideal state would be that when resolving a dependency, Cargo only consider the MSRVs of the workspace members that transitively depend on it.
108
+
The problem is that Cargo doesn't know every path to a dependency until the resolve is done.
109
+
Cargo selects a version of a dependency when it first comes across it and then only tries another version if the selected version is rejected by another path to it.
110
110
If we `deny`d dependency versions with an incompatible MSRV, with enough work we could hit the ideal case.
111
111
The problem is how much work this would take and that there are times packages intentionally select MSRV-incompatible dependencies (e.g. features with a different MSRV, not caring about MSRV for dev-dependencies, etc).
112
-
Our `fallback` strategy requires that we pick a "good enough" version when we come across a dependency version because another path to it cannot reject it and cause a new version to be selected.
112
+
Our `fallback` strategy requires that Cargo pick a "good enough" version when it come across a dependency version because another path to it cannot reject it and cause a new version to be selected.
113
113
Currently, the "good enough" version is the lowest of all `package.rust-version`s in a workspace.
114
114
For any package in a workspace with a higher MSRV, this puts users in the situation of either intentionally holding back their dependency versions to make up for Cargo's shortcomings or they lose out on an MSRV-aware resolver.
115
115
@@ -342,9 +342,9 @@ Rustc has the ability to "silently" emit the lint in json
so that Cargo can aggregate the results and report the lint to the user.
344
344
Cargo still won't have enough information if you build `cargo check --bin foo` as all build targets need to run.
345
-
To handle this, we planned to not emit the lint unless all relevant build-targets are built.
346
-
`build.rs` is always built, so we can always emit for `build-dependencies`.
347
-
If all `bin` and `lib` build-targets are built, then we can emit for normal `dependencies.`
345
+
To handle this, we planned for Cargo to not emit the lint unless all relevant build-targets are built.
346
+
`build.rs` is always built, so Cargo can always emit for `build-dependencies`.
347
+
If all `bin` and `lib` build-targets are built, then Cargo can emit for normal `dependencies.`
348
348
That just leaves `dev-dependencies` as there currently isn't any way to build `bench`, `test`, `example`, and doc tests all at once as `--all-targets` excludes doc tests.
349
349
350
350
Once we figure out `--all-targets` and doc tests, we can [upstream `cargo-udeps` into Cargo](https://github.com/est31/cargo-udeps/issues/276#issuecomment-2328510760).
@@ -377,7 +377,7 @@ As we are working to add `--doc` to these commands, we can then add `--all-targe
377
377
378
378
<!-- 2024-07-30 -->
379
379
[RFC #3371](https://github.com/rust-lang/rfcs/pull/3371) makes the `target-dir` config field and `--target-dir` flag templated so users can easily move all `target-dir`s out of their source directories while keeping them separate.
380
-
We've also had a long outstanding unstable feature to specify where the write build artifacts to with `--artifact-dir`, formerly `--out-dir`
380
+
Cargo also has a long outstanding unstable feature to specify where the write build artifacts to with `--artifact-dir`, formerly `--out-dir`
0 commit comments