Commit graph

147 commits

Author SHA1 Message Date
Ibraheem Ahmed
a0e7a0660c
refactor entries API (#987)
Some checks are pending
Book / Book (push) Waiting to run
Book / Deploy (push) Blocked by required conditions
Release-plz / Release-plz release (push) Waiting to run
Release-plz / Release-plz PR (push) Waiting to run
Test / Test (push) Waiting to run
Test / Miri (push) Waiting to run
Test / Shuttle (push) Waiting to run
Test / Benchmarks (push) Waiting to run
2025-08-22 21:54:46 +00:00
Ibraheem Ahmed
34882a129b
Flatten unserializable query dependencies (#975)
Some checks are pending
Test / Miri (push) Waiting to run
Test / Shuttle (push) Waiting to run
Test / Benchmarks (push) Waiting to run
Book / Book (push) Waiting to run
Book / Deploy (push) Blocked by required conditions
Release-plz / Release-plz release (push) Waiting to run
Release-plz / Release-plz PR (push) Waiting to run
Test / Test (push) Waiting to run
* flatten unserializable query dependencies

* avoid allocating intermediary serialized dependency edges
2025-08-13 20:49:01 +00:00
Lukas Wirth
be1b76b78b
fix: Do not unnecessarily require Debug on fields for interned structs (#951) 2025-08-12 07:12:48 +00:00
Ibraheem Ahmed
1ffb32f54c
Initial persistent caching prototype (#967)
Some checks are pending
Book / Book (push) Waiting to run
Book / Deploy (push) Blocked by required conditions
Release-plz / Release-plz PR (push) Waiting to run
Release-plz / Release-plz release (push) Waiting to run
Test / Test (push) Waiting to run
Test / Miri (push) Waiting to run
Test / Shuttle (push) Waiting to run
Test / Benchmarks (push) Waiting to run
* persistent caching prototype

* move serialization arguments under `persist` attribute

* move `serde` dependency under `persistence` feature

* avoid serializing provisional memos

* use exhaustive checking for manual `Serialize` implementations

* update tests

* remove distinction between ingredient `entries` and `instances`

* avoid enabling `shuttle` feature in CI

* serialize ingredients by index
2025-08-11 19:02:49 +00:00
Micha Reiser
ea38537827
Add heap size support for salsa structs (#943)
Some checks are pending
Test / Test (push) Waiting to run
Test / Miri (push) Waiting to run
Book / Book (push) Waiting to run
Book / Deploy (push) Blocked by required conditions
Release-plz / Release-plz release (push) Waiting to run
Release-plz / Release-plz PR (push) Waiting to run
Test / Shuttle (push) Waiting to run
Test / Benchmarks (push) Waiting to run
* Improve unstable size analysis support

 1. Include an option `panic_if_missing` that will panic if there is an ingredient with no `heap_size()` defined, to ensure coverage.
 2. Add `heap_size()` to tracked structs, interneds an inputs.

* Make heap size a separate field, remove panic argument

* Remove stale comment

---------

Co-authored-by: Chayim Refael Friedman <chayimfr@gmail.com>
2025-08-06 07:01:18 +00:00
Lukas Wirth
679d82c4e7
Gate accumulator feature behind a feature flag (#946)
Some checks are pending
Book / Book (push) Waiting to run
Book / Deploy (push) Blocked by required conditions
Release-plz / Release-plz PR (push) Waiting to run
Release-plz / Release-plz release (push) Waiting to run
Test / Test (push) Waiting to run
Test / Miri (push) Waiting to run
Test / Shuttle (push) Waiting to run
Test / Benchmarks (push) Waiting to run
2025-08-02 08:41:17 +00:00
Lukas Wirth
211bc158df
Do manual trait casting (#922)
* Do manual trait upcasting instead of downcasting

* Remove another dynamic `zalsa` call

* Rename UpCaster back to DownCaster

* Address reviews
2025-07-31 15:56:13 +00:00
Ibraheem Ahmed
53cd6b15ba
remove bounds and type checks from IngredientCache (#937)
Some checks are pending
Test / Shuttle (push) Waiting to run
Test / Benchmarks (push) Waiting to run
Book / Book (push) Waiting to run
Book / Deploy (push) Blocked by required conditions
Release-plz / Release-plz release (push) Waiting to run
Release-plz / Release-plz PR (push) Waiting to run
Test / Test (push) Waiting to run
Test / Miri (push) Waiting to run
2025-07-21 16:10:10 +00:00
Ibraheem Ahmed
0e1df67ec4
Avoid dynamic dispatch to access memo tables (#941)
* avoid dynamic dispatch to access memo tables

* update comment
2025-07-21 16:09:11 +00:00
Ibraheem Ahmed
dba66f1a37
Use inventory for static ingredient registration (#934)
Some checks failed
Book / Book (push) Has been cancelled
Release-plz / Release-plz release (push) Has been cancelled
Release-plz / Release-plz PR (push) Has been cancelled
Test / Test (push) Has been cancelled
Test / Miri (push) Has been cancelled
Test / Shuttle (push) Has been cancelled
Test / Benchmarks (push) Has been cancelled
Book / Deploy (push) Has been cancelled
* use `inventory` for static ingredient registration

* remove unnecessary synchronization from memo tables

* use global ingredient caches for database-independent ingredients

* add manual ingredient registration API

* remove static ingredient index optimization when manual registration is in use

* fix atomic imports

* simplify ingredient caches
2025-07-18 04:55:50 +00:00
Lukas Wirth
d28d66bf13
fix: Fix phantom data usage in salsa structs affecting auto traits (#932)
Some checks failed
Book / Book (push) Has been cancelled
Release-plz / Release-plz release (push) Has been cancelled
Release-plz / Release-plz PR (push) Has been cancelled
Test / Test (push) Has been cancelled
Test / Shuttle (push) Has been cancelled
Test / Miri (push) Has been cancelled
Test / Benchmarks (push) Has been cancelled
Book / Deploy (push) Has been cancelled
2025-07-04 20:47:07 +00:00
github-actions[bot]
572d144b33
chore: release v0.23.0 (#877)
Some checks are pending
Test / Shuttle (push) Waiting to run
Test / Benchmarks (push) Waiting to run
Book / Book (push) Waiting to run
Book / Deploy (push) Blocked by required conditions
Release-plz / Release-plz release (push) Waiting to run
Release-plz / Release-plz PR (push) Waiting to run
Test / Test (push) Waiting to run
Test / Miri (push) Waiting to run
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-06-27 11:40:54 +02:00
Lukas Wirth
f384ab538e
Emit self ty for query debug name of assoc function queries (#927) 2025-06-27 09:23:25 +00:00
Ibraheem Ahmed
d44f638408
Replace ingredient cache with faster ingredient map (#921)
Some checks are pending
Book / Book (push) Waiting to run
Book / Deploy (push) Blocked by required conditions
Release-plz / Release-plz release (push) Waiting to run
Release-plz / Release-plz PR (push) Waiting to run
Test / Test (push) Waiting to run
Test / Miri (push) Waiting to run
Test / Shuttle (push) Waiting to run
Test / Benchmarks (push) Waiting to run
* replace ingredient cache with faster ingredient map

* avoid checking for downcasters in ingredient cache slow-path

* pre-size ingredient map

* avoid double lookup in ingredient creation slow-path
2025-06-27 07:19:58 +00:00
Ibraheem Ahmed
0666e2018b
add option to track heap memory usage of memos (#925)
Some checks failed
Book / Book (push) Has been cancelled
Release-plz / Release-plz release (push) Has been cancelled
Release-plz / Release-plz PR (push) Has been cancelled
Test / Test (push) Has been cancelled
Test / Miri (push) Has been cancelled
Test / Shuttle (push) Has been cancelled
Test / Benchmarks (push) Has been cancelled
Book / Deploy (push) Has been cancelled
2025-06-25 20:26:49 +00:00
Vincent Esche
8d14c0251e
Hide generated structs of tracked functions from docs via #[doc(hidden)] (#917)
Some checks are pending
Book / Book (push) Waiting to run
Book / Deploy (push) Blocked by required conditions
Release-plz / Release-plz release (push) Waiting to run
Release-plz / Release-plz PR (push) Waiting to run
Test / Test (push) Waiting to run
Test / Shuttle (push) Waiting to run
Test / Miri (push) Waiting to run
Test / Benchmarks (push) Waiting to run
2025-06-25 11:19:56 +00:00
Lukas Wirth
8528bab609
feat: Update derive field overwrite support (#747)
Some checks failed
Release-plz / Release-plz PR (push) Has been cancelled
Book / Book (push) Has been cancelled
Release-plz / Release-plz release (push) Has been cancelled
Test / Test (push) Has been cancelled
Test / Miri (push) Has been cancelled
Test / Shuttle (push) Has been cancelled
Test / Benchmarks (push) Has been cancelled
Book / Deploy (push) Has been cancelled
* `Update` derive field overwrite support

* Allow overwriting tracked struct field update functions
2025-06-13 17:17:39 +00:00
Ibraheem Ahmed
b8cdd300a0
add an option to tune interned garbage collection (#911)
Some checks are pending
Book / Book (push) Waiting to run
Book / Deploy (push) Blocked by required conditions
Release-plz / Release-plz PR (push) Waiting to run
Release-plz / Release-plz release (push) Waiting to run
Test / Test (push) Waiting to run
Test / Miri (push) Waiting to run
Test / Shuttle (push) Waiting to run
Test / Benchmarks (push) Waiting to run
2025-06-13 06:17:45 +00:00
Lukas Wirth
6ced42b334
Use explicit discriminants for QueryOriginKind for better comparisons (#913)
Some checks are pending
Book / Book (push) Waiting to run
Book / Deploy (push) Blocked by required conditions
Release-plz / Release-plz release (push) Waiting to run
Release-plz / Release-plz PR (push) Waiting to run
Test / Benchmarks (push) Waiting to run
Test / Test (push) Waiting to run
Test / Miri (push) Waiting to run
Test / Shuttle (push) Waiting to run
2025-06-12 18:32:33 +00:00
puuuuh
8924db1441
Preserve attributes on interned/tracked struct fields (#905)
Some checks are pending
Release-plz / Release-plz PR (push) Waiting to run
Book / Book (push) Waiting to run
Book / Deploy (push) Blocked by required conditions
Release-plz / Release-plz release (push) Waiting to run
Test / Test (push) Waiting to run
Test / Benchmarks (push) Waiting to run
Test / Miri (push) Waiting to run
Test / Shuttle (push) Waiting to run
* Preserve attributes on interned/tracked structs

* Pass unknown attributes from fields to getter functions in inputs
2025-06-10 06:34:54 +00:00
Lukas Wirth
38a3c9e06d
Use Revision and Durability directly in input Value (#902)
`Stamp` contains a lot of padding bytes, wasting 7 bytes per field for inputs due to the array packing.
By packing each field into a separate array we regain that space
2025-06-04 14:26:49 +00:00
Chayim Refael Friedman
2a54667121
Allow lifetimes in arguments in tracked fns with >1 parameters (#880) 2025-05-26 04:50:43 +00:00
Ibraheem Ahmed
0414d89327
Replace loom with shuttle (#876)
* replace loom with shuttle

* inline `empty_cycle_heads`

* ignore failing shuttle test
2025-05-23 15:28:51 +00:00
github-actions[bot]
a12bf313a4
chore: release v0.22.0 (#840)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-05-23 12:38:34 +02:00
Vincent Esche
e859218dea
Allow creation of tracked associated functions (without self) (#859)
* Rename file "setup_method_body.rs" to "setup_tracked_method_body.rs"

* Rename macro `setup_method_body!` to `setup_tracked_method_body!`

* Add support for tracked associated functions

* Rename struct `MethodArguments` to `AssociatedFunctionArguments`

(since every method is an associated function, but not every associated function is a method)
2025-05-23 10:19:12 +00:00
Micha Reiser
96eeecb5af
Remove default PartialOrd and Ord derives for salsa-structs (#868)
Some checks are pending
Book / Book (push) Waiting to run
Book / Deploy (push) Blocked by required conditions
Release-plz / Release-plz PR (push) Waiting to run
Release-plz / Release-plz release (push) Waiting to run
Test / Test (push) Waiting to run
Test / Miri (push) Waiting to run
Test / Benchmarks (push) Waiting to run
2025-05-19 11:57:23 +00:00
Micha Reiser
7edce6e248
Fix returns(deref | as_ref | as_deref) in tracked methods (#857) 2025-05-09 09:09:16 +00:00
CheaterCodes
13a2bd7461
Changed return_ref syntax to returns(as_ref) and returns(cloned) (#772)
* Changed `return_ref` syntax to `returns(as_ref)` and `returns(cloned)`

* Implement

* renamed module for return_mode

* Rename macro, fix docs, add tests, validate return modes

* Cargo fmt

---------

Co-authored-by: Micha Reiser <micha@reiser.io>
2025-05-09 07:28:54 +00:00
Lukas Wirth
cfa88e9a4d
Move salsa event system into Zalsa (#849)
* Move salsa event system into `Zalsa`

* Encode `None` into ShallowUpdate

This shrinks the return value from 16 to 8 bytes
2025-05-07 11:45:49 +00:00
Ibraheem Ahmed
54020469a3
Add loom support (#842)
* add support for loom tests

* add just script and fix comment
2025-05-06 15:36:38 +00:00
Lukas Wirth
2c041763b7
refactor: Clean up some unsafety (#830) 2025-05-02 12:16:44 +00:00
github-actions[bot]
fa8409212d
chore: release v0.21.1 (#829)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-05-01 07:22:49 +02:00
Micha Reiser
ad3dff6cb3
better debug name for interned query arguments (#837)
* feat: Improve debug name for interned query arguments

* Change name again
2025-04-30 17:20:49 +00:00
github-actions[bot]
2a3a871f2a
chore: release v0.21.0 (#811)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-04-29 19:13:06 +02:00
Lukas Wirth
89347c8fc9
Implement a query stack Backtrace analog (#827) 2025-04-29 17:01:15 +00:00
Andrey Nikolaev
0cbe7f86ab
fix: correct debug output for tracked fields (#826) 2025-04-28 13:26:50 +00:00
Lukas Wirth
445b627277
refactor: Simplify ID conversions (#822) 2025-04-28 12:00:16 +00:00
Lukas Wirth
f915b0632e
fix: allow unused lifetimes in tracked_struct expansion (#824) 2025-04-28 11:50:52 +00:00
Lukas Wirth
4fa0ee8dfc
cleanup: Remove unnecessary Array abstraction (#821) 2025-04-28 07:33:31 +00:00
Lukas Wirth
9a9fb4e51b
Add a compile-fail test for a 'static !Update struct (#820) 2025-04-28 07:09:05 +00:00
Andrey Nikolaev
c75b0161ab
squelch most clippy warnings in generated code (#809) 2025-04-27 09:57:45 +00:00
github-actions[bot]
201a8dd40b
chore: release v0.20.0 (#753)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-04-22 13:57:53 +02:00
Lukas Wirth
f981e7d0fd
perf: Reduce memory usage by deduplicating type information (#803)
* Reduce memory usage by deduplicating type information

We were storing the type information, 3 words wide, for each memo in each slot, while it is always constant wrt. the ingredient (different slots of the same ingredients will always have the same memos in the same order). This introduces some more unsafety, and the result wasn't as fast so I also had to use some lock-free structures, but the result is worth it: this shaves off 230mb from rust-analyzer with new Salsa.

* Simplify

* Replace `RwLock` with boxcar + `AtomicPtr`

* Use TypeId and allocate instead

* Use `OnceLock` instead of atomic-ptr

---------

Co-authored-by: Chayim Refael Friedman <chayimfr@gmail.com>
2025-04-22 11:24:23 +00:00
Lukas Wirth
883baaf8de
refactor: Inline/Outline more cold and slow paths (#805) 2025-04-21 10:40:22 +00:00
Lukas Wirth
1bbf4c2be5
feat: Drop Debug requirements and flip implementation defaults (#756) 2025-03-15 15:14:34 +00:00
Carl Meyer
095d8b2b81
rewrite cycle handling to support fixed-point iteration (#603) 2025-03-10 22:25:47 +00:00
github-actions[bot]
9ebc8a3913
chore: release v0.19.0 (#698)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-03-10 15:09:26 +01:00
Lukas Wirth
9d2a9786c4
perf: Store view downcaster in function ingredients directly (#720)
* Store view downcaster in function ingredients directly

* Embed typecheck into the downcaster

* Force inline `db` proc-macro generated functions

* Skip unnecessary type-id check
2025-03-06 10:39:52 +00:00
Lukas Wirth
7a45da93c2
Cleanup Cargo.tomls (#745) 2025-03-05 15:45:16 +00:00
Lukas Wirth
a57df6c72d Drop clone requirement for accumulated values 2025-02-28 08:41:14 +01:00