Commit graph

278 commits

Author SHA1 Message Date
puuuuh
de95f497ce
fix fmt
Fix clippy warnings
2024-10-10 18:33:50 +03:00
puuuuh
e9ee280c10
Add impl for Lookup Vec via [A; N] 2024-10-10 03:43:47 +03:00
puuuuh
1e18334672
Add way to intern structs from references 2024-10-10 03:43:40 +03:00
Micha Reiser
2d55e83845
Remove deleted entries from tracked_struct_ids 2024-09-13 15:19:40 -04:00
Dhruv Manilawala
eba970e485 Add tests that panics when recreating a new salsa revision 2024-09-13 11:31:33 -04:00
Carl Meyer
403ab25c33
add test for high-durability dependency validation 2024-08-28 13:33:40 -07:00
Micha Reiser
3f93415313
Fix const query with custom database trait 2024-08-20 21:49:30 +02:00
Micha Reiser
4609fd0043
Add failing test 2024-08-20 21:34:38 +02:00
Niko Matsakis
6401563755 store memoized fn results attached to the salsa struct 2024-08-20 10:09:49 -04:00
Niko Matsakis
703f312eae port input to use Table 2024-08-20 10:09:49 -04:00
Niko Matsakis
188f759555 use table for tracked structs and their fields
This also retools a tiny bit how deletion works.
We will reuse ids faster than before, actually.
2024-08-20 10:09:49 -04:00
Niko Matsakis
a27befeeba run tests with UPDATE_EXPECT=1 2024-08-20 10:09:49 -04:00
Micha Reiser
c4fee35157
Preserve durability when setting a new input-value 2024-08-07 09:08:03 +02:00
Micha Reiser
547663f7a5
Fix clippy warnings 2024-08-06 08:56:06 +02:00
Micha Reiser
fbc7b8c544
Move Builder::new impl out of Configuration::builder method 2024-08-06 08:53:03 +02:00
Micha Reiser
17a2f6b2ca
Add support for [#default] and setting field-level durability 2024-08-06 08:47:57 +02:00
Micha Reiser
632faff5a6
Implement inputs builder 2024-08-06 08:44:12 +02:00
Micha Reiser
d6df21fba1
Merge pull request #557 from MichaReiser/high-durability-write
Some checks are pending
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
Test / Benchmarks (push) Waiting to run
Fix query invalidation when high durability input changes
2024-08-05 16:36:21 +00:00
Carl Meyer
56e29b554d
Add test tracing, fix up comments 2024-08-05 08:34:59 -07:00
Micha Reiser
a263dd04ba
Fix query invalidation when high durability input changes 2024-08-05 16:24:39 +02:00
Niko Matsakis
4d2ccffddc return to the database-wrapping-storage setup 2024-08-04 02:18:54 -04: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
138ca4b1f3 merge handle into the database
Separate handles are no longer needed.
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
Micha Reiser
b98434a5e2
Bump revision in db.synthetic_write 2024-07-26 15:56:51 +02: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
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
3d2b2d3a65 remove RuntimeId and use ThreadId 2024-07-23 11:53:37 -04:00
Niko Matsakis
f5f21cf55e
Merge pull request #508 from MichaReiser/id-manual-debug-impl
Some checks are pending
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
Manual `Debug` impl for `salsa::Id`
2024-07-22 19:57:21 +00:00
Niko Matsakis
c8234e4fbf
Merge pull request #524 from PhoebeSzmucer/ps/accumulate-chain
Fix accumulator only accumulating direct children
2024-07-22 19:55:58 +00:00
Phoebe Szmucer
a85ac260d3 Add a more complex case 2024-07-22 20:12:54 +01:00
Micha Reiser
6975a47690
Replace derived Debug implementation of salsa::Id 2024-07-22 17:56:16 +02:00
Niko Matsakis
431fd14b69
Merge pull request #523 from MichaReiser/tracked-fn-interned
Some checks are pending
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
Allow interned values as tracked function arguments
2024-07-22 10:54:46 +00:00
Phoebe Szmucer
02008d51a7 Add a test, fix a bug, refactor 2024-07-22 11:52:55 +01:00
Phoebe Szmucer
4543063f5a use a queue 2024-07-22 10:19:36 +01:00
Phoebe Szmucer
a20c6341ec Use Vec 2024-07-21 18:20:26 +01:00
Phoebe Szmucer
148e1cfecf Fix accumulator only accumulating direct children 2024-07-20 19:55:20 +01:00
Micha Reiser
9ba36ebf7e
Allow interned values as tracked function arguments 2024-07-20 09:03:57 +02:00
Micha Reiser
ba169ef039
Respct no_eq attribute for tracked functions 2024-07-20 08:47:51 +02:00
Niko Matsakis
e8b467733f squelch most clippy warnings in generated code 2024-07-19 10:00:03 -04:00
Niko Matsakis
6066e0b536 clippy 2024-07-19 09:54:24 -04:00
Niko Matsakis
1133c72e77 require reset for new revisions 2024-07-19 09:49:08 -04:00
Niko Matsakis
e847929536 pacify the merciless clippy 2024-07-19 09:20:41 -04:00
Niko Matsakis
97b26e6a0c fix 2024-07-19 09:08:51 -04:00
Niko Matsakis
9a432cab31 pacify the merciless cargo fmt 2024-07-19 09:07:47 -04:00
Niko Matsakis
6a3afba141 wip 2024-07-19 08:10:23 -04:00