Our project model code is rather complicated -- the logic for lowering
from `cargo metadata` to `CrateGraph` is fiddly and special-case. So
far, we survived without testing this at all, but this increasingly
seems like a poor option.
So this PR introduces a simple tests just to detect the most obvious
failures. The idea here is that, although we rely on external processes
(cargo & rustc), we are actually using their stable interfaces, so we
might just mock out the outputs.
Long term, I would like to try to virtualize IO here, so as to do such
mocking in a more principled way, but lets start simple.
Should we forgo the mocking and just call `cargo metadata` directly
perhaps? Touch question -- I personally feel that fast, in-process tests
are more important in this case than any extra assurance we get from
running the real thing.
Super-long term, we would probably want to extend our heavy tests to
cover more use-cases, but we should figure a way to do that without
slowing the tests down for everyone.
Perhaps we need two-tiered bors system, where we pull from `master` into
`release` branch only when an additional set of tests passes?
9631: Added some metadata for rust-analyzer package sufficient to build a package using `cargo deb` r=matklad a=KOLANICH
Co-authored-by: KOLANICH <kolan_n@mail.ru>
I saw reference to globs in #7755, but it doesn't look like they're
actually supported, and I had to dig through the source to discover
that the folders are relative to the workspace root. Further digging
was required to get VS Code from hanging for long periods trying to
watch giant Bazel folders that had already been excluded from Rust
Analyzer. Hopefully this tweak will save others the confusion :-)
9633: internal: Add `TreeId` to identify `ItemTree`s r=jonas-schievink a=jonas-schievink
With per-block `ItemTree`s, the file ID will not be enough to identify an `ItemTree`.
bors r+
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
9621: Remove outdated "(not yet released)" hint r=lnicola a=cakebaker
Neovim 0.5 has been released recently (see http://neovim.io/news/2021/07), hence the "(not yet released)" hint is no longer needed.
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
9614: Parse input expressions for dbg! invocations in remove_dbg r=Veykril a=Veykril
Instead of inspecting the input tokentree manually, parse the input as `,` delimited expressions instead and act on that. This simplifies the assist quite a bit.
Fixes#8455
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>