Skip to content

Commit

Permalink
Auto merge of #17246 - davidbarsky:david/move-rust-project-generation…
Browse files Browse the repository at this point in the history
…-to-server, r=Veykril

feature: teach rust-analyzer to discover `linked_projects`

This PR's been a long-time coming, but like the title says, it introduces server-side project discovery and removes the extension hooks I previously introduced. I don't think this PR is ready to land, but here are the things I'm feeling squishy about:
- I don't think I like the idea of introducing the `cargo-metadata` command-but-for-everything-else in the `flycheck` module, but the progress reporting infrastructure was too convenient to pass up. Happy to move it elsewhere.

Here are the things I _know_ I need to change:
- For progress reporting, I'm extracting from a `serde_json::Value` that corresponds to `tracing_subsciber::fmt::Layer`'s JSON output. I'd like to make this a bit more structured/documented than the current nonsense I wrote.
- The progress reporting currently hardcodes "Buck"; it should be deriving that from the previously mentioned more-structured-output.
- This doesn't handle *reloading* when a corresponding buildfile is changed. It should be doing that.

<details>
<summary>Anyway, here's a video of rust-analyzer discovering a Buck target.</summary>

https://github.com/rust-lang/rust-analyzer/assets/2067774/be6cd9b9-2c9a-402d-847f-05f860a91df1
</details>
  • Loading branch information
bors committed Jul 18, 2024
2 parents a62ea0a + db43a5a commit 52143a5
Show file tree
Hide file tree
Showing 22 changed files with 877 additions and 169 deletions.
127 changes: 64 additions & 63 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions crates/flycheck/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ process-wrap.workspace = true
paths.workspace = true
stdx.workspace = true
toolchain.workspace = true
project-model.workspace = true

[lints]
workspace = true
Loading

0 comments on commit 52143a5

Please sign in to comment.