Commit graph

1033 commits

Author SHA1 Message Date
Niko Matsakis
7b9c383eb0 improve parallel cycle tests
They now use signals to guarantee we are testing the code paths
we want to be testing.
2021-10-30 11:15:08 -04:00
Niko Matsakis
b4a04531a9 document what we are testing, rename variables 2021-10-30 11:10:10 -04:00
Niko Matsakis
bcffa4a836 find cycle recovery strategy for a given cycle 2021-10-30 11:10:07 -04:00
Niko Matsakis
fc826b0689 add cycle_recovery_strategy function on database 2021-10-30 11:09:24 -04:00
Niko Matsakis
e49088644d introduce cycle_recovery_strategy function
Find the cycle recovery strategy for a given DatabaseKey.
2021-10-30 11:09:24 -04:00
Niko Matsakis
853006fccf isolate find_cycle_participants into its own fn 2021-10-30 11:09:24 -04:00
Niko Matsakis
d082270610 introduce CYCLE_STRATEGY constant for queries
This allows us to figure out whether a query can recover
from a cycle (and how) without invoking the `recover`
function.
2021-10-30 11:09:24 -04:00
Niko Matsakis
7b4ee6fc34 improve panic error message 2021-10-30 11:09:08 -04:00
Niko Matsakis
40139abc24 enable debug logging in the cycles tests 2021-10-30 11:09:08 -04:00
Niko Matsakis
b72b251240 add should-panic annotations to cycle tests that fail 2021-10-30 11:09:08 -04:00
Aleksey Kladov
0f3bc72ec0 Add tests for "dynamic" cycles
If I am not in an error, all current tests uses "static" cycles -- a
cycle always present. Let's spice that up by adding conditional cycles:
cycles that appear only for specific impls
2021-10-30 11:09:05 -04:00
Florian Diebold
ae8348c4f1 Add failing test for cycle revalidation 2021-10-30 11:07:40 -04:00
bors[bot]
2ae813e9ef
Merge #283
283: Publish 0.17.0-pre.2 r=jonas-schievink a=jonas-schievink

User-facing changes since 0.17.0-pre.1:

- https://github.com/salsa-rs/salsa/pull/267
- https://github.com/salsa-rs/salsa/pull/276
- https://github.com/salsa-rs/salsa/pull/280

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-10-06 20:37:14 +00:00
Jonas Schievink
cb38bb7066 Publish 0.17.0-pre.2 2021-10-06 22:33:30 +02:00
bors[bot]
5b4710cb27
Merge #282
282: Update book workflow r=nikomatsakis a=mbrobbel

