Skip to content

Commit 10ffdd5

Browse files
committed
Roll back workspace_metadata_with_dependencies_no_deps() (#10407)
That way, we know that the case without non-artifact dependencies keeps working, see #10407 (comment) for the source of the change.
1 parent 13f4319 commit 10ffdd5

File tree

1 file changed

+5
-103
lines changed

1 file changed

+5
-103
lines changed

tests/testsuite/metadata.rs

Lines changed: 5 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -925,39 +925,22 @@ fn workspace_metadata() {
925925
}
926926

927927
#[cargo_test]
928-
fn workspace_metadata_with_dependencies_no_deps() {
928+
fn workspace_metadata_no_deps() {
929929
let p = project()
930-
// NOTE that 'artifact' isn't mentioned in the workspace here, yet it shows up as member.
931930
.file(
932931
"Cargo.toml",
933932
r#"
934933
[workspace]
935934
members = ["bar", "baz"]
936935
"#,
937936
)
938-
.file(
939-
"bar/Cargo.toml",
940-
r#"
941-
[package]
942-
943-
name = "bar"
944-
version = "0.5.0"
945-
authors = ["[email protected]"]
946-
947-
[dependencies]
948-
baz = { path = "../baz/" }
949-
artifact = { path = "../artifact/", artifact = "bin" }
950-
"#,
951-
)
937+
.file("bar/Cargo.toml", &basic_lib_manifest("bar"))
952938
.file("bar/src/lib.rs", "")
953939
.file("baz/Cargo.toml", &basic_lib_manifest("baz"))
954940
.file("baz/src/lib.rs", "")
955-
.file("artifact/Cargo.toml", &basic_bin_manifest("artifact"))
956-
.file("artifact/src/main.rs", "fn main() {}")
957941
.build();
958942

959-
p.cargo("metadata --no-deps -Z bindeps")
960-
.masquerade_as_nightly_cargo()
943+
p.cargo("metadata --no-deps")
961944
.with_json(
962945
r#"
963946
{
@@ -978,42 +961,8 @@ fn workspace_metadata_with_dependencies_no_deps() {
978961
"id": "bar[..]",
979962
"keywords": [],
980963
"source": null,
964+
"dependencies": [],
981965
"license": null,
982-
"dependencies": [
983-
{
984-
"features": [],
985-
"kind": null,
986-
"name": "artifact",
987-
"optional": false,
988-
"path": "[..]/foo/artifact",
989-
"registry": null,
990-
"rename": null,
991-
"req": "*",
992-
"source": null,
993-
"target": null,
994-
"uses_default_features": true,
995-
"artifact": {
996-
"kinds": [
997-
"bin"
998-
],
999-
"lib": false,
1000-
"target": null
1001-
}
1002-
},
1003-
{
1004-
"features": [],
1005-
"kind": null,
1006-
"name": "baz",
1007-
"optional": false,
1008-
"path": "[..]/foo/baz",
1009-
"registry": null,
1010-
"rename": null,
1011-
"req": "*",
1012-
"source": null,
1013-
"target": null,
1014-
"uses_default_features": true
1015-
}
1016-
],
1017966
"license_file": null,
1018967
"links": null,
1019968
"description": null,
@@ -1035,49 +984,6 @@ fn workspace_metadata_with_dependencies_no_deps() {
1035984
"metadata": null,
1036985
"publish": null
1037986
},
1038-
{
1039-
"authors": [
1040-
1041-
],
1042-
"categories": [],
1043-
"default_run": null,
1044-
"dependencies": [],
1045-
"description": null,
1046-
"documentation": null,
1047-
"edition": "2015",
1048-
"features": {},
1049-
"homepage": null,
1050-
"id": "artifact 0.5.0 (path+file:[..]/foo/artifact)",
1051-
"keywords": [],
1052-
"license": null,
1053-
"license_file": null,
1054-
"links": null,
1055-
"manifest_path": "[..]/foo/artifact/Cargo.toml",
1056-
"metadata": null,
1057-
"name": "artifact",
1058-
"publish": null,
1059-
"readme": null,
1060-
"repository": null,
1061-
"rust_version": null,
1062-
"source": null,
1063-
"targets": [
1064-
{
1065-
"crate_types": [
1066-
"bin"
1067-
],
1068-
"doc": true,
1069-
"doctest": false,
1070-
"edition": "2015",
1071-
"kind": [
1072-
"bin"
1073-
],
1074-
"name": "artifact",
1075-
"src_path": "[..]/foo/artifact/src/main.rs",
1076-
"test": true
1077-
}
1078-
],
1079-
"version": "0.5.0"
1080-
},
1081987
{
1082988
"authors": [
1083989
@@ -1118,11 +1024,7 @@ fn workspace_metadata_with_dependencies_no_deps() {
11181024
"publish": null
11191025
}
11201026
],
1121-
"workspace_members": [
1122-
"bar 0.5.0 (path+file:[..]bar)",
1123-
"artifact 0.5.0 (path+file:[..]/foo/artifact)",
1124-
"baz 0.5.0 (path+file:[..]baz)"
1125-
],
1027+
"workspace_members": ["bar 0.5.0 (path+file:[..]bar)", "baz 0.5.0 (path+file:[..]baz)"],
11261028
"resolve": null,
11271029
"target_directory": "[..]foo/target",
11281030
"version": 1,

0 commit comments

Comments
 (0)