@@ -6028,18 +6028,21 @@ fn registry_inferred_from_unique_option() {
6028
6028
6029
6029
p. cargo ( "package -Zpackage-workspace" )
6030
6030
. masquerade_as_nightly_cargo ( & [ "package-workspace" ] )
6031
- . with_status ( 101 )
6032
6031
. with_stderr_data ( str![ [ r#"
6033
6032
[PACKAGING] dep v0.1.0 ([ROOT]/foo/dep)
6034
6033
[PACKAGED] 3 files, [FILE_SIZE]B ([FILE_SIZE]B compressed)
6035
6034
[PACKAGING] main v0.0.1 ([ROOT]/foo/main)
6036
6035
[UPDATING] `alternative` index
6037
- [ERROR] failed to prepare local package for uploading
6038
-
6039
- Caused by:
6040
- no matching package named `dep` found
6041
- location searched: registry `alternative`
6042
- required by package `main v0.0.1 ([ROOT]/foo/main)`
6036
+ [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed)
6037
+ [VERIFYING] dep v0.1.0 ([ROOT]/foo/dep)
6038
+ [COMPILING] dep v0.1.0 ([ROOT]/foo/target/package/dep-0.1.0)
6039
+ [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
6040
+ [VERIFYING] main v0.0.1 ([ROOT]/foo/main)
6041
+ [UPDATING] `alternative` index
6042
+ [UNPACKING] dep v0.1.0 (registry `[ROOT]/foo/target/package/tmp-registry`)
6043
+ [COMPILING] dep v0.1.0 (registry `alternative`)
6044
+ [COMPILING] main v0.0.1 ([ROOT]/foo/target/package/main-0.0.1)
6045
+ [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
6043
6046
6044
6047
"# ] ] )
6045
6048
. run ( ) ;
@@ -6100,8 +6103,7 @@ fn registry_not_inferred_because_of_conflict() {
6100
6103
. masquerade_as_nightly_cargo ( & [ "package-workspace" ] )
6101
6104
. with_status ( 101 )
6102
6105
. with_stderr_data ( str![ [ r#"
6103
- [ERROR] `dep` cannot be packaged.
6104
- The registry `crates-io` is not listed in the `package.publish` value in Cargo.toml.
6106
+ [ERROR] conflicts between `package.publish` fields in the selected packages
6105
6107
6106
6108
"# ] ] )
6107
6109
. run ( ) ;
@@ -6121,10 +6123,21 @@ The registry `alternative` is not listed in the `package.publish` value in Cargo
6121
6123
alt_reg. index_url( )
6122
6124
) )
6123
6125
. masquerade_as_nightly_cargo ( & [ "package-workspace" ] )
6124
- . with_status ( 101 )
6125
6126
. with_stderr_data ( str![ [ r#"
6126
- [ERROR] `dep` cannot be packaged.
6127
- The registry `crates-io` is not listed in the `package.publish` value in Cargo.toml.
6127
+ [PACKAGING] dep v0.1.0 ([ROOT]/foo/dep)
6128
+ [PACKAGED] 3 files, [FILE_SIZE]B ([FILE_SIZE]B compressed)
6129
+ [PACKAGING] main v0.0.1 ([ROOT]/foo/main)
6130
+ [UPDATING] `alternative` index
6131
+ [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed)
6132
+ [VERIFYING] dep v0.1.0 ([ROOT]/foo/dep)
6133
+ [COMPILING] dep v0.1.0 ([ROOT]/foo/target/package/dep-0.1.0)
6134
+ [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
6135
+ [VERIFYING] main v0.0.1 ([ROOT]/foo/main)
6136
+ [UPDATING] `alternative` index
6137
+ [UNPACKING] dep v0.1.0 (registry `[ROOT]/foo/target/package/tmp-registry`)
6138
+ [COMPILING] dep v0.1.0 (registry `alternative`)
6139
+ [COMPILING] main v0.0.1 ([ROOT]/foo/target/package/main-0.0.1)
6140
+ [FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
6128
6141
6129
6142
"# ] ] )
6130
6143
. run ( ) ;
@@ -6185,8 +6198,7 @@ fn registry_not_inferred_because_of_multiple_options() {
6185
6198
. masquerade_as_nightly_cargo ( & [ "package-workspace" ] )
6186
6199
. with_status ( 101 )
6187
6200
. with_stderr_data ( str![ [ r#"
6188
- [ERROR] `dep` cannot be packaged.
6189
- The registry `crates-io` is not listed in the `package.publish` value in Cargo.toml.
6201
+ [ERROR] --registry is required to disambiguate between "alternative" or "alternative2" registries
6190
6202
6191
6203
"# ] ] )
6192
6204
. run ( ) ;
@@ -6269,8 +6281,7 @@ fn registry_not_inferred_because_of_mismatch() {
6269
6281
. masquerade_as_nightly_cargo ( & [ "package-workspace" ] )
6270
6282
. with_status ( 101 )
6271
6283
. with_stderr_data ( str![ [ r#"
6272
- [ERROR] `main` cannot be packaged.
6273
- The registry `crates-io` is not listed in the `package.publish` value in Cargo.toml.
6284
+ [ERROR] --registry is required because not all `package.publish` settings agree
6274
6285
6275
6286
"# ] ] )
6276
6287
. run ( ) ;
0 commit comments