Commit graph

1000 commits

Author SHA1 Message Date
bors[bot]
367c0bfe11
Merge #343
343: Whoops r=nikomatsakis a=nikomatsakis

Revert a bunch of commits I apparently pushed by accident!

Co-authored-by: Niko Matsakis <niko@alum.mit.edu>
2022-08-12 18:33:15 +00:00
Niko Matsakis
5722b333ed Revert "add broken test for specify"
This reverts commit 87ff990774.
2022-08-12 14:28:31 -04:00
Niko Matsakis
15ec60613c Revert "track outputs for the active record"
This reverts commit de2fb22a1c.
2022-08-12 14:28:30 -04:00
Niko Matsakis
8fc38fed48 Revert "generalize list of "entities created" to "outputs""
This reverts commit cbe7d371c9.
2022-08-12 14:28:28 -04:00
Niko Matsakis
5046ba1e6d Revert "record when specify is called by a user"
This reverts commit 787480ffab.
2022-08-12 14:28:27 -04:00
Niko Matsakis
cb0b53caa7 Revert "track both inputs/outputs for each query"
This reverts commit 49ccac5d3d.
2022-08-12 14:28:26 -04:00
Niko Matsakis
afefcdf335 Revert "diff outputs when replacing a memoized value"
This reverts commit 1e3272bc61.
2022-08-12 14:28:25 -04:00
Niko Matsakis
eabb55632e Revert "create remove_stale_output method on ingredients"
This reverts commit 8b7324dca8.
2022-08-12 14:28:20 -04:00
Niko Matsakis
8b7324dca8 create remove_stale_output method on ingredients
but we are not doing anything in it, yet
2022-08-11 12:15:17 -04:00
Niko Matsakis
1e3272bc61 diff outputs when replacing a memoized value
We don't do anything with this info right now besides log it,
but you can see that we are reporting it at the right times
in the `specify_tracked_fn_in_rev_1_but_not_2` test
(also fix an oversight in the test where it was creating a new input
each time).
2022-08-11 00:56:15 -04:00
Niko Matsakis
49ccac5d3d track both inputs/outputs for each query
Rename QueryInputs to QueryEdges and modify its fields
to track both inputs and outputs. The size of the struct
doesn't actually change, the separator comes out of padding.
2022-08-11 00:28:34 -04:00
Niko Matsakis
787480ffab record when specify is called by a user
We don't need to record it for pre-declared fields,
as they are always specified.
2022-08-10 03:55:04 -04:00
Niko Matsakis
cbe7d371c9 generalize list of "entities created" to "outputs"
We will record each thing that gets *output* by the query.
Use a btree-set so that we can get a sorted list.
That will allow us to easily compare what is output between revisions.
We will use that to clear stale values.
2022-08-10 03:54:04 -04:00
Niko Matsakis
de2fb22a1c track outputs for the active record 2022-08-10 03:46:27 -04:00
Niko Matsakis
87ff990774 add broken test for specify
We specify the value for the field in 1 rev but
fail to specify in the next revision. The old value
is (currently) never cleared.
2022-08-10 01:45:15 -04:00
bors[bot]
7d8b1881ad
Merge #341
341: add comments, tests, and mild refactorings r=nikomatsakis a=nikomatsakis

This branch contains various bits of work I was doing towards fixing #338 and other such things. I'm opening it now to avoid merge conflicts and because the comments seem useful. 

Co-authored-by: Niko Matsakis <niko@alum.mit.edu>
2022-08-10 04:46:08 +00:00
Niko Matsakis
d72803c027 don't mark specified values as volatile
This is what we want, but it's not a complete fix.
It does make these tests work, though!
Good enough to commit.
2022-08-10 00:42:32 -04:00
Niko Matsakis
eeb47a065c add a comment to TrackedStructInDb trait 2022-08-10 00:42:32 -04:00
Niko Matsakis
85d88b8df0 give each function a SalsaStruct assoc type 2022-08-10 00:42:32 -04:00
Niko Matsakis
27a240aa86 comment out red_herring tests
They do not pass (yet)
2022-08-10 00:42:32 -04:00
Niko Matsakis
940ed006cf add SalsaStructInDb impls for inputs, interned
Now all types have them.
2022-08-10 00:42:32 -04:00
Niko Matsakis
25e085fbdc add a SalsaStructInDb trait
Not currently used anywhere,
but will be implemented by all salsa structs.
2022-08-10 00:42:32 -04:00
Niko Matsakis
fc5e05fae0 introduce newtype wrappers for each salsa struct
This way they have separate namespaces for their inherent methods.
2022-08-10 00:42:32 -04:00
Niko Matsakis
4400c1b66a make constructing an Id private to salsa
This way we know that all Id instances came from salsa.

