- 
                Notifications
    You must be signed in to change notification settings 
- Fork 190
Provide a method to attach a database even if it's different from the current attached one #992
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… current attached one rust-analyzer needs this.
| ✅ Deploy Preview for salsa-rs canceled.
 | 
| CodSpeed Performance ReportMerging #992 will not alter performanceComparing  Summary
 | 
| The Clippy failure seems unrelated? | 
| Can you say more why RA needs this? Isn't this technically unsound because it means that the outer query won't capture all dependencies? | 
| We currently create sub databases to speculatively do highlighting in doc strings and the like. We already take care of not intermixing queries between these, but we are now in a situation where we create these temporary sub databases within query calls (we still don't mix things though) and that now breaks due to the checks salsa does. I do think we should mark this unsafe or give it a dummy param to mark it as problematic if misused (if it is not unsound, unsure if this is a soundness problem or not given you can already smuggle IDs between databases). | 
| Funny, Niko and I just talked about some changes to fixpoint iteration that might also allow speculative execution | 
| I don't think this is unsound? First, you cannot avoid recording query deps with this, as you can't call queries on the old db (they will attach it again), and second, even if you could I don't think not tracking some inputs is unsound. | 
| 
 We do like speculative execution, but the speculative execution that @Veykril talked about is of another kind and unrelated to Salsa. | 
8e1a527    to
    4e069c3      
    Compare
  
    | What's up with the test? | 
| The output is different based on compiler version. You need to gate this test to only run for Rust version >= whatever version beta is | 
fb952b8    to
    4e069c3      
    Compare
  
    | Locally it outputs what I pushed now. But then it errors at CI. And if I update to the CI version it errors again. | 
| The compile fail tests are gated by the persistence feature which is disabled by default, so they don't run with a plain  | 
rust-analyzer needs this.