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
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
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
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
XFFXFF
9fb5f7a366
add some comments
2022-08-09 08:43:44 +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
Brian Anderson
7e72c0c3df
Fix storage examples
2022-08-05 12:17:22 -06:00
Niko Matsakis
fa2d24a0be
squash (some) warnings
2022-08-05 14:32:12 -04:00
Niko Matsakis
974725a27d
re-export from salsa_2022_macros
...
d'oh, why didn't this fail CI?
2022-08-05 14:26:13 -04:00
Niko Matsakis
66f1f1c50c
rename salsa-entity to salsa-2022
2022-08-05 13:20:14 -04:00
Niko Matsakis
4f234cfbb9
remove component and replace with specify
option
...
You can now do `#[salsa::tracked(specify)]` and you will
get a method `some_fn::specify(...)` that can be used to
specify the value.
2022-08-05 02:51:13 -04:00
Niko Matsakis
1f1950c145
refactor error reporting, detect too few argments
2022-08-05 01:24:07 -04:00
Niko Matsakis
627eddd428
add a test for tracked functions
2022-08-05 00:39:00 -04:00
Niko Matsakis
b4053ad76b
rename references to memoized to tracked
2022-08-04 01:42:42 -04:00
Niko Matsakis
91a18114bc
s/memoized/tracked-fn/
2022-08-04 01:41:04 -04:00
Niko Matsakis
8f2f664e96
rename impl stuff from entity to tracked struct
2022-08-03 13:42:33 -04:00
Niko Matsakis
a96cb03a05
remove #[salsa::entity]
, and #[salsa::tracked]
2022-08-03 09:09:22 -04:00
Niko Matsakis
8ff4f5069e
rename EntityLike to SalsaStruct
2022-08-03 08:53:27 -04:00
Niko Matsakis
e331f7102d
mark some unused variables
2022-08-03 08:51:14 -04:00
Niko Matsakis
3a55d3072b
remove DataItem now that we don't support enums
...
simpler.
2022-08-03 03:50:46 -04:00
Niko Matsakis
0880be0b79
remove support for interned enums
...
It's nicer to just define a struct with a data field.
2022-08-03 03:43:39 -04:00
Niko Matsakis
7e3e77d611
fix various small bugs in #[salsa::input]
2022-08-03 00:41:22 -04:00
Niko Matsakis
f0156cca36
rename all_entity_fields
to all_field_names
2022-08-03 00:32:27 -04:00
Niko Matsakis
783981dc16
add salsa::input
items
2022-08-03 00:31:50 -04:00
Niko Matsakis
1c882bb598
fix missing format!
calls in entity_like.rs
2022-08-03 00:31:26 -04:00
Niko Matsakis
196baab60d
add InputIngredient
...
They are a very simple variant on entities
2022-08-03 00:30:52 -04:00
Niko Matsakis
d134e0a54b
comment the fields on an interned ingredient
2022-08-03 00:05:37 -04:00
Niko Matsakis
3559ac2b21
remove trailing whitespace
2022-08-02 15:05:28 -04:00
Niko Matsakis
548beade54
extract configuration struct/impl code from entity
...
`#[salsa::input]` structs will need similar code
2022-08-02 10:56:27 -04:00