@@ -3976,11 +3976,13 @@ fn compiler_json_error_format() {
3976
3976
name = "foo"
3977
3977
version = "0.5.0"
3978
3978
3979
+ build = "build.rs"
3979
3980
3980
3981
[dependencies.bar]
3981
3982
path = "bar"
3982
3983
"# ,
3983
3984
)
3985
+ . file ( "build.rs" , "fn main() { println!(\" cargo:rustc-cfg=xyz\" ) }" )
3984
3986
. file ( "src/main.rs" , "fn main() { let unused = 92; }" )
3985
3987
. file (
3986
3988
"bar/Cargo.toml" ,
@@ -4035,6 +4037,36 @@ fn compiler_json_error_format() {
4035
4037
"fresh": false
4036
4038
}
4037
4039
4040
+ {
4041
+ "reason":"compiler-artifact",
4042
+ "package_id":"foo 0.5.0 ([..])",
4043
+ "target":{
4044
+ "kind":["custom-build"],
4045
+ "crate_types":["bin"],
4046
+ "name":"build-script-build",
4047
+ "src_path":"[..]build.rs"
4048
+ },
4049
+ "profile": {
4050
+ "debug_assertions": true,
4051
+ "debuginfo": 2,
4052
+ "opt_level": "0",
4053
+ "overflow_checks": true,
4054
+ "test": false
4055
+ },
4056
+ "features": [],
4057
+ "filenames": "{...}",
4058
+ "fresh": false
4059
+ }
4060
+
4061
+ {
4062
+ "reason":"build-script-executed",
4063
+ "package_id":"foo 0.5.0 ([..])",
4064
+ "linked_libs":[],
4065
+ "linked_paths":[],
4066
+ "env":[],
4067
+ "cfgs":["xyz"]
4068
+ }
4069
+
4038
4070
{
4039
4071
"reason":"compiler-message",
4040
4072
"package_id":"foo 0.5.0 ([..])",
@@ -4080,6 +4112,27 @@ fn compiler_json_error_format() {
4080
4112
. arg ( "json" ) ,
4081
4113
execs ( ) . with_status ( 0 ) . with_json (
4082
4114
r#"
4115
+ {
4116
+ "reason":"compiler-artifact",
4117
+ "package_id":"foo 0.5.0 ([..])",
4118
+ "target":{
4119
+ "kind":["custom-build"],
4120
+ "crate_types":["bin"],
4121
+ "name":"build-script-build",
4122
+ "src_path":"[..]build.rs"
4123
+ },
4124
+ "profile": {
4125
+ "debug_assertions": true,
4126
+ "debuginfo": 2,
4127
+ "opt_level": "0",
4128
+ "overflow_checks": true,
4129
+ "test": false
4130
+ },
4131
+ "features": [],
4132
+ "filenames": "{...}",
4133
+ "fresh": true
4134
+ }
4135
+
4083
4136
{
4084
4137
"reason":"compiler-artifact",
4085
4138
"profile": {
@@ -4101,6 +4154,15 @@ fn compiler_json_error_format() {
4101
4154
"fresh": true
4102
4155
}
4103
4156
4157
+ {
4158
+ "reason":"build-script-executed",
4159
+ "package_id":"foo 0.5.0 ([..])",
4160
+ "linked_libs":[],
4161
+ "linked_paths":[],
4162
+ "env":[],
4163
+ "cfgs":["xyz"]
4164
+ }
4165
+
4104
4166
{
4105
4167
"reason":"compiler-artifact",
4106
4168
"package_id":"foo 0.5.0 ([..])",
0 commit comments