I noticed the book workflow [failing](https://github.com/salsa-rs/salsa/runs/3568827495?check_suite_focus=true) on master. This PR attempts to fix the failing workflow and prevent failing book deploys in the future.

- Add the book build to `bors.toml`.
- Make sure the book workflow runs for the bors branches (`staging` and `trying`).
- Exclude the bilibili domain in the mdbook-linkcheck config to prevent the 403s.

I also bumped mdbook and mdbook-mermaid versions.

Co-authored-by: Matthijs Brobbel <m1brobbel@gmail.com>
2021-09-30 21:37:31 +00:00
Matthijs Brobbel
b94a5f166c
Update book workflow 2021-09-28 22:03:05 +02:00
bors[bot]
bba8dd57da
Merge #281
281: Add bilibili videos links into book r=nikomatsakis a=armoha

Fixes #278 


Co-authored-by: armoha <kein0011@naver.com>
2021-09-10 15:33:58 +00:00
armoha
ec7a3ae3c3 Add bilibili videos links into book 2021-09-10 05:39:10 +09:00
bors[bot]
a6f9a8a44c
Merge #280
280: Fix `invalidate` and `report_synthetic_read` r=nikomatsakis a=jonas-schievink

Fixes https://github.com/salsa-rs/salsa/issues/246
Fixes https://github.com/salsa-rs/salsa/issues/277

`report_synthetic_read` only forced the durability of the current query to some lower value, but didn't set its `changed_at` value, leading to downstream queries assuming that they could reuse the query's value when they could not. Force `changed_at` to the current revision to fix that. This will not result in unnecessary invocations of the query, because salsa still treats it as pure, and won't re-run it if its inputs are up to date.

Additionally, `invalidate` did also not set the slot's `changed_at` field, which is fixed by setting it to the newly created revision.

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-09-09 16:10:06 +00:00
Jonas Schievink
8f0b9b7f82 Fix invalidate and report_synthetic_read 2021-09-03 23:35:15 +02:00
bors[bot]
aed4bbff73
Merge #279
279: Remove dead code r=nikomatsakis a=jonas-schievink

This was added in fd036a4f15, but never actually came into effect.

Granting access to `QueryTableMut` for every query type should be harmless, because every method on that type has a where-clause that makes it only work with the right query storage type.

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-09-03 18:10:16 +00:00
Jonas Schievink
7b39882deb Remove dead code 2021-09-03 18:38:34 +02:00
bors[bot]
114d6db8f6
Merge #276
276: Keep parameter names of queries in `query_group` attribute r=nikomatsakis a=Veykril

Now that RA gets to a point where it can expand attributes it would be helpful not to discard parameter names.
Before:
![Code_1XD5LiRfJw](https://user-images.githubusercontent.com/3757771/123661119-9420ab00-d834-11eb-8d59-296533e0a96e.png)
After:
![Code_kwRhvPySuL](https://user-images.githubusercontent.com/3757771/123661116-93881480-d834-11eb-88e4-b8e4dbf2be52.png)


Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-08-24 19:51:37 +00:00
Lukas Wirth
ea378103c3 Use format_ident! when creating new identifiers in salsa-macros 2021-08-24 02:47:28 +02:00
Lukas Wirth
26b47e02e9 Keep parameter names of queries in query_group attribute 2021-06-30 21:14:10 +02:00
bors[bot]
6db6c3c4d0
Merge #271
271: CI runs Clippy r=nikomatsakis a=1tgr



Co-authored-by: Tim Robinson <tim.g.robinson@gmail.com>
2021-06-17 14:26:14 +00:00
bors[bot]
08cddfd6dd
Merge #272
272: CI installs `rustfmt` where needed r=nikomatsakis a=1tgr

Only the stable toolchain appears to install `rustfmt` by default

Co-authored-by: Tim Robinson <tim.g.robinson@gmail.com>
2021-06-17 14:24:35 +00:00
Tim Robinson
fc6806a07c CI runs Clippy 2021-06-17 15:21:51 +01:00
Tim Robinson
a691096063 CI installs rustfmt where needed
Only the stable toolchain appears to install `rustfmt` by default
2021-06-17 15:10:45 +01:00
bors[bot]
5c20caaab4
Merge #268
268: Expose proc macro docs via the main crate r=nikomatsakis a=1tgr

Improve visibility by placing the `database` and `query_group` proc macros at the bottom of the main docs page, instead of manually browsing to the docs for the `salsa-macros` crate.

Co-authored-by: Tim Robinson <tim.g.robinson@gmail.com>
2021-06-17 13:40:35 +00:00
bors[bot]
7c4bc51165
Merge #270
270: CI runs `cargo fmt` in check mode r=nikomatsakis a=1tgr



Co-authored-by: Tim Robinson <tim.g.robinson@gmail.com>
2021-06-17 13:37:42 +00:00
Tim Robinson
de030b0a69 CI runs cargo fmt in check mode 2021-06-16 19:26:16 +01:00
Tim Robinson
c6e4b23c71 Expose proc macro docs via the main crate 2021-06-16 09:50:05 +01:00
bors[bot]
ff938024e2
Merge #267
267: remove tracing garbage collection support r=matklad a=nikomatsakis

It is not widely used and it makes it harder to evolve Salsa.

Co-authored-by: Niko Matsakis <niko@alum.mit.edu>
2021-06-15 19:30:07 +00:00
Niko Matsakis
11c55b804d
Update RFC0008-Remove-Garbage-Collection.md 2021-06-15 15:29:42 -04:00
Niko Matsakis
d178d1b765 update a few comments that mention gc 2021-06-06 06:20:23 -04:00
Niko Matsakis
1bf5757255 link RFC to PR 2021-06-06 06:08:45 -04:00
Niko Matsakis
f7dd6b3219 remove tracing garbage collection support
It is not widely used and it makes it harder to evolve Salsa.
2021-06-06 06:06:03 -04:00
bors[bot]
d552f59c8b
Merge #266
266: Publish 0.17.0-pre.1 r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-05-29 18:19:39 +00:00
Aleksey Kladov
a84ee62bd1 Publish 0.17.0-pre.1
- new cancellation API #265
2021-05-29 20:57:48 +03:00
bors[bot]
b54dc63f87
Merge #262
262: RFC: Opinionated cancelation r=nikomatsakis a=nikomatsakis

@matklad and @jonas-schievink have been discussing a fresh take on salsa that builds on the experience we've gained with it, and one of the first simple steps we wanted to take was to make a more opinionated cancelation model. This is a write-up.

Co-authored-by: Niko Matsakis <niko@alum.mit.edu>
2021-05-28 00:25:50 +00:00
Niko Matsakis
67207d8d0d update with links to implementation 2021-05-27 20:24:38 -04:00
bors[bot]
e17e77c4e9
Merge #265
265: Implement "opinionated cancellation" r=nikomatsakis a=jonas-schievink

This implements the design described in RFC https://github.com/salsa-rs/salsa/pull/262.

Currently, the `in_par_get_set_cancellation` test is failing. I'm not completely sure what it is trying to test (the comment on the test does not match its behavior), so I couldn't fix it.

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-05-27 12:30:18 +00:00
Jonas Schievink
b9fc82969f Mention that salsa_event should be used instead 2021-05-27 14:23:30 +02:00
Jonas Schievink
458266e1cd Move unwind_if_cancelled to Database 2021-05-25 15:34:57 +02:00
Jonas Schievink
1fb660c33e Use the more common spelling of cancell{ed,ation} 2021-05-25 15:08:23 +02:00
Jonas Schievink
f9cb032568 Fix "frozen" test 2021-05-25 14:55:38 +02:00
Jonas Schievink
018658b450 Explain why we don't duplicate panics from other threads 2021-05-19 18:32:16 +02:00
Jonas Schievink
bb4b42acf1 Retain original import style 2021-05-18 16:08:43 +02:00
Jonas Schievink
223f87bb18 Canonicalize to US spelling of "cancelation" 2021-05-18 15:36:43 +02:00