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

cargo.buildScripts.* are poor config names #13465

Open
Veykril opened this issue Oct 22, 2022 · 3 comments
Open

cargo.buildScripts.* are poor config names #13465

Veykril opened this issue Oct 22, 2022 · 3 comments
Labels
A-config configuration A-documentation docs for rust-analyzer usage/inner working C-enhancement Category: enhancement

Comments

@Veykril
Copy link
Member

Veykril commented Oct 22, 2022

Given cargo.buildScripts.overrideCommand allows an arbitrary command to be executed, these configs should not be prefixed with cargo. buildScripts is also a poor choice, given these are not build-script specific settings but also proc-macro related. We should come up with a better more fitting prefix, something like compileTimeDeps.*.

@Veykril Veykril added the A-config configuration label Oct 22, 2022
@bjorn3
Copy link
Member

bjorn3 commented Oct 22, 2022

We depend on cargo's json message format for getting the out dir paths back. As well as to map these messages to the right rust-analyzer project model crate.

@Veykril
Copy link
Member Author

Veykril commented Oct 22, 2022

Heh, that is a good point, but we do the same for diagnostics right? Though I guess those are rustc json blobs so technically not cargo related.

I guess the cargo stays, buildScripts is still less than ideal, iirc there were some people confused as to why those settings are related to proc-macros.

@bjorn3
Copy link
Member

bjorn3 commented Oct 22, 2022

Heh, that is a good point, but we do the same for diagnostics right? Though I guess those are rustc json blobs so technically not cargo related.

Indeed! Rust-analyzer has a strong dependency on rustc which is unlikely to change any time soon, but it isn't as much dependent on cargo due to rust-project.json. I think we should at least document which json messages rust-analyzer expects from cargo or another build system emulating cargo's build messages.

@Veykril Veykril added the A-documentation docs for rust-analyzer usage/inner working label Oct 22, 2022
@Veykril Veykril added the C-enhancement Category: enhancement label Feb 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-config configuration A-documentation docs for rust-analyzer usage/inner working C-enhancement Category: enhancement
Projects
None yet
Development

No branches or pull requests

2 participants