@@ -5806,6 +5806,77 @@ features = ["foo"]
5806
5806
) ;
5807
5807
}
5808
5808
5809
+ #[ cargo_test]
5810
+ fn workspace_with_local_dev_deps ( ) {
5811
+ let crates_io = registry:: init ( ) ;
5812
+ let p = project ( )
5813
+ . file (
5814
+ "Cargo.toml" ,
5815
+ r#"
5816
+ [workspace]
5817
+ members = ["main", "dev_dep"]
5818
+ resolver = "3"
5819
+
5820
+ [workspace.dependencies]
5821
+ dev_dep = { path = "dev_dep", version = "0.0.1" }
5822
+ "# ,
5823
+ )
5824
+ . file (
5825
+ "main/Cargo.toml" ,
5826
+ r#"
5827
+ [package]
5828
+ name = "main"
5829
+ version = "0.0.1"
5830
+ edition = "2024"
5831
+ authors = []
5832
+ license = "MIT"
5833
+ description = "main"
5834
+
5835
+ [dev-dependencies]
5836
+ dev_dep.workspace = true
5837
+ "# ,
5838
+ )
5839
+ . file (
5840
+ "dev_dep/Cargo.toml" ,
5841
+ r#"
5842
+ [package]
5843
+ name = "dev_dep"
5844
+ version = "0.0.1"
5845
+ edition = "2024"
5846
+ authors = []
5847
+ license = "MIT"
5848
+ description = "main"
5849
+ "# ,
5850
+ )
5851
+ . file ( "main/src/lib.rs" , "" )
5852
+ . file ( "dev_dep/src/lib.rs" , "" )
5853
+ . build ( ) ;
5854
+
5855
+ p. cargo ( "package -Zpackage-workspace" )
5856
+ . masquerade_as_nightly_cargo ( & [ "package-workspace" ] )
5857
+ . replace_crates_io ( crates_io. index_url ( ) )
5858
+ . with_stdout_data ( "" )
5859
+ . with_stderr_data ( str![ [ r#"
5860
+ [WARNING] manifest has no documentation, homepage or repository.
5861
+ See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info.
5862
+ [PACKAGING] dev_dep v0.0.1 ([ROOT]/foo/dev_dep)
5863
+ [PACKAGED] 4 files, [FILE_SIZE]B ([FILE_SIZE]B compressed)
5864
+ [WARNING] manifest has no documentation, homepage or repository.
5865
+ See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata for more info.
5866
+ [PACKAGING] main v0.0.1 ([ROOT]/foo/main)
5867
+ [UPDATING] crates.io index
5868
+ [ERROR] failed to prepare local package for uploading
5869
+
5870
+ Caused by:
5871
+ no matching package named `dev_dep` found
5872
+ location searched: crates.io index
5873
+ required by package `main v0.0.1 ([ROOT]/foo/main)`
5874
+
5875
+ "# ] ] )
5876
+ . with_status ( 101 )
5877
+ . run ( ) ;
5878
+ }
5879
+
5809
5880
fn workspace_with_local_deps_packaging_one_fails_project ( ) -> Project {
5810
5881
project ( )
5811
5882
. file (
0 commit comments