# 2025-03-19 ## rust-analyzer check in * "so far things seem to be working fine" * nikomatsakis is terrified * Lukas: * tried getting rid of the multi-argument query interning thing * BUT https://github.com/salsa-rs/salsa/pull/748 * we now have multiple keys * takeaway: * actually Niko's scheme is very invasive and perhaps not a good idea * problem: * when you invoke `foo.bar(...)` we need to add a dependency into the current task * currently that dependency is (trackedfningredient, id-of-some-salsa-struct) * where the salsa struct is either `foo` if `...` is empty set or an interned value * what would we use instead? dependencies become more complex to express * alternative: * don't be so naive about interning * look into actual patterns to optimize * maybe drop eagerly when `foo` (or other tracked structs that appear in the arguments...) is deleted * `impl Foo { fn bar(&self, other: Baz<'db>) }` * where `Foo` and `Baz` are both salsa structs * deleting either one should delete the interned value * (and hence the memos associated with it) * this actually applies to any interned value * Fixed point... landed! * holy potatoes! * encountered a hang issue in certain files * some caching is missing, Carl is working on a PR * Carl is terrified (Niko assumes) * wasm playground: * overall working * but for tracked structs we reach an unreachable branch * might be related to the aliasing issue that Lukas identified last time ```rust #[salsa::tracked(serialize)] struct Foo<'db> { ... } ``` * GC questions * How to decide the "limit" for reusing things * conclusion: * no right answer, we'll need to do dynamic tuning * possible approaches * when interning exceeds its capacity, bump it for the future * we would have to be able to drop it down later * running a GC * would be useful to occasionally "stop the world" and do a cleanup of things that haven't been used recently * prob easier not to do it "concurrently" with other computation but to require `&mut self` * but might want to be able to cancel it * https://hackmd.io/nNmrVvHfRYO_EpwmsQyYTQ#Dumping-fn-contents * Contributing to salsa book * why no direct pointer? * because ids allow us to * do speculative execution * lazy deserialization * and a bunch of other fancy stuff * "intra-trait cache solving discussion" * "scratch space" for queries * https://rust-lang.zulipchat.com/#narrow/channel/185405-t-compiler.2Frust-analyzer/topic/Chalk.20support.20for.20trait.20solver.20cache/near/506567936 * `plumbing::AsId` * we should add a method here * and mark `plumbing` as `doc(hidden)` * lobby IDEs to RustRover * niko learns about r-a * `rust-analyzer.completion.privateEditable.enable` * workspace crates? current crate? something. * Niko queue: * serialization