Niko Matsakis
cafbe9247b
update debug output
2024-08-04 02:22:27 -04:00
Niko Matsakis
4d2ccffddc
return to the database-wrapping-storage setup
2024-08-04 02:18:54 -04:00
Micha Reiser
12e0741252
Implement DerefMut
2024-07-29 10:25:26 +02:00
Micha Reiser
4995ce0ddc
Relax dependency constraints
2024-07-29 09:58:57 +02:00
Niko Matsakis
502716d368
pacify the merciless cargo fmt
2024-07-28 21:33:05 +00:00
Niko Matsakis
ab112b7126
rename local_state to zalsa_local
2024-07-28 13:12:58 +00:00
Niko Matsakis
3254f46ca8
rename LocalState to ZalsaLocal
2024-07-28 13:12:31 +00:00
Niko Matsakis
9054377546
rename storage
mod to zalsa
2024-07-28 13:11:57 +00:00
Niko Matsakis
d141cd8500
encapsulate Runtime within Zalsa
...
The aim is to eventually eliminate Runtime.
2024-07-28 13:10:29 +00:00
Niko Matsakis
703e12def8
remove the Zalsa trait and make it a struct
2024-07-28 13:06:30 +00:00
Niko Matsakis
34e109d390
remove type parameter from ZalsaImpl
2024-07-28 13:01:09 +00:00
Niko Matsakis
85628247e5
pacify the merciless clippy
2024-07-28 12:47:50 +00:00
Niko Matsakis
f8b1620ca7
pacify the merciless cargo fmt
2024-07-28 12:47:50 +00:00
Niko Matsakis
a675810edf
move local-state into DatabaseImpl
...
Each clone gets an independent local state.
2024-07-28 12:47:50 +00:00
Niko Matsakis
8e9ebbafd3
improve comments
2024-07-28 12:47:50 +00:00
Niko Matsakis
138ca4b1f3
merge handle into the database
...
Separate handles are no longer needed.
2024-07-28 12:47:50 +00:00
Niko Matsakis
62f158742c
rename Storage to ZalsaImpl, privatize
2024-07-28 12:47:50 +00:00
Niko Matsakis
daaa78056a
switch to new database design
...
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.
2024-07-28 12:47:50 +00:00
Niko Matsakis
64556e9d28
make event generation lazy
...
Creating events if nobody is listening has
always bugged me.
2024-07-28 12:35:33 +00:00
Niko Matsakis
1842b1dfbb
(almost) encansulate Runtime into Zalsa
...
The distinction is dumb and should go away.
But we still need it for a bit.
2024-07-28 12:35:33 +00:00
Niko Matsakis
596461c213
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`.
2024-07-28 12:35:33 +00:00
Niko Matsakis
bc72bdf524
as_salsa_database => as_dyn_database
...
Also, move to a blanket impl'd trait.
Overall cleaner approach.
2024-07-28 12:35:33 +00:00
Niko Matsakis
9e8635c7db
remove upcast_mut
...
We only ever need to upcast to shared references.
This change isn't necessary, just dead code
cleanup.
2024-07-28 12:35:33 +00:00
Niko Matsakis
cd339fc1c9
Merge pull request #542 from nikomatsakis/codspeed
...
Book / Book (push) Has been cancelled
Test / Test (false, beta) (push) Has been cancelled
Test / Test (false, stable) (push) Has been cancelled
Test / Test (true, nightly) (push) Has been cancelled
Test / Miri (push) Has been cancelled
Test / Benchmarks (push) Has been cancelled
Book / Deploy (push) Has been cancelled
Merge Codspeed
2024-07-28 11:09:37 +00:00
Niko Matsakis
581513302a
Merge remote-tracking branch 'salsa-rs/add-codspeed'
2024-07-28 11:07:09 +00:00
Niko Matsakis
b37a821d97
Merge pull request #541 from nikomatsakis/upgrade-dependencies
...
upgrade all the things
2024-07-28 10:42:48 +00:00
Niko Matsakis
c50cefa71e
upgrade all the things
2024-07-28 10:38:30 +00:00
Niko Matsakis
33889889e8
Merge pull request #540 from nikomatsakis/codespaces-config
...
basic GitHub codespaces configuration
2024-07-28 10:18:01 +00:00
Niko Matsakis
d0a105a193
devcontainer definition
...
Created by VSCode's command.
2024-07-28 10:16:36 +00:00
Niko Matsakis
b0ee16211e
Merge pull request #532 from salsa-rs/fix-guard-assertion
...
Fix assertion for same DB in `DbGuard`
2024-07-28 09:56:42 +00:00
Micha Reiser
354dc0eff1
Update src/local_state.rs
...
Co-authored-by: Noah Lev <camelidcamel@gmail.com>
2024-07-27 17:24:08 +01:00
Niko Matsakis
8788180155
Merge pull request #531 from salsa-rs/handle-into-inner
...
Book / Book (push) Waiting to run
Book / Deploy (push) Blocked by required conditions
Test / Test (false, beta) (push) Waiting to run
Test / Test (false, stable) (push) Waiting to run
Test / Test (true, nightly) (push) Waiting to run
Test / Miri (push) Waiting to run
Add Handle::into_inner method
2024-07-27 09:39:28 +00:00
Niko Matsakis
49524367b7
Merge pull request #534 from salsa-rs/fix-synthetic-write
...
Bump revision in `db.synthetic_write`
2024-07-27 09:38:39 +00:00
Micha Reiser
b98434a5e2
Bump revision in db.synthetic_write
2024-07-26 15:56:51 +02:00
Micha Reiser
d18d8008e9
Add codspeed
2024-07-26 12:09:40 +02:00
Micha Reiser
fc0a82bd10
Add benchmark for query with many tracked structs
2024-07-26 11:43:11 +02:00
Micha Reiser
18faece05e
Fix assertion for same DB in DbGuard
2024-07-26 11:26:19 +02:00
Micha Reiser
c66f600c06
Add Handle::into_inner method
2024-07-26 10:23:56 +02:00
Niko Matsakis
e4ce917f6e
Merge pull request #527 from nikomatsakis/spindle
...
Book / Book (push) Has been cancelled
Test / Test (false, beta) (push) Has been cancelled
Test / Test (false, stable) (push) Has been cancelled
Test / Test (true, nightly) (push) Has been cancelled
Test / Miri (push) Has been cancelled
Book / Deploy (push) Has been cancelled
re-enable parallel tests
2024-07-25 10:19:52 +00:00
Niko Matsakis
bf636d27ea
add a doc comment
2024-07-25 09:33:54 +00:00
Niko Matsakis
246dcab977
fix race condition around dropping arc handle
...
Sigh, I always make this mistake.
2024-07-25 09:31:06 +00:00
Niko Matsakis
8a3cc6e404
add a test for handle cancellation
...
I realized there weren't any!
2024-07-24 10:36:07 +00:00
Niko Matsakis
a5395665ce
order cycles by debug_name first
...
We used to sort just by the ingredient index,
but since those are now added dynamically,
that can be fairly unstable in some of the tests.
We now sort by the "debug name" of the ingredient
first, which is more reliably stable.
2024-07-24 10:10:37 +00:00
Niko Matsakis
03a62c8ce5
add debug_name method to ingredient
...
We can use this to more reliably sort.
2024-07-24 10:06:57 +00:00
Niko Matsakis
470c5b3d78
restore parallel_cycle_one_recover
2024-07-24 09:54:30 +00:00
Niko Matsakis
ac474a9c8d
restore parallel_cycle_mid_recover
2024-07-24 09:53:24 +00:00
Niko Matsakis
82d37de105
start restoring parallel tests
2024-07-24 09:46:19 +00:00
Niko Matsakis
21af3a2009
move local state into thread local
2024-07-23 21:45:31 -04:00
Niko Matsakis
74ef66dbb4
make tracked structs take db, not runtime
2024-07-23 11:54:55 -04:00
Niko Matsakis
782896772f
make interner take database, not runtime
2024-07-23 11:54:55 -04:00