Skip to content

Conversation

lqd
Copy link
Member

@lqd lqd commented Sep 13, 2023

Recent versions of rust-analyzer trigger errors when formatting a file. The log looks like

[Error - 2:36:48 PM] Request textDocument/formatting failed.
  Message: Failed to spawn cd "/home/lqd/rust/compiler/rustc_trait_selection/src/traits/select" && "./build/host/rustfmt/bin/rustfmt" "--edition=2021"
  Code: -32603 

This PR switches the relative path in the r-a settings to a workspace path, so that calling rustfmt works from any folder and not just the workspace root.

@rustbot
Copy link
Collaborator

rustbot commented Sep 13, 2023

r? @Mark-Simulacrum

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 13, 2023
@rust-log-analyzer

This comment was marked as resolved.

@rustbot rustbot added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Sep 13, 2023
@RalfJung
Copy link
Member

I accidentally opened almost-but-not-quite the same PR at #115836.

@bors
Copy link
Collaborator

bors commented Sep 17, 2023

☔ The latest upstream changes (presumably #115900) made this pull request unmergeable. Please resolve the merge conflicts.

@lqd lqd closed this Sep 17, 2023
@lqd lqd deleted the fix-ra-rustfmt branch September 17, 2023 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants