You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When pipelined compilation is enabled, the process wrapper parses the output from stderr as JSON to listen for when rmetadata has been produced and thus it can kill the action.
Thus, if a proc-macro prints to stderr it will break the build. For example, I'm running into this now via num_enum -> num_enum_derive -> proc-macro-crate which prints the following warning:
Warning: `CARGO` env variable not set.
=> defaulting to `num_enum`
Warning: `CARGO` env variable not set.
=> defaulting to `num_enum`
Warning: `CARGO` env variable not set.
=> defaulting to `num_enum`
Maybe we can set the CARGO env variable to fix this case specifically, but in general it would be nice if the process_wrapper could tolerate non-JSON output. Probably we can just skip non-JSON lines and expect rustc to do the right thing.
If someone is interested in picking this up, I believe the change needs to be made in these two functions. If we fail to parse a line as JSON then I think we want to return LineResult::Skip. Optionally we probably want to make this configurable, e.g. allow users to specify an option like parse_rustc_output=strict which will retain the current behavior and fail if the output isn't JSON.
The text was updated successfully, but these errors were encountered:
When pipelined compilation is enabled, the process wrapper parses the output from
stderr
as JSON to listen for whenrmetadata
has been produced and thus it can kill the action.Thus, if a proc-macro prints to
stderr
it will break the build. For example, I'm running into this now vianum_enum
->num_enum_derive
->proc-macro-crate
which prints the following warning:Maybe we can set the
CARGO
env variable to fix this case specifically, but in general it would be nice if theprocess_wrapper
could tolerate non-JSON output. Probably we can just skip non-JSON lines and expectrustc
to do the right thing.If someone is interested in picking this up, I believe the change needs to be made in these two functions. If we fail to parse a line as JSON then I think we want to return
LineResult::Skip
. Optionally we probably want to make this configurable, e.g. allow users to specify an option likeparse_rustc_output=strict
which will retain the current behavior and fail if the output isn't JSON.The text was updated successfully, but these errors were encountered: