Add a few more `db.unwind_if_cancelled()` calls
Judging from a profile sent by a friend, the borrowck query took up a significant amount of time in their project which might be the cause for some unresponsiveness as nothing in the mir stack currently unwinds on cancellation
Shuffle some locking around
The main thread is still occasionally blocking on something and I am unsure what the cause might be. This will hopefully help somewhat
Editor itself is able to invalidate hints after edits, and /refresh was
sent after editor reports changes to the language server.
This forces the editor to either query & invalidate the hints twice
after every edit, or wait for /refresh to come before querying the
hints.
Both options are rather useless, so instead, send a request on server
startup only: client editors do not know when the server actually starts
up, this will help to query the initial hints after editor was open and
the server was still starting up.
Fix cargo handle logging in flycheck
This PR has two commits, so it's probably easier to review them separately:
(1) Rename `CargoHandle` to `CommandHandle`, as the command may not be a cargo command.
(2) Logging should format the current command, rather than calling `check_command()` again. This ensures that any later configuration changes don't cause us to log incorrect information.
proc-macro-test: Pass target to cargo invocation
When cross compiling macos → dragonfly the dist build fails in the proc-maro-test-impl crate with the following error:
`ld: unknown option: -z\nclang: error: linker command failed with exit code 1 (use -v to see invocation)`
This appears to be a wart stemming from using an Apple host for cross compiling. Passing the target along to cargo allows it to pick up a linker that it understands and DTRT.
SCIP: Report the correct version of rust-analyzer in the metadata
Previously this was hard coded to "0.1". The SCIP protocol allows this to be an arbitrary string:
```
message ToolInfo {
// Name of the indexer that produced this index.
string name = 1;
// Version of the indexer that produced this index.
string version = 2;
// Command-line arguments that were used to invoke this indexer.
repeated string arguments = 3;
}
```
so use the same string reported by `rust-analyzer --version`.