-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Breaking change to json-render-diagnostics
target name in nightly
#13867
Comments
The regression appeared in version |
3ca04e2 from #12783 seems related. cc @weihanglo |
Testing the changes, that does appear to be the cause. There has been some additional refactoring that prevents a clean revert. |
Thanks for the report. Yes, that's #12783, which fixes the behavior to match the documentation. See #12783 (comment). This is considered as a bugfix for the implementation. I've opened #13882 to include this caveat in the CHANGELOG. |
Thanks for the quick response! I understand that it was intentional, but I think it would make more sense to update the documentation. The output of diagnostics is the only reliable way to find the generated artifacts (lots of flags can move the location). This change broke the build system for a project I maintain and I suspect it will break others. For example, this is the method that Neon has used to find and copy the final CC: @dherman |
Here is a prior discussion of it. And I totally understand that. I'll check if we can make JSON message documentation a bit clearer. Thank you. |
…al crate name This is to support a breaking change in upcoming versions of cargo. See: rust-lang/cargo#13867
…al crate name This is to support a breaking change in upcoming versions of cargo. See: rust-lang/cargo#13867
When compiling with
--message-format=json-render-diagnostics
I expected to see this
target.name
match the name inCargo.tom
Instead, I see the
snake_case
version of the name. This differs from stable.This appears to impact all lib crate types, but not
bin
crates.Meta
rustc --version --verbose
:Example
Create the test project.
Compile on stable and view the output:
Compile with nightly:
Note that on stable
name
ismy-example
, but on nightly, it ismy_example
.The text was updated successfully, but these errors were encountered: