Niko Matsakis
238be96432
introduce group storage structs to use from database_storage
macro
...
This also detected a bunch of crate visibility mismatches in the
tests.
2019-01-23 05:35:07 -05:00
Niko Matsakis
27af8ca820
add (failing) test that checks that we clear query stack
2019-01-18 05:52:02 -05:00
Fabian Schuiki
93c30a953d
make query_group macro procedural
...
Switch to a procedural implementation of the `query_group!` macro,
residing in the `components/salsa_macros` subcrate.
Allow the user to override the invoked function via `salsa::invoke(...)`
and the name of the generated query type via `salsa::query_type(...)`.
In all tests, replace the `salsa::query_group! { ... }` invocations with
the new attribute-style `#[salsa::query_group]` macro, and change them
to the new naming scheme for query types (`...Query`).
Update README, examples, and documentation.
2019-01-17 07:24:18 +01:00
Aleksey Kladov
61e1d69fb5
preserve both cancellation strategies
2019-01-11 10:13:38 +03:00
Aleksey Kladov
88313c8030
test unwinding-based cancelation
2019-01-10 13:34:20 +03:00
Aleksey Kladov
b637e1a9bb
mark runtime as UnwindSafe
...
An alternative would be to mark bit of state as runtime safe, but as
Runtime directly contains a RefCell we need to mark it as a whole
anyway!
2019-01-10 13:34:20 +03:00
Niko Matsakis
880681df49
make a test for transitive cancellation
2019-01-04 13:51:10 -05:00
Niko Matsakis
e5043a5644
make sum
invoke is_current_revision_canceled
deterministically
2019-01-04 13:51:09 -05:00
Niko Matsakis
da3be98295
extend cancellation test
2019-01-04 13:51:07 -05:00
Niko Matsakis
f5871e4c2f
revert transitive report_untracked_read
change
2019-01-04 08:39:42 -05:00
Aleksey Kladov
a2198f1f8a
prevent untracked queries from moving brackwards in time
...
If a query observes an untracked read, it gets changed_at equal to the
current revision. When we re-validate the query later, if it doesn't
do an untracked read this time, it gets changed_at equal to the
maximum of the dependencies. Crucially, this new changed_at may
be **older** then the previous value of changed_at. That is, we break
the rule that `changed_at` monotonically increases.
This can lead to missed re-executions down the line (see the added
test).
closes #66
2018-12-30 10:54:34 +03:00
Kevin Leimkuhler
bc60b09fc7
Refactor overwrite_placeholder
into PanicGuard
2018-11-01 16:53:08 -07:00
Kevin Leimkuhler
461ab22822
Change uses of fork
to snapshot
2018-11-01 11:26:16 -07:00
Kevin Leimkuhler
83482293c6
Use Event API and add docs
2018-11-01 11:26:16 -07:00
Kevin Leimkuhler
5bface5bb9
Ensure parallel panic safety and add test
2018-11-01 11:26:16 -07:00
Niko Matsakis
49cc8abe43
introduce query_mut
which you must use to get set
methods
2018-11-01 04:53:56 -04:00
Niko Matsakis
e070bf9809
s/Frozen/Snapshot/
2018-10-31 20:06:06 -04:00
Niko Matsakis
fc2a720ae2
s/fork/snapshot/
2018-10-31 20:05:31 -04:00
Niko Matsakis
5066726147
panic if you fork from inside a query for now
2018-10-31 16:03:03 -04:00
Niko Matsakis
2a6b8e07f9
remove the query_in_progress
field
2018-10-31 15:59:00 -04:00
Niko Matsakis
b0171dbc11
remove fork_mut
and adopt new strategy
...
Required simplifying the various tests.
2018-10-31 12:01:36 -04:00
Niko Matsakis
38dc4c31dd
introduce fork
, which yields a frozen handle
2018-10-31 06:05:03 -04:00
Niko Matsakis
9cac418ac8
rename fork
to fork_mut
2018-10-31 06:03:33 -04:00
Niko Matsakis
cf9db9cc7f
fix typo
2018-10-30 20:38:41 -04:00
Niko Matsakis
e355300554
use callbacks in parallel test
2018-10-30 20:19:25 -04:00
Aleksey Kladov
f4c00cfe97
Add a stress test
2018-10-30 14:41:56 -04:00
Niko Matsakis
13ae45d441
remove input policies
2018-10-30 12:59:33 -04:00
Niko Matsakis
042f89e7f8
add input policies to permit a wider range of inputs
2018-10-26 19:34:11 -04:00
Aleksey Kladov
f709e64bd5
Add one more cancellation test
...
closes #66
2018-10-25 17:06:55 +03:00
Niko Matsakis
a8e1e47a59
add simple test for SweepStrategy::discard_values()
2018-10-25 08:41:26 -04:00
Niko Matsakis
c21ea47cfc
introduce SweepStrategy
2018-10-25 05:48:37 -04:00
Niko Matsakis
370e46ff6a
tests that include non-constants
2018-10-25 05:48:37 -04:00
Niko Matsakis
b9ae3dbc4c
test for "shallow constant sweep"
2018-10-25 05:48:37 -04:00
Niko Matsakis
d429926ddd
treat constants more uniformly
...
We used to ignore constant inputs entirely. We now track them, but if we
find that a value is constant, we discard ITS inputs. This means that
-- if we track dependencies -- we have an "outer rim" of constant
values.
Also take the opportunity to reshuffle how derived inputs represent
their state.
2018-10-25 05:48:36 -04:00
Niko Matsakis
c4d93f9733
rename test to give it a unique prefix
2018-10-25 05:47:45 -04:00
Niko Matsakis
ce24850c3d
switch assert_log
to a better debug library
2018-10-25 05:47:45 -04:00
Kevin Leimkuhler
917ca42f04
Panic safely in a single threaded context
2018-10-23 21:54:14 -07:00
Niko Matsakis
c94db84945
add a test for the revision lock
2018-10-19 06:00:52 -04:00
Niko Matsakis
e348c21528
move signal
into its own module
2018-10-19 06:00:44 -04:00
Niko Matsakis
e58702ebd0
replace use of await
, which is a keyword in Rust 2018
2018-10-19 05:17:26 -04:00
Niko Matsakis
120ba00f33
remove a lot of ()
keys
2018-10-18 21:30:55 -04:00
Niko Matsakis
85f2357ebe
add a test showing what happens with inputs
2018-10-18 21:19:50 -04:00
Niko Matsakis
c0d8a08de9
permit provider fns to be variadic as well
2018-10-18 21:15:24 -04:00
Niko Matsakis
ed2cf2333f
support variadic queries in the trait definition
2018-10-18 19:24:38 -04:00
Niko Matsakis
2359d8aa0c
add a test of computing sum("abc")
twice in parallel
2018-10-14 14:58:31 -04:00
Niko Matsakis
3318921717
show that executing queries on distinct keys can proceed in parallel
2018-10-13 05:45:28 -04:00
Niko Matsakis
e9fadfcfe7
add more knobs, and refactor to make that easier
2018-10-13 05:39:51 -04:00
Niko Matsakis
8da63ec029
move distinct tests into their own files to ease reading
2018-10-13 05:27:20 -04:00
Niko Matsakis
fb5ba07290
move the test setup in setup.rs
2018-10-13 05:22:38 -04:00
Niko Matsakis
8f03f3bb76
move parallel tests into a directory
2018-10-13 05:03:34 -04:00