-
Notifications
You must be signed in to change notification settings - Fork 13.5k
make rust-analyzer use a dedicated build directory #141839
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
base: master
Are you sure you want to change the base?
Conversation
rustbot has assigned @Mark-Simulacrum. Use |
This comment has been minimized.
This comment has been minimized.
I feel like this was discussed #general > ✔ Setup multiple editors for work on standard lib? @ 💬 but I don't remember why we used a top-level |
Oh I think it just happens to be an option that works. |
It has unintuitive interactions with If people choose to inflict those risks on themselves, fine, but I don’t think a nested RA build directory is a responsible default. |
Oh right. I think that's the caveat I was vaguely recalling... |
would it be good to get |
Or even just avoid deleting |
Bootstrap “owns” the build directory, so I think it's reasonable for
IIRC, one of the motivations people commonly cite for using |
Anyhow, I strongly agree that our default IDE configs really should be using a separate build dir (e.g. |
I recently found that |
Could you file a compiler MCP for this? I'd like to see some more eyes on this before we move in this direction. |
This won't actually work reliably due to a bug in rustic: emacs-rustic/rustic#105 |
That seems specific to emacs? r=me on the change itself once MCP is approved. |
Ah, right, this will still improve things for other editors (this PR was linked to me as "changing the default for emacs"), so there's no point blocking it on emacs being fixed. |
the MCP is now accepted and the pr updated to match |
This avoids rust-analyzer having to wait for a build lock due to ./x running other commands (and the other way around).
made the move to build-rust-analyzer/ more comprehensive... it did not cover rustfmt and procmacro settings should be ready now @Mark-Simulacrum |
I'm not sure this is actually the right approach. Doing so makes it so that when rust-analyzer runs A better approach might be to have some shim binary (or bootstrap option) that oversees rust-analyzer processes and aborts any work in progress when it detects an actual user-run command is waiting to acquire the lock. |
@fee1-dead I'm not sure that fixes the other issue this fixes, which is cache corruption, which was happening to me really often, causing changes to source code to not update the behavior of the final binary. |
@bors r+ |
☔ The latest upstream changes (presumably #143888) made this pull request unmergeable. Please resolve the merge conflicts. |
inspired by #132794