Commit graph

320 commits

Author SHA1 Message Date
Niko Matsakis
8affc724c9 make the compile-fail test work 2019-01-17 05:27:20 -05:00
Niko Matsakis
0f577a2b10 generate an impl of the trait from procedural macro
Instead of generating

```rust
trait Query: GetQueryTable<Foo> {
    fn foo() { .. }
}
```

generate

```rust
trait Query {
}

impl<T> Query for T
where
    T: GetQueryTable<Foo>,
{
    fn foo() { .. }
}
```
2019-01-17 05:04:27 -05:00
Niko Matsakis
755a5dcdf7
Merge pull request #108 from fabianschuiki/proc-macro
Implement `query_group` as procedural macro
2019-01-17 04:52:41 -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
Niko Matsakis
cd454e986e
Merge pull request #109 from nikomatsakis/release-0.9.2
release 0.9.2
2019-01-15 05:16:13 -05:00
Niko Matsakis
15fc110dff release 0.9.2
- Introduces the `propagated_panic` hook and specify that the
  salsa storage types are unwind safe (#107).
2019-01-15 05:06:54 -05:00
Niko Matsakis
0db861e3a8
Merge pull request #107 from matklad/panic-hooks
Unwinding-based cancelation via panic hook
2019-01-15 04:56:50 -05:00
Aleksey Kladov
61e1d69fb5 preserve both cancellation strategies 2019-01-11 10:13:38 +03:00
Aleksey Kladov
f07643d232 runtime is unwind-safe iff storage is unwind-safe 2019-01-11 10:04:09 +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
Aleksey Kladov
add15d83ea add panic hooks
To implement cancellation via unwinding, one needs to throw `Canceled`
value in `if_current_revision_is_canceled` and `on_propagated_panic`.
2019-01-10 12:15:37 +03:00
Niko Matsakis
da94eae920
Merge pull request #106 from nikomatsakis/release-0.9.1
release 0.9.1
2019-01-04 13:59:22 -05:00
Niko Matsakis
2af8cb3004 release 0.9.1
- Includes fix to a subtle cancellation bug (#66)
2019-01-04 13:57:37 -05:00
Niko Matsakis
aaa50e01d6
Merge pull request #105 from nikomatsakis/issue-66-transitive-cancelation
Issue 66 transitive cancelation
2019-01-04 13:57:09 -05: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
b3c7ec9f0d change cancelation mechanism and track "anon" reads when uncanceled 2019-01-04 13:50:50 -05:00
Niko Matsakis
d6990133b4 add debug logs 2019-01-04 08:39:59 -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
Niko Matsakis
ac18a7215b
Merge pull request #102 from nikomatsakis/release-0.9.0
release 0.9.0
2018-12-28 10:33:37 -05:00
Niko Matsakis
beff7adbc4 release 0.9.0
- Panic safety improvements (#81)
- We build on stable now (#94)
- Removed use of dynamic dispatch for constructing query
  descriptors (#95)
  - Technically a breaking change, though unlikely to affect clients
- Removed use of upgradable reads to avoid Amanieu/parking-lot#101 (#75)
- Upgraded parking lot (#100)
- Improved Debug output (#98)
- Snapshot implements Debug (#85)
2018-12-28 10:26:27 -05:00
Niko Matsakis
b9227c1435
Merge pull request #96 from jrmuizel/patch-1
Link adapton and glimmer
2018-12-28 10:25:35 -05:00
Niko Matsakis
7074e258ba
Merge pull request #98 from matklad/debug
show SharedState in Debug for Runtime
2018-12-28 10:25:16 -05:00
Niko Matsakis
36d99f031f
Merge pull request #100 from matklad/upgrade-pl
Upgrade parking lot
2018-12-28 10:24:46 -05:00
Niko Matsakis
dd1b6edc01
Merge pull request #75 from nikomatsakis/issue-70
remove use of upgradable reads from derived queries
2018-12-28 10:20:36 -05:00
Aleksey Kladov
f9610df77e upgrade parking lot 2018-12-27 16:09:47 +03:00
Niko Matsakis
2e4ff9a26e remove use of upgradable reads from derived queries 2018-12-24 10:10:22 -05:00
Aleksey Kladov
52206d5421 show SharedState in Debug for Runtime
This should be useful to debug deadlocks due to bad forking.
2018-12-21 12:12:06 +03:00
Jeff Muizelaar
62d2b47b78
Link adapton and glimmer 2018-12-15 22:29:31 -05:00
Niko Matsakis
31789ec7ef
Merge pull request #95 from nikomatsakis/no-dynamic-dispatch
No dynamic dispatch for constructing query descriptors
2018-12-13 06:20:24 -05:00
Niko Matsakis
3cde493e4e remove the virtual fn call for creating query descriptors
Previously, to "make the connection" between the database type `DB` and
the query type `Q`, we were passing down a fn pointer that would crate
the query descriptor. But now we have this `GetQueryTable` trait -- use
that instead.
2018-12-13 05:51:45 -05:00
Niko Matsakis
5415100358
Merge pull request #94 from nikomatsakis/build-on-stable
build-on-stable etc
2018-12-13 05:36:46 -05:00
Niko Matsakis
2ec060e097 build-on-stable etc 2018-12-13 05:32:16 -05:00
Niko Matsakis
5c156e7157
Merge pull request #93 from nikomatsakis/toolchain
kill toolchain
2018-12-13 05:31:25 -05:00
Niko Matsakis
174e0edece kill toolchain
We now build on stable.
2018-12-13 05:13:31 -05:00
Niko Matsakis
92e57f4b8b
Merge pull request #92 from salsa-rs/matklad-patch-1
Don't publish rust toolchain
2018-12-13 05:11:51 -05:00
Aleksey Kladov
547ff0dfe3
Don't publish rust toolchain 2018-12-06 22:19:14 +03:00
Niko Matsakis
1af16d5d7c
Merge pull request #81 from kleimkuhler/issue-24-ensure-parallel-panic-safety
Ensure parallel panic safety
2018-11-04 06:22:28 -05:00
Niko Matsakis
ee62af42c2
Merge pull request #83 from memoryruins/patch-1
add badges to readme
2018-11-04 06:14:19 -05:00
Niko Matsakis
6dac59cd6f
Merge pull request #85 from matklad/debug-snapshot
make Snapshot Debug
2018-11-04 06:14:03 -05: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
Aleksey Kladov
229c0b944d make Snapshot Debug 2018-11-01 15:16:57 +03:00
Niko Matsakis
bfcca3059c
Merge pull request #84 from nikomatsakis/master
release 0.8.0
2018-11-01 06:06:28 -04:00
Niko Matsakis
4a8b9123e6 update hello-world 2018-11-01 05:59:33 -04:00