Commit graph

2085 commits

Author SHA1 Message Date
Ibraheem Ahmed
09627e4505
update boxcar (#910)
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-11 20:41:01 +00:00
Ibraheem Ahmed
dc9066d667
use latest revision for dependencies on interned values (#908)
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-06-11 06:03:30 +00:00
Ibraheem Ahmed
4161bd727f
remove high-durability values from interned LRU (#907) 2025-06-11 05:28:08 +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
8d3455f0e6
Assert size for interned Value (#901)
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-06 03:53:37 +00:00
Ibraheem Ahmed
60026c0dd8
reduce size of interned value metadata (#903)
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-06-05 05:26:48 +00:00
Carl Meyer
a95bae5119
panic with string message again for cycle panics (#898)
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-06-04 15:15:22 +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
Lukas Wirth
2c57c5628b
Fix flaky parallel_join test (#900)
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-06-04 12:24:15 +00:00
Lukas Wirth
5d11ab9837
Bump MSRV to 1.85 (#899)
Co-authored-by: Lukas Wirth <me@lukaswirth.de>
2025-06-04 10:44:35 +00:00
Ibraheem Ahmed
15c28cdf88
Simple LRU garbage collection for interned values (#839)
* simple LRU garbage collection for interned values

* shard interned values

* gate memo size assertion to 64-bit platforms

* extend internal documentation for interned structs

* remove `first_interned_at` field from interned values

* clarify difference between tracked and interned structs

* only keep track of low durability interned values for garbage collection
2025-06-04 08:09:04 +00:00
Lukas Wirth
ac6fe534fd
Capture execution backtrace when throwing UnexpectedCycle (#883)
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
Co-authored-by: Lukas Wirth <me@lukaswirth.de>
2025-06-03 18:54:24 +00:00
Micha Reiser
79c2eac5e5
Store tracked struct ids as ThinVec on Revisions (#892)
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
* Store tracked struct ids as Vec on Revisions

* Use reserve

* Discard changes to tests/parallel/cycle_a_t1_b_t2_fallback.rs

* Try boxed slice

* Use thinvec

* Ensure old-outputs are dropped if new revisions has no tracked struct ids

* Discard changes to tests/parallel/cycle_a_t1_b_t2_fallback.rs
2025-06-03 08:09:15 +00:00
Micha Reiser
14318b7266
Update dependencies, remove unused heck dependency (#894)
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
* Store tracked struct ids as Vec on Revisions

* Use reserve

* Discard changes to tests/parallel/cycle_a_t1_b_t2_fallback.rs

* Try boxed slice

* Use thinvec

* Update dependencies, remove unused heck

* Discard changes to src/function/diff_outputs.rs

* Discard changes to src/tracked_struct.rs

* Discard changes to src/zalsa_local.rs

* Discard changes to tests/parallel/cycle_a_t1_b_t2_fallback.rs
2025-06-02 10:00:52 +00:00
Micha Reiser
2b5188778e
fix: multithreaded nested fixpoint iteration (#882)
Some checks are pending
Test / Test (push) Waiting to run
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
* Set `validate_final` in `execute` after removing the last cycle head

* Add runaway query repro

* Add tracing

* Fix part 1

* Fix `cycle_head_kinds` to always return provisional for memos that aren't verified final (They should be validated by `validate_same_iteration` or wait for the cycle head

* Fix cycle error

* Documentation

* Fix await for queries depending on initial value

* correctly initialize queued

* Cleanup

* Short circuit if entire query runs on single thread

* Move parallel code into its own method

* Rename method, add self_key to queued

* Revert self-key changes

* Move check *after* `deep_verify_memo`

* Add a test for a cycle with changing cycle heads

* Short circuit more often

* Consider iteration in `validate_provisional`

* Only yield if all heads result in a cycle. Retry if even just one inner cycle made progress (in which case there's a probably a new memo)

* Fix hangs

* Cargo fmt

* clippy

* Fix hang if cycle initial panics

* Rename `cycle_head_kind` enable `cycle_a_t1_b_t2_fallback` shuttle test

* Cleanup

* Docs
2025-06-01 08:45:37 +00:00
Micha Reiser
80fb79e910
Set validate_final in execute after removing the last cycle head (#890)
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-05-31 13:06:39 +00:00
Ibraheem Ahmed
8aaeb708d0
Pack QueryEdge memory layout (#886)
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
* pack `QueryEdge` into 12 bytes

* document internals of `QueryEdge`
2025-05-30 13:30:27 +00:00
Ibraheem Ahmed
0c39c08360
Lazily allocate extra memo state (#888)
* lazily allocate extra memo state

* lazily allocate accumulators

* simplify `QueryRevisionsExtra`
2025-05-30 13:28:40 +00:00
Ibraheem Ahmed
5750c8448f
Pack QueryOrigin memory layout (#885)
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
* pack `QueryOrigin` into 13 bytes

* nits

Co-authored-by: David Barsky <me@davidbarsky.com>

---------

Co-authored-by: David Barsky <me@davidbarsky.com>
2025-05-29 20:00:50 +00:00
Micha Reiser
40d7844a7a
Restrict memo size assertion to 64bit platforms (#884)
Some checks are pending
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 / Test (push) Waiting to run
Test / Miri (push) Waiting to run
Test / Benchmarks (push) Waiting to run
Book / Book (push) Waiting to run
Book / Deploy (push) Blocked by required conditions
2025-05-29 08:47:10 +00:00
puuuuh
f9a9bb2a6a
Don't report stale outputs if there is newer generation in new_outputs (#879)
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
* Don't report stale outputs if there is newer generation in new_outputs

* Remove outdated comment, add explanation why we ignore generation in diff_outputs
2025-05-27 17:44:15 +00:00
Micha Reiser
e1fe3698ce
Fix hang in nested fixpoint iteration (#871) 2025-05-27 17:06:34 +00:00
Lukas Wirth
db4c4dfc93
Add debug spans for new_revision and evict_lru (#881) 2025-05-27 06:02:25 +00:00
Micha Reiser
393cf7c7de
Add fetch span (#875)
* Add fetch span

* Use `{}`

* Only add fetch span in debug builds
2025-05-26 16:51:02 +00:00
Lukas Wirth
b1b8b4333c
shrink_to_fit IdentityMap before storing it (#816) 2025-05-26 13:02:27 +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
Ibraheem Ahmed
f7b08562ed
Use generational identifiers for tracked structs (#864)
* use generational identifiers for tracked structs

* increase ID generations to 32-bits

* remove `created_at` field from tracked structs

* clean up tracked struct IDs to handle overflow

* log tracing message for leaked tracked structs
2025-05-23 14:18:03 +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
678f51a745
Short-circuit block-on if same thread (#862)
Some checks failed
Test / Test (push) Has been cancelled
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 / Miri (push) Has been cancelled
Test / Benchmarks (push) Has been cancelled
Book / Deploy (push) Has been cancelled
* Short-circuit `block_on` if same thread

* Avoid acquiring the lock
2025-05-22 09:26:17 +00:00
Lukas Wirth
18dc594dea
Skip release-plz jobs on forks (#873) 2025-05-22 08:12:01 +00:00
Lukas Wirth
4327d6bb94
Unwind with specific type when encountering an unexpected cycle (#856) 2025-05-22 07:40:11 +00:00
Wilco Kusee
9489764ad9
chore: Remove jar mentions from book (#775)
* Remove references to jar terminology

* Update or remove invalid code links in book
2025-05-22 09:34:29 +02:00
Lukas Wirth
2d4321e989
Implement an !Update bound escape hatch for tracked fn (#867)
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 / Benchmarks (push) Has been cancelled
Book / Deploy (push) Has been cancelled
2025-05-20 15:36:34 +00:00
Micha Reiser
4818b15f3b
Only enable boxcar/loom when loom feature is enabled (#869)
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 / Benchmarks (push) Waiting to run
2025-05-20 06:54:07 +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
Ibraheem Ahmed
516ce4fd68
update boxcar (#865)
Some checks failed
Test / Test (push) Has been cancelled
Test / Miri (push) Has been cancelled
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 / Benchmarks (push) Has been cancelled
Book / Deploy (push) Has been cancelled
2025-05-17 06:38:55 +00:00
Micha Reiser
247a9dfffb
perf: speed-up cycle-retry logic (#861)
Some checks failed
Test / Test (push) Has been cancelled
Test / Miri (push) Has been cancelled
Test / Benchmarks (push) Has been cancelled
Release-plz / Release-plz PR (push) Has been cancelled
Book / Book (push) Has been cancelled
Release-plz / Release-plz release (push) Has been cancelled
Book / Deploy (push) Has been cancelled
* Test empty cycles first

* Move check out of fetch_hot
2025-05-15 06:18:34 +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
d1da99132d
Work around a rust-analyzer bug (#855) 2025-05-09 07:23:29 +00:00
Micha Reiser
a6793e783a
Lazy finalization of cycle participants in maybe_changed_after (#854)
* Lazy verification of cycle participants in maybe_changed_after

* Update comment
2025-05-09 07:03:54 +00:00
Lukas Wirth
af69cc1114
Do not re-verify already verified memoized value in cycle verification (#851) 2025-05-08 16:33:58 +00:00
Lukas Wirth
00dbf01e87
Pass cycle heads as out parameter for maybe_changed_after (#852) 2025-05-08 08:32:27 +00:00
Ibraheem Ahmed
2c869364a9
fix memo table growth condition (#850) 2025-05-08 04:23:39 +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
Micha Reiser
f78a641d20
fix: incorrect caching for queries participating in fixpoint (#843) 2025-05-07 07:00:19 +00:00
Ibraheem Ahmed
f8cd8e7768
gate loom dependency under feature flag (#844) 2025-05-06 19:03:50 +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