@@ -925,39 +925,22 @@ fn workspace_metadata() {
925
925
}
926
926
927
927
#[ cargo_test]
928
- fn workspace_metadata_with_dependencies_no_deps ( ) {
928
+ fn workspace_metadata_no_deps ( ) {
929
929
let p = project ( )
930
- // NOTE that 'artifact' isn't mentioned in the workspace here, yet it shows up as member.
931
930
. file (
932
931
"Cargo.toml" ,
933
932
r#"
934
933
[workspace]
935
934
members = ["bar", "baz"]
936
935
"# ,
937
936
)
938
- . file (
939
- "bar/Cargo.toml" ,
940
- r#"
941
- [package]
942
-
943
- name = "bar"
944
- version = "0.5.0"
945
-
946
-
947
- [dependencies]
948
- baz = { path = "../baz/" }
949
- artifact = { path = "../artifact/", artifact = "bin" }
950
- "# ,
951
- )
937
+ . file ( "bar/Cargo.toml" , & basic_lib_manifest ( "bar" ) )
952
938
. file ( "bar/src/lib.rs" , "" )
953
939
. file ( "baz/Cargo.toml" , & basic_lib_manifest ( "baz" ) )
954
940
. file ( "baz/src/lib.rs" , "" )
955
- . file ( "artifact/Cargo.toml" , & basic_bin_manifest ( "artifact" ) )
956
- . file ( "artifact/src/main.rs" , "fn main() {}" )
957
941
. build ( ) ;
958
942
959
- p. cargo ( "metadata --no-deps -Z bindeps" )
960
- . masquerade_as_nightly_cargo ( )
943
+ p. cargo ( "metadata --no-deps" )
961
944
. with_json (
962
945
r#"
963
946
{
@@ -978,42 +961,8 @@ fn workspace_metadata_with_dependencies_no_deps() {
978
961
"id": "bar[..]",
979
962
"keywords": [],
980
963
"source": null,
964
+ "dependencies": [],
981
965
"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
- ],
1017
966
"license_file": null,
1018
967
"links": null,
1019
968
"description": null,
@@ -1035,49 +984,6 @@ fn workspace_metadata_with_dependencies_no_deps() {
1035
984
"metadata": null,
1036
985
"publish": null
1037
986
},
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
- },
1081
987
{
1082
988
"authors": [
1083
989
@@ -1118,11 +1024,7 @@ fn workspace_metadata_with_dependencies_no_deps() {
1118
1024
"publish": null
1119
1025
}
1120
1026
],
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)"],
1126
1028
"resolve": null,
1127
1029
"target_directory": "[..]foo/target",
1128
1030
"version": 1,
0 commit comments