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
bors[bot]
8a06de0610
Merge #322
...
322: re-export from salsa_2022_macros r=nikomatsakis a=nikomatsakis
d'oh, why didn't this fail CI?
Co-authored-by: Niko Matsakis <niko@alum.mit.edu>
2022-08-05 18:35:43 +00:00
Niko Matsakis
fa2d24a0be
squash (some) warnings
2022-08-05 14:32:12 -04:00
Niko Matsakis
5efda5c21d
run cargo check --all in CI
2022-08-05 14:29:54 -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
Brian Anderson
7e72c0c3df
Fix storage examples
2022-08-05 12:17:22 -06:00
bors[bot]
022641c04a
Merge #321
...
321: rename salsa-entity-mock to salsa-2022 r=nikomatsakis a=nikomatsakis
cc #305
Co-authored-by: Niko Matsakis <niko@alum.mit.edu>
2022-08-05 17:26:33 +00:00
Niko Matsakis
66f1f1c50c
rename salsa-entity to salsa-2022
2022-08-05 13:20:14 -04:00
bors[bot]
3ba3dbb19b
Merge #308
...
308: Tracked proposal r=nikomatsakis a=nikomatsakis
I sketched out a variation of the entity API that I am calling tracked (this is a hat-tip to Ember's terminology, cc `@wycats).` It is the mostly the same ideas, but repackaged in a way that I think is more intuitive. This was inspired by writing the previous tutorial and thinking how things could be a bit cleaner.
To read the proposal, check out the "overview" page on the netlify preview. The tutorial and code have not been fully updated to match yet.
cc #305
Co-authored-by: Niko Matsakis <niko@alum.mit.edu>
2022-08-05 10:42:38 +00:00
Niko Matsakis
11fb9823cc
remove blank line
2022-08-05 02:57:22 -04:00
Niko Matsakis
39c26b5ea6
update documentation to use new name, specify
...
override is a keyword, turns out
2022-08-05 02:53:40 -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
89f801276c
another simple test
2022-08-05 00:41:00 -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
e222cce854
rework the tutorial with the new paradigm
2022-08-04 01:31:13 -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
41f9ca6462
update tutorial with newer input structs in mind
2022-08-03 03:50:57 -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
aefb85385e
rewrite calc example to use a salsa::input
2022-08-03 00:41:36 -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