Skip to content
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

Generated rust-project.json files now include sysroot paths #1641

Merged
merged 5 commits into from
Nov 9, 2022

Conversation

UebelAndre
Copy link
Collaborator

@UebelAndre UebelAndre commented Nov 8, 2022

Fixes #1576

Special thanks to @snowp!

@UebelAndre
Copy link
Collaborator Author

This is an alternate implementation of #1580 which doesn't add any rust-analyzer fields to the core rust_toolchain. The somewhat downside of this implementation though is that unlike #1580 I'm updating rust-analyzer toolchain to begin to contain it's own sysroot which is defined separately from rust_toolchain. I ended up on this implementation due to the fact that rust_toolchain does not expose the raw files it ingests and instead, creates a unique sysroot for actions here. To my knowledge, the rust-analyzer sysroot is always expected to run on the host so using anything in execroot could lead to unexpected behavior. So to have a simple location that won't change out from under rust-analyzer in the output_user_root for a workspace, rust-analyzer now directly depends on a rustc binary. If this is not necessary I think it'd be great to clean up but the thing I like most about this approach is that rust_toolchain is left alone.

@UebelAndre UebelAndre marked this pull request as ready for review November 8, 2022 19:07
@UebelAndre UebelAndre merged commit c8ab970 into bazelbuild:main Nov 9, 2022
@UebelAndre UebelAndre deleted the rust-analyzer branch November 9, 2022 22:38
@snowp
Copy link

snowp commented Nov 10, 2022

Thanks for taking this over the finish line!

EnzoPlayer0ne pushed a commit to EnzoPlayer0ne/rules_rust that referenced this pull request Mar 14, 2023
…ld#1641)

* Generated rust-project.json files now include sysroot paths

* Regenerate documentation

* Responded to PR feedback

* Regenerate documentation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

proc_macros do not work with RA on 1.64
4 participants