-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
[WIP]: generating rust-project file for r-a #120611
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2d0fb4d
to
fdf34cf
Compare
Contains the implementation for generating rust-project.json data which can be utilized for LSPs (Language Server Protocols). Signed-off-by: onur-ozkan <work@onurozkan.dev>
Signed-off-by: onur-ozkan <work@onurozkan.dev>
Signed-off-by: onur-ozkan <work@onurozkan.dev>
fdf34cf
to
c78ef01
Compare
Signed-off-by: onur-ozkan <work@onurozkan.dev>
env: BTreeMap<String, String>, | ||
is_proc_macro: bool, |
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.
this isn't documented, but you probably want to include a include_dirs
that corresponds to each src/
directory. If rustc
keeps a Cargo-like structure, knowing the crate entrypoint is probably enough, but if it drifts, include_dirs
will ensure all rust-analyzer functionality will keep working.
(it's important to note that rust-project.json
is basically a lower-level version of what rust-analyzer already doing with Cargo, so you just need to a do a little more work via rust-project.json to ensure that everything continues to just work.)
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2c32a54
to
9219a80
Compare
Signed-off-by: onur-ozkan <work@onurozkan.dev>
cd9063c
to
558bb77
Compare
jfyi I am unable to proceed on this task because I cannot set a custom rustc path in the etc/rust_analyzer_settings.json isn't helpful as it re-indexes everything from scratch, ignoring the rust-project.json file. @rustbot blocked. |
It should I agree, opened rust-lang/rust-analyzer#16523 as a reminder. I can look into it the coming week |
rust-lang/rust-analyzer#16537 should fix this |
@onur-ozkan what's the status here? Is this blocked on anything or just waiting for someone to pick it up? |
Not blocked anymore. While it was blocked I shifted myself to different tasks and I don't have enough space to continue on this at the moment. Maybe in couple months. |
I do think that this is some of the most impactful work on bootstrap right now and would prioritize it over other bootstrap things, but you're of course free to do whatever you want and have time for, any work on bootstrap is better than nothing ❤️ (and nothing is fine too if you're busy with other things, of course!). |
At the moment I am working on 2 major tasks (removing python from bootstrap and redesigning stage0 std). Once I complete either of these tasks I will have the capacity to start working on another one (which will be this one). If anyone else has additional time and is interested in working on this, feel free to takeover this PR. |
rust-lang/rust-analyzer#17246 could help a bit with the UX of using |
☔ The latest upstream changes (presumably #126540) made this pull request unmergeable. Please resolve the merge conflicts. |
PR is in the early stage and it is not ready for review yet. I want to check the CI results with the changes I will push.
r? ghost