-
Notifications
You must be signed in to change notification settings - Fork 446
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
Add an option to save the json output from rustc to pass to rust-analyzer #1942
Conversation
3cb909e
to
7fd0456
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi! Thanks for working on this!
Would you be able to show how rust-analyzer
could consume this? My understanding is that this would allow your IDE to inline errors in the code? Similar to the cargo check behavior. But according to #1633 there isn't any hook in rust-analyzer
for this yet or there may not be? Is that correct?
We'd use a custom vscode extension (I've published it here) for bazel + rust (I talked to rust-analyzer folks, and they agreed that all non-cargo build systems should probably write their own rust-analyzer. I have a prototype with everything working here, but the TLDR is:
|
@matts1 Have you been using this patch successfully in your project? |
Yeah, it's been working fine for me. |
I'm crazy interested in this one, but I can see it has stalled a bit. Can I help somehow? I have forked the repo and rebased your changes to solve the conflicts, so I could submit my branch if that helps... 😃 |
@UebelAndre Could you please take a look again. CI is failing for unrelated reasons ( You can try it out by the following:
You should then see a |
I think this would be awesome to get this change in, any chance that any of the maintainers could give it some time? |
9d6c94d
to
f5d3dbc
Compare
I just fixed the merge conflicts, so it should be good to go as soon as it gets approved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@UebelAndre Your changes requested doesn't appear to be actual changes, but I can't work out how to resolve that from github's perspective. Should be fine to review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay here. I think this seems good 😄. Just one question.
Any chance we can get this on main? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay here 😅
I think this looks good by my final request would be updating //docs:rust_analyzer.vm
to describe the steps mentioned here: #1942 (comment)
2149fd4
to
d5485a9
Compare
@UebelAndre Should be good to go |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
The error format is checked whenever it's set, not only when rustc_quit_on_rmeta is set.
When this flag is set, bazel will write diagnostics to the output groups rustc_output and rustc_rmeta_output. Change-Id: I2690b571a0bc61fa58dc11fb480b725985603bd5
@googleson78 originally wrote #1657 in order to solve this problem. As discussed in that PR, they're no longer working on this, so I offered to pick this up. This is the same PR as that one, but has some bugfixes and refactoring applied.