Not sure if that matters, but why not?
2022-08-10 00:42:32 -04:00
Niko Matsakis
ac837e2cdc rename set method to specify
That's the method name we use when exposing this to users.
2022-08-10 00:42:32 -04:00
Niko Matsakis
9229b1a23a rename Ingredients to Routes
The old name makes it sound like it contains the
actual ingredients, but really it just contains
the routes we use to find them at runtime.
2022-08-10 00:42:32 -04:00
Niko Matsakis
00d95436e0 more comments 2022-08-10 00:42:32 -04:00
Niko Matsakis
2547823a5f do not allow dead code anymore 2022-08-10 00:42:32 -04:00
Niko Matsakis
7e747f357c enable logging for tracked-fn-read-own-entity test 2022-08-10 00:42:32 -04:00
Niko Matsakis
f513f46380 add comments, remove dead-code lints 2022-08-10 00:42:32 -04:00
Niko Matsakis
323e677182 enable logging of salsa events by default
and add logging to tests
2022-08-10 00:42:27 -04:00
Niko Matsakis
395df47016 use DebugWithDb trait for the database key index 2022-08-10 00:42:05 -04:00
Niko Matsakis
00172efb19 add red-herring tests which modify distinct inputs 2022-08-10 00:42:05 -04:00
bors[bot]
9ff6fb3376
Merge #336
336: Add options to tracked functions for cycle recovery r=nikomatsakis a=XFFXFF

closes #331 

This pr ports the old salsa tests for cycle in a single thread, except for [cycle_disappears_durability](03a27a7054/tests/cycles.rs (L326)), since we don't have the api that permits setting durability.  

~I haven't ported parallel related tests, which would be some work, wondering if we can merge this in first~

Co-authored-by: XFFXFF <1247714429@qq.com>
2022-08-10 04:14:16 +00:00
XFFXFF
d32cff1bfb define Jar struct separately 2022-08-10 07:28:13 +08:00
XFFXFF
9feb0050e4 ports parallel related tests for cycle 2022-08-09 18:06:39 +08:00
bors[bot]
bd2992a621
Merge #334
334: test: expect reuse field X changes but fn depends on field Y r=nikomatsakis a=XFFXFF

ref: #328 

Co-authored-by: XFFXFF <1247714429@qq.com>
2022-08-09 05:16:40 +00:00
bors[bot]
4c3a5d339e
Merge #330
330: Fix some typos in the book r=nikomatsakis a=MihailMihov



Co-authored-by: Mihail Mihov <mmihov.personal@gmail.com>
2022-08-09 05:14:43 +00:00
XFFXFF
9fb5f7a366 add some comments 2022-08-09 08:43:44 +08:00
XFFXFF
80bfff8d7a port old tests for cycle in a single thread 2022-08-09 07:54:15 +08:00
XFFXFF
045f5186b3 modify tracked_fn macro to use it 2022-08-08 08:57:29 +08:00
XFFXFF
0f907dd3cd add recovery_fn option 2022-08-08 07:32:39 +08:00
XFFXFF
815bf6003b add a test 2022-08-08 07:20:39 +08:00
XFFXFF
1ec4e45a7f test: expect reuse field X changes but fn depends on field Y 2022-08-07 12:43:45 +08:00
Mihail Mihov
5d1ff35f6d
Merge branch 'salsa-rs:master' into master 2022-08-06 21:52:26 +03:00
Mihail Mihov
f1e6e54b57 Fix typos 2022-08-06 21:26:09 +03:00
bors[bot]
03a27a7054
Merge #326
326: Salsa 2022 tests r=nikomatsakis a=nikomatsakis

Convert the `salsa-2022-tests` crate into a utility crate, and make a `tests` directory so that we can add tests one by one.

Fixes #325 

Co-authored-by: Niko Matsakis <niko@alum.mit.edu>
2022-08-06 15:04:25 +00:00
bors[bot]
1a54a631d4
Merge #324
324: Fix storage examples r=nikomatsakis a=brson



Co-authored-by: Brian Anderson <andersrb@gmail.com>
2022-08-06 14:46:10 +00:00
Niko Matsakis
3b3e0be981 make salsa-2022 tests into independent files
also add a few new tests
2022-08-06 10:43:43 -04:00
Niko Matsakis
e0c3109d6a add a test where we change the input 2022-08-06 02:27:20 -04:00