SpacetimeDB
SpacetimeDB copied to clipboard
Autocomplete broken in VSCode for `.find()` and similar functions
It's broken in VSCode but presumably in Rust Analyzer more generally.
Reproduction steps:
Clone https://github.com/makscee/arena-of-ideas/tree/main/server
Open in VSCode with Rust Analyzer.
Go to any reducer with a player and type: ctx.db.arena_run().id().find(player.id);
It will compile, but it will not autocomplete find.
related external ticket https://github.com/clockworklabs/SpacetimeDB/issues/1998
The simplest way to reproduce is the following:
#[table(name = test_table)]
struct TestTable {
#[primary_key]
id: u64,
}
fn foo(ctx: &ReducerContext) {
ctx.db.test_table().id()
}
If you type dot after the id() you expect to see update() find() delete() suggests, but you don't
What's interesting is that changing the type to String fixes this issue: