Reminded me of this lecture from last year:
Responsive compilers - Nicholas Matsakis - PLISS 2019
https://youtube.com/watch?v=N6b44kMS6OM
(Of course it's based on Rust, but the same principles would be applicable elsewhere)
The blog post does cite salsa, which is the frame work that was created to create Lark, the language that was created to protoype Rust's implementation of query-based compilation.