Commit graph

2142 commits

Author SHA1 Message Date
Micha Reiser
4a26bf9e49
refactor: Push active query in execute (#996)
* refactor: Push active query in execute

* Remove inline from `execute_maybe_iterate`

* Pass Zalsa and ZalsaLocal

* Remove inline from `push_query`

* Remove `id` from `execute_query`

* Discard changes to src/zalsa_local.rs
2025-09-30 12:22:03 +00:00
Micha Reiser
5c826b59da
Update codspeed action (#997) 2025-09-30 11:48:35 +00:00
Astavie
5330dd99b9
Add implementations for Lookup and HashEqLike for CompactString (#988)
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-09-26 09:29:39 +00:00
Micha Reiser
29ab321b45
fix: Cleanup provisional cycle head memos when query panics (#993)
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 / Shuttle (push) Has been cancelled
Test / Benchmarks (push) Has been cancelled
Book / Deploy (push) Has been cancelled
* fix: Cleanup provisional cycle head memos on panic

* Update test outputs
2025-09-24 17:49:24 +00:00
Chayim Refael Friedman
e257df12ea
Provide a method to attach a database even if it's different from the current attached one (#992)
Some checks failed
Test / Test (push) Has been cancelled
Book / Book (push) Has been cancelled
Test / Shuttle (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
* Provide a method to attach a database even if it's different from the current attached one

rust-analyzer needs this.

* Fix Clippy on beta

* Update compile fail test outputs

---------

Co-authored-by: Lukas Wirth <lukas@zed.dev>
2025-09-18 08:57:22 +00:00
Carl Meyer
3713cd7eb3
Allow fallback to take longer than one iteration to converge (#991)
Some checks failed
Release-plz / Release-plz PR (push) Has been cancelled
Release-plz / Release-plz release (push) Has been cancelled
Test / Test (push) Has been cancelled
Book / Book (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-09-10 19:18:30 +00:00
Ibraheem Ahmed
a0e7a0660c
refactor entries API (#987)
Some checks failed
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
Book / Book (push) Has been cancelled
Test / Shuttle (push) Has been cancelled
Test / Benchmarks (push) Has been cancelled
Book / Deploy (push) Has been cancelled
2025-08-22 21:54:46 +00:00
Micha Reiser
a3ffa22cb2
fix: Runaway for unchanged queries participating in cycle (#981)
Some checks failed
Test / Test (push) Has been cancelled
Test / Miri (push) Has been cancelled
Test / Shuttle (push) Has been cancelled
Book / Book (push) Has been cancelled
Release-plz / Release-plz PR (push) Has been cancelled
Test / Benchmarks (push) Has been cancelled
Release-plz / Release-plz release (push) Has been cancelled
Book / Deploy (push) Has been cancelled
* fix: Runaway for unchanged queries participating in cycle

* Another regression test

* Fix runaway situation

* Discard changes to src/function/fetch.rs

* Undo tracing changes

* Move accumulated write outside of non-cycle branch

* Short circuit if cycle head is executing

* Inline

* Update expected test output

* Fix double execution

* Simplify check in `validate_same_iteration`

* Some more inline

* Pass references
2025-08-20 07:15:36 +00:00
Ibraheem Ahmed
fb4cb24cea
Persistent caching fixes (#982)
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
* reduce `serde` overhead

* avoid adding dependencies on interned values where garbage collection is disabled

* add compatibility with non-self-describing `serde` formats

* reuse edge traversal allocation

* correctly deserialize singleton inputs
2025-08-19 20:48:30 +00:00
Ibraheem Ahmed
b92180bdcf
outline cold path of lookup_ingredient (#984) 2025-08-19 20:40:38 +00:00
Micha Reiser
0656eca815
fix: Delete not re-created tracked structs after fixpoint iteration (#979)
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
* Fix tracked structs diffing in cycles

* Proper fix

* Clippy

* Add regression test

* Discard changes to src/function/maybe_changed_after.rs

* Improve comemnt

* Suppress clippy error in position where I don't control the types
2025-08-19 11:59:11 +00:00
Micha Reiser
411f8448e8
Update snapshot to fix nightly type rendering (#983) 2025-08-19 11:39:23 +00:00
Ibraheem Ahmed
52a40577a7
avoid cycles during serialization (#977)
Some checks failed
Release-plz / Release-plz release (push) Has been cancelled
Release-plz / Release-plz PR (push) Has been cancelled
Book / Book (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-08-14 15:19:23 +00:00
Ibraheem Ahmed
c380f1924b
fix assertion during interned deserialization (#978)
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-14 01:47:27 +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
Ibraheem Ahmed
5aab823a76
optimize Id::hash (#974) 2025-08-13 17:04:05 +00:00
Micha Reiser
918d35d873
Make thin-vec/serde dependency dependent on persistence feature (#973)
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-08-12 10:09:41 +00:00
Micha Reiser
e5bd9eb673
refactor: Remove tracked structs from query outputs (#969)
* refactor: Remove tracked structs from outputs

* clean up

* fix `IdentityMap::is_active`

* Update persistence snapshot

* Perf?

* Other nit

* Remove Deref

* Split `diff_stale_outputs`

* More short circuits

* Remove shrink to fit?

* Undo shrink-to-fit removal

* Pass CompletedQuery to diff_outputs

---------

Co-authored-by: Ibraheem Ahmed <ibraheem@ibraheem.ca>
2025-08-12 09:48:58 +00:00
Micha Reiser
a2cd1b8a72
Remove jemalloc (#972) 2025-08-12 09:30:59 +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
940f9c09a7
Fix maybe_changed_after runnaway for fixpoint queries (#961)
Some checks failed
Book / Book (push) Has been cancelled
Release-plz / Release-plz PR (push) Has been cancelled
Test / Shuttle (push) Has been cancelled
Test / Benchmarks (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
Book / Deploy (push) Has been cancelled
* WIP: Fix maybe_changed_after with fixpoint

* Remove `validate_same_iteration` from `deep_verify_memo`

* Keep `VerifyResult` small

* Simplify?

* Add test for verifying dependencies if the outer query has cycles

* Docs

* Rename `MaybeChangeAfterCycleHeads`

* Remove provisional fallback
2025-08-08 12:22:31 +00:00
Micha Reiser
22a4d9932b
test: add parallel maybe changed after test (#963)
* Add parallel `maybe_changed_after` shuttle test

* Update tests/parallel/cycle_nested_deep_conditional_changed.rs

Co-authored-by: Carl Meyer <carl@astral.sh>

---------

Co-authored-by: Carl Meyer <carl@astral.sh>
2025-08-08 08:32:37 +00:00
Micha Reiser
1b8f7c079f
Update tests for Rust 1.89 (#966) 2025-08-08 07:49:55 +00:00
Ibraheem Ahmed
b121ee46c4
remove allocation lock (#962)
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-08-06 17:55:51 +00:00
Ibraheem Ahmed
e999ae9663
consolidate memory usage information API (#964) 2025-08-06 17:33:44 +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
Micha Reiser
5b2a97b56c
refactor: Extract the cycle branches from fetch and maybe_changed_after (#955)
* Extract the cycle branches from `fetch` and `maybe_changed_after`

* Add `inline(never)`
2025-08-06 06:50:13 +00:00
Micha Reiser
d66fe331d5
allow reuse of cached provisional memos within the same cycle iteration during maybe_changed_after (#954)
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
* Allow `validate_same_iteration` slow path for `maybe_changed_after`

* Add logging to cycle_panic test and enable output capture for debugging

* Add RUST_LOG=trace to CI for detailed tracing output

* Possible fix

* Discard changes to .github/workflows/test.yml

* Delete logs/.eb4cbc62113c2d27a93f1a2e33d842313ed0aa05-audit.json

* Delete logs/mcp-puppeteer-2025-08-02.log

* docs

* Add regression test

* Discard changes to tests/parallel/cycle_panic.rs

* Discard changes to Cargo.toml

* Fix comment

* Discard changes to Cargo.toml

* Update src/function/maybe_changed_after.rs

Co-authored-by: Carl Meyer <carl@astral.sh>

---------

Co-authored-by: Carl Meyer <carl@astral.sh>
2025-08-05 07:37:27 +00:00
Micha Reiser
86ca4a9d70
Expose API to manually trigger cancellation (#959)
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-08-03 08:49:53 +00:00
Micha Reiser
c3f86b8d02
Upgrade dependencies (#956) 2025-08-03 04:40:21 +00:00
Micha Reiser
5b411a290c
refactor: Use CycleHeadSet in maybe_update_after (#953)
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 13:34:21 +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
Ibraheem Ahmed
f303b6db56
optimize allocation fast-path (#949)
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-01 16:50:02 +00:00
Ibraheem Ahmed
0ca4f4ff9a
remove borrow checks from ZalsaLocal (#939)
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-07-31 15:58:37 +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
Lukas Wirth
f3dc2f30f9
Retain backing allocation of ActiveQuery::input_outputs in ActiveQuery::seed_iteration (#948)
Some checks are pending
Test / Miri (push) Waiting to run
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 / Shuttle (push) Waiting to run
Test / Benchmarks (push) Waiting to run
2025-07-30 10:04:08 +00:00
Ibraheem Ahmed
8b6d12b596
remove extra bounds checks from memo table hot-paths (#938)
Some checks failed
Book / Deploy (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
Book / Book (push) Has been cancelled
Test / Miri (push) Has been cancelled
Test / Shuttle (push) Has been cancelled
Test / Benchmarks (push) Has been cancelled
2025-07-27 19:14:48 +00:00
Ibraheem Ahmed
bb0831a640
Outline all tracing events (#942)
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 / Shuttle (push) Has been cancelled
Test / Benchmarks (push) Has been cancelled
Book / Deploy (push) Has been cancelled
* outline all tracing events

* outline log events
2025-07-22 18:45:02 +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
962e0b924e
optimize page access (#940)
Some checks are pending
Release-plz / Release-plz PR (push) Waiting to run
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
Test / Shuttle (push) Waiting to run
Test / Benchmarks (push) Waiting to run
2025-07-21 06:34:48 +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
Lukas Wirth
fc00eba89e
Fix heap_size option not being preserved in tracked impls (#930)
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-02 12:34:02 +00:00
Ibraheem Ahmed
7ab42086d1
update papaya (#928)
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-28 05:31:53 +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