-
Notifications
You must be signed in to change notification settings - Fork 150
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
New database design #538
New database design #538
Commits on Jul 28, 2024
-
We only ever need to upcast to shared references. This change isn't necessary, just dead code cleanup.
Configuration menu - View commit details
-
Copy full SHA for 9e8635c - Browse repository at this point
Copy the full SHA 9e8635cView commit details -
as_salsa_database => as_dyn_database
Also, move to a blanket impl'd trait. Overall cleaner approach.
Configuration menu - View commit details
-
Copy full SHA for bc72bdf - Browse repository at this point
Copy the full SHA bc72bdfView commit details -
hide internal methods behind a Zalsa trait
The traits are now quite simple: * Database is the external trait * ZalsaDatabase is the internal one, implemented by `#[salsa::db]`. It adds two methods, `zalsa` and `zalsa_mut`. Those give access to our internal methods. For now I've hidden the methods behind `&dyn Zalsa`. This is nice and clean but it may be worth later refactoring to a `struct Zalsa`.
Configuration menu - View commit details
-
Copy full SHA for 596461c - Browse repository at this point
Copy the full SHA 596461cView commit details -
(almost) encansulate Runtime into Zalsa
The distinction is dumb and should go away. But we still need it for a bit.
Configuration menu - View commit details
-
Copy full SHA for 1842b1d - Browse repository at this point
Copy the full SHA 1842b1dView commit details -
Creating events if nobody is listening has always bugged me.
Configuration menu - View commit details
-
Copy full SHA for 64556e9 - Browse repository at this point
Copy the full SHA 64556e9View commit details -
Under this design, *all* databases are a `DatabaseImpl<U>`, where the `U` implements `UserData` (you can use `()` if there is none). Code would default to `&dyn salsa::Database` but if you want to give access to the userdata, you can define a custom database trait `MyDatabase: salsa::Databse` so long as you * annotate `MyDatabase` trait definition of impls of `MyDatabase` with `#[salsa::db]` * implement `MyDatabase` for `DatabaseImpl<U>` where `U` is your userdata (this could be a blanket impl, if you don't know the precise userdata type). The `tests/common/mod.rs` shows the pattern.
Configuration menu - View commit details
-
Copy full SHA for daaa780 - Browse repository at this point
Copy the full SHA daaa780View commit details -
Configuration menu - View commit details
-
Copy full SHA for 62f1587 - Browse repository at this point
Copy the full SHA 62f1587View commit details -
merge handle into the database
Separate handles are no longer needed.
Configuration menu - View commit details
-
Copy full SHA for 138ca4b - Browse repository at this point
Copy the full SHA 138ca4bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8e9ebba - Browse repository at this point
Copy the full SHA 8e9ebbaView commit details -
move local-state into DatabaseImpl
Each clone gets an independent local state.
Configuration menu - View commit details
-
Copy full SHA for a675810 - Browse repository at this point
Copy the full SHA a675810View commit details -
Configuration menu - View commit details
-
Copy full SHA for f8b1620 - Browse repository at this point
Copy the full SHA f8b1620View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8562824 - Browse repository at this point
Copy the full SHA 8562824View commit details -
Configuration menu - View commit details
-
Copy full SHA for 34e109d - Browse repository at this point
Copy the full SHA 34e109dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 703e12d - Browse repository at this point
Copy the full SHA 703e12dView commit details -
encapsulate Runtime within Zalsa
The aim is to eventually eliminate Runtime.
Configuration menu - View commit details
-
Copy full SHA for d141cd8 - Browse repository at this point
Copy the full SHA d141cd8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9054377 - Browse repository at this point
Copy the full SHA 9054377View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3254f46 - Browse repository at this point
Copy the full SHA 3254f46View commit details -
Configuration menu - View commit details
-
Copy full SHA for ab112b7 - Browse repository at this point
Copy the full SHA ab112b7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 502716d - Browse repository at this point
Copy the full SHA 502716dView commit details
Commits on Jul 29, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 4995ce0 - Browse repository at this point
Copy the full SHA 4995ce0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 12e0741 - Browse repository at this point
Copy the full SHA 12e0741View commit details
Commits on Aug 4, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 4d2ccff - Browse repository at this point
Copy the full SHA 4d2ccffView commit details -
Configuration menu - View commit details
-
Copy full SHA for cafbe92 - Browse repository at this point
Copy the full SHA cafbe92View commit details -
add a justfile for convenience
This should really be synchronized with the codespaces and github configuration but... I'm not clever enough to do all that.
Configuration menu - View commit details
-
Copy full SHA for 9f95b37 - Browse repository at this point
Copy the full SHA 9f95b37View commit details -
Configuration menu - View commit details
-
Copy full SHA for bca9180 - Browse repository at this point
Copy the full SHA bca9180View commit details -
Configuration menu - View commit details
-
Copy full SHA for 83be1e4 - Browse repository at this point
Copy the full SHA 83be1e4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 118e89c - Browse repository at this point
Copy the full SHA 118e89cView commit details -
Update components/salsa-macro-rules/src/setup_input_struct.rs
Co-authored-by: Micha Reiser <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 6ff1975 - Browse repository at this point
Copy the full SHA 6ff1975View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1bce41f - Browse repository at this point
Copy the full SHA 1bce41fView commit details