diff --git a/src/cargo/ops/resolve.rs b/src/cargo/ops/resolve.rs index d4c53910162..2570723ec57 100644 --- a/src/cargo/ops/resolve.rs +++ b/src/cargo/ops/resolve.rs @@ -408,6 +408,12 @@ pub fn resolve_with_previous<'cfg>( registry.lock_patches(); } + // Some packages are already loaded when setting up a workspace. This + // makes it so anything that was already loaded will not be loaded again. + // Without this there were cases where members would be parsed multiple times + ws.preload(registry); + + // In case any members were not already loaded or the Workspace is_ephemeral. for member in ws.members() { registry.add_sources(Some(member.package_id().source_id()))?; } diff --git a/tests/testsuite/features.rs b/tests/testsuite/features.rs index cc5d10e4045..89f3f06b647 100644 --- a/tests/testsuite/features.rs +++ b/tests/testsuite/features.rs @@ -2001,36 +2001,6 @@ For more information, see issue #8813 , and please leave a comment if this will be a problem for your project. -[WARNING] invalid character `+` in feature `+foo` in package foo v0.1.0 ([ROOT]/foo), the first character must be a Unicode XID start character or digit (most letters or `_` or `0` to `9`) -This was previously accepted but is being phased out; it will become a hard error in a future release. -For more information, see issue #8813 , and please leave a comment if this will be a problem for your project. -[WARNING] invalid character `-` in feature `-foo` in package foo v0.1.0 ([ROOT]/foo), the first character must be a Unicode XID start character or digit (most letters or `_` or `0` to `9`) -This was previously accepted but is being phased out; it will become a hard error in a future release. -For more information, see issue #8813 , and please leave a comment if this will be a problem for your project. -[WARNING] invalid character `.` in feature `.foo` in package foo v0.1.0 ([ROOT]/foo), the first character must be a Unicode XID start character or digit (most letters or `_` or `0` to `9`) -This was previously accepted but is being phased out; it will become a hard error in a future release. -For more information, see issue #8813 , and please leave a comment if this will be a problem for your project. -[WARNING] invalid character `?` in feature `?foo` in package foo v0.1.0 ([ROOT]/foo), the first character must be a Unicode XID start character or digit (most letters or `_` or `0` to `9`) -This was previously accepted but is being phased out; it will become a hard error in a future release. -For more information, see issue #8813 , and please leave a comment if this will be a problem for your project. -[WARNING] invalid character `¼` in feature `a¼` in package foo v0.1.0 ([ROOT]/foo), characters must be Unicode XID characters, `+`, or `.` (numbers, `+`, `-`, `_`, `.`, or most letters) -This was previously accepted but is being phased out; it will become a hard error in a future release. -For more information, see issue #8813 , and please leave a comment if this will be a problem for your project. -[WARNING] invalid character `:` in feature `foo:bar` in package foo v0.1.0 ([ROOT]/foo), characters must be Unicode XID characters, `+`, or `.` (numbers, `+`, `-`, `_`, `.`, or most letters) -This was previously accepted but is being phased out; it will become a hard error in a future release. -For more information, see issue #8813 , and please leave a comment if this will be a problem for your project. -[WARNING] invalid character `?` in feature `foo?` in package foo v0.1.0 ([ROOT]/foo), characters must be Unicode XID characters, `+`, or `.` (numbers, `+`, `-`, `_`, `.`, or most letters) -This was previously accepted but is being phased out; it will become a hard error in a future release. -For more information, see issue #8813 , and please leave a comment if this will be a problem for your project. -[WARNING] invalid character `Ⓐ` in feature `ⒶⒷⒸ` in package foo v0.1.0 ([ROOT]/foo), the first character must be a Unicode XID start character or digit (most letters or `_` or `0` to `9`) -This was previously accepted but is being phased out; it will become a hard error in a future release. -For more information, see issue #8813 , and please leave a comment if this will be a problem for your project. -[WARNING] invalid character `Ⓑ` in feature `ⒶⒷⒸ` in package foo v0.1.0 ([ROOT]/foo), characters must be Unicode XID characters, `+`, or `.` (numbers, `+`, `-`, `_`, `.`, or most letters) -This was previously accepted but is being phased out; it will become a hard error in a future release. -For more information, see issue #8813 , and please leave a comment if this will be a problem for your project. -[WARNING] invalid character `Ⓒ` in feature `ⒶⒷⒸ` in package foo v0.1.0 ([ROOT]/foo), characters must be Unicode XID characters, `+`, or `.` (numbers, `+`, `-`, `_`, `.`, or most letters) -This was previously accepted but is being phased out; it will become a hard error in a future release. -For more information, see issue #8813 , and please leave a comment if this will be a problem for your project. [CHECKING] foo v0.1.0 [..] [FINISHED] [..] ")