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
- We added `--ignore-rust-version` to `cargo update` and `cargo generate-lockfile` ([#13742](https://github.com/rust-lang/cargo/pull/13742))
139
-
- We added a placeholder config field so it can be forced on or off ([#13769](https://github.com/rust-lang/cargo/pull/13769))
139
+
- We added a placeholder config field so it can be forced on or off ([#13769](https://github.com/rust-lang/cargo/pull/13769)). We still need final names for this, see [#13540](https://github.com/rust-lang/cargo/issues/13540).
140
140
- We added `package.resolver = "3"` ([#13776](https://github.com/rust-lang/cargo/pull/13776))
141
141
- We made this the default resolver for Edition 2024 ([#13785](https://github.com/rust-lang/cargo/pull/13785))
142
142
@@ -183,7 +183,7 @@ There was some recent discussion on an issue for how `cargo add` should render f
A controversial aspect of this was to apply the same rendering to dependencies to distinguish between required, activated-optional, and deactivated-optional dependencies.
186
+
A question aspect of this was to apply the same rendering to dependencies to distinguish between required, activated-optional, and deactivated-optional dependencies.
187
187
188
188
epage also made the auto-selection of what version to show a little smarter.
189
189
Instead of showing the latest when a version is unspecified,
@@ -256,7 +256,7 @@ Its particularly an issue if the binary name starts with `cargo-` as that would
256
256
However, this only really happens with non-standard `PATH`s on Linux and Mac (Windows is a separate case) or having too-generic of script names in your `PATH`.
257
257
This lowered the priority for us.
258
258
259
-
We could possibly take advantage of `AT_EXECFN` so cargo can detect its being run as a `#!` interpreter and bypass the precedence rules.
259
+
We could possibly take advantage of `AT_EXECFN`where supported so cargo can detect its being run as a `#!` interpreter and bypass the precedence rules.
260
260
261
261
Talking about this brought up a new concern: `cargo <script>` loads the config file based on `<script>`, rather than your current working directory.
262
262
This is like `cargo install` and unlike all other cargo commands.
@@ -314,29 +314,27 @@ The core question to the discussion is "do we expect the benefits to be worth th
314
314
315
315
An additional use case that came up during the discussion was to combine this with [artifact dependencies](https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#artifact-dependencies) so you could have build scripts that were full packages that didn't require the overhead of publishing a full workspace.
316
316
317
-
This would create a footgun when it comes to workspaces.
317
+
Nested packages would create a footgun when it comes to workspaces.
318
318
If you have a nested package that is a [public dependency](https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#public-dependency) of multiple workspace members,
319
319
you could start passing types between the packages.
320
320
This will work locally because they all use the same instance of the nested package as a dependency.
321
321
When you publish, each package will have its own instance of the nested package and the types will become incompatible.
322
322
323
-
In general, there was unease that this could encourage people to vendor dependencies more often in a way that is less traceable and allows the code to drift in uncontrolled ways while we want to have the workflow encourage people to work directly with upstream.
323
+
In general, there was unease that nested packages could encourage people to vendor dependencies more often in a way that is less traceable and allows the code to drift in uncontrolled ways while we want to have the workflow encourage people to work directly with upstream.
324
324
325
325
As a side note, during the discussion, the idea came up for a new `pub(scope)` to allow access to private APIs within a [namespace](https://rust-lang.github.io/rfcs/3243-packages-as-optional-namespaces.html#motivation).
326
326
327
327
#### Workspace inheritance of deps
328
328
329
-
[LukeMathWalker](https://github.com/LukeMathWalker) recently announced [cargo autoinherit](https://mainmatter.com/blog/2024/03/18/cargo-autoinherit/) which will consolidate all of your dependency sources to
329
+
[LukeMathWalker](https://github.com/LukeMathWalker) recently announced [cargo autoinherit](https://mainmatter.com/blog/2024/03/18/cargo-autoinherit/) which will consolidate your dependencies of workspace members sources to
a [footgun came up with regards to `default-features`](https://www.reddit.com/r/rust/comments/1bjdnne/cargoautoinherit_dry_up_your_workspace/kvr6iq1/).
334
334
If you set `default-features = true` in the workspace dependencies then `default-features = false` in your package dependencies is ignored
This might not be too bad except `default-features = true` is the default when you say `dep = "1.0"`.
337
-
You'd then have to explicitly re-enable `default-features when needed`
338
-
339
-
For example:
336
+
This might not be too bad except `default-features = true` is the default including when using the `dep = "1.0"` syntax.
337
+
You'd then have to explicitly re-enable `default-features` when needed, for example:
340
338
```toml
341
339
[workspace.dependencies]
342
340
foo = { version = "1.0", default-features = false }
@@ -351,15 +349,15 @@ While discussing workspace inheritance for the
351
349
one thought that epage had was that maybe dependency inheritance should focus exclusively on inheriting the source of the dependency and not anything else.
352
350
When trying to not repeat oneself,
353
351
it can be easy to go overboard and de-duplicate logic that reflects more of the current implementation, and not the requirements.
354
-
As the implementation changes, you then have to shift things in and out of the shared or specific state.
352
+
As the implementation changes, you then have to shift things in and out between the shared and specific state.
355
353
356
354
Applying that concept to `default-features`,
357
355
maybe we should disallow it in workspace dependencies (on a new Edition),
358
356
and have the package dependencies' `default-features` always win.
359
357
As workspaces don't have an Edition, we could frame this from the package's perspective as it inherits a field, making it so the package's Edition applies.
360
358
361
-
Going to the full extreme of removing `default-features` and `features` from workspace dependencies might be controversial.
362
-
For example, likely an application would want to share `serde`'s `derive` feature throughoutt the workspace.
359
+
Going to the full extreme of removing `default-features` and `features` from workspace dependencies might be too large of departure from today.
360
+
For example, likely a maintainer would find it convenient to share `serde`'s `derive` feature throughout their workspace.
363
361
An incremental step could be to treat the lack of `default-features` in a workspace dependency as unset.
364
362
365
363
<!-- team meeting: 2024-03-26 -->
@@ -389,9 +387,7 @@ this will likely be stuck waiting on the 2027 Edition.
389
387
## Misc
390
388
391
389
- Thank to [PaulDance](https://github.com/PaulDance), we are now publishing `cargo-test-support` and `cargo-test-macro` which can be useful for developing tools that integrate with cargo [#13418](https://github.com/rust-lang/cargo/pull/13418). The focus is on Cargo's needs, making the APIs and documentation a little rough for others to adopt.
392
-
- Thanks for [linyihai](https://github.com/linyihai), we now have unstable support for `cargo update foo --precise <prerelease>`, last discussed in [1.76](https://blog.rust-lang.org/inside-rust/2024/01/03/this-development-cycle-in-cargo-1-76.html#rfc-3493-cargo-update---precise-prerelease).
393
-
394
-
https://github.com/rust-lang/cargo/pull/13626
390
+
- Thanks for [linyihai](https://github.com/linyihai), we now have unstable support for `cargo update foo --precise <prerelease>` ([#13626](https://github.com/rust-lang/cargo/pull/13626)), last discussed in [1.76](https://blog.rust-lang.org/inside-rust/2024/01/03/this-development-cycle-in-cargo-1-76.html#rfc-3493-cargo-update---precise-prerelease).
0 commit comments