Commit graph

1329 commits

Author SHA1 Message Date
bors[bot]
93b3aab638
Merge #391
391: Fix derived-query-read diagram in the book r=nikomatsakis a=Skepfyr

This fixes the sort order of the backgrounds in the derived query read
diagram so that the flowchart is legible.

Co-authored-by: Jack Rickard <jack.rickard@outlook.com>
2022-08-31 00:02:05 +00:00
Bernardo Uriarte
fd71561981 reduce amount of generated code for DebugWithDb
by moving part of it to `salsa-2022`
2022-08-30 18:03:18 +02:00
bors[bot]
1cabfdb077
Merge #390
390: Add some doc on `specify` r=nikomatsakis a=XFFXFF

Add some documentation to explain why `specify` only works if the key is a tracked struct created in the current query, as per [this](https://salsa.zulipchat.com/#narrow/stream/146365-good-first-issue/topic/questions.20about.20.60specify.60/near/295416521) zulip thread.  
I also added some tests to test that "specify" shouldn't work in some cases.

Co-authored-by: XFFXFF <1247714429@qq.com>
2022-08-30 10:17:28 +00:00
bors[bot]
b41c9dd296
Merge #389
389: avoid warnings in generated code r=nikomatsakis a=vemoo

Addresses a couple of warnings that appear when I tried to use current master in https://github.com/dada-lang/dada.

Also added tests that will fail to compile if the macros generate warnings.

Co-authored-by: Bernardo Uriarte <berublan@gmail.com>
2022-08-30 10:12:38 +00:00
Jack Rickard
dbc4154419
Allow creation of tracked methods
This allows users to annotate impl blocks with `#[salsa::tracked]` and
then create tracked methods by marking individual functions with
`#[tracked]`.
2022-08-28 23:28:30 +01:00
Jack Rickard
6febfdac8f
Fix derived-query-read diagram in the book
This fixes the sort order of the backgrounds in the derived query read
diagram so that the flowchart is legible.
2022-08-28 12:17:43 +01:00
XFFXFF
cece3d840a run compile_fail test only on stable 2022-08-27 16:01:04 +08:00
XFFXFF
f46f2ac202 fix typos 2022-08-27 07:52:18 +08:00
XFFXFF
f7519acb13 add a test for specify
`specify` does not work if the key is a `salsa::interned`
2022-08-27 07:51:35 +08:00
XFFXFF
82a6251ebc add a test for specify
`specify` does not work if the key is a `salsa::input`
2022-08-27 07:05:35 +08:00
XFFXFF
8e53905b87 add a test for specify
`specify` only works if the key is created in the current query.
2022-08-27 06:44:36 +08:00
XFFXFF
dbe8561721 add some docs for specify 2022-08-27 06:22:04 +08:00
bors[bot]
e99e45d35a
Merge #388
388: Update README.md r=XFFXFF a=tusharxoxoxo

Gramatical Error

Co-authored-by: Tushar Dahiya <tusharxoxoxo@gmail.com>
2022-08-26 21:52:00 +00:00
Bernardo Uriarte
b14d12ada9 avoid warnings in generated code 2022-08-26 18:51:51 +02:00
Tushar Dahiya
a360ea9371
Update README.md 2022-08-26 21:50:21 +05:30
bors[bot]
1363d78fe5
Merge #384
384: Remove RFCs section of the book r=nikomatsakis a=seanchen1991

Closes #382 

The RFCs section of the Salsa book lists RFCs that pertain to the older version of Salsa, not `salsa-2022`. As per [this](https://salsa.zulipchat.com/#narrow/stream/333573-salsa-2022/topic/What's.20the.20state.20of.20Salsa.20RFCs.3F/near/295118254) Zulip thread, the RFCs section is being removed. 

Co-authored-by: Sean Chen <seanchen11235@gmail.com>
2022-08-26 09:01:52 +00:00
bors[bot]
6ee0889948
Merge #383
383: Have users of `SalsaStruct` specify allowed options r=XFFXFF a=DropDemBits

This allows adding new options exclusively to `tracked`, `input`, `interned`, or any combination of them, without having to add support code to `SalsaStruct`.

The motivating example is #337, where `input` needs to accept a new `singleton` option, but `tracked` and `interned` should reject it.

Co-authored-by: DropDemBits <r3usrlnd@gmail.com>
2022-08-25 23:39:01 +00:00
DropDemBits
62f0ceb665 Run cargo fmt 2022-08-25 13:19:57 -04:00
Sean Chen
5aefc92d61 Remove links to removed RFCs 2022-08-25 09:23:59 -05:00
Sean Chen
2114c8ae0c Remove RFCs section of the book 2022-08-25 08:55:22 -05:00
bors[bot]
5c63715a95
Merge #381
381: fix typos r=nikomatsakis a=Aadamandersson



Co-authored-by: Adam Andersson <adam.m.andersson@gmail.com>
2022-08-25 10:34:44 +00:00
bors[bot]
63fb4ad24c
Merge #376 #379
376: add `synthetic_write` r=nikomatsakis a=XFFXFF

fixes #364 

add `synthetic_write` and use it in test `lru_keeps_dependency_info`, the test will now be broken. We can use `lru_keeps_dependency_info` as a test for https://github.com/salsa-rs/salsa/issues/365, which already has a pr https://github.com/salsa-rs/salsa/pull/371.

379: Update test.yml r=nikomatsakis a=agluszak

- Add names to steps
- No need to run clippy AND check (https://stackoverflow.com/questions/57449356/is-cargo-clippy-a-superset-of-cargo-check)
- Run clippy on all targets with all features
- Fix issues reported by clippy

Co-authored-by: XFFXFF <1247714429@qq.com>
Co-authored-by: Andrzej Głuszak <gluszak.andrzej@gmail.com>
Co-authored-by: andrzej.gluszak <andrzej.gluszak@mpi-sp.org>
2022-08-25 10:30:34 +00:00
bors[bot]
7872a53ef2
Merge #375
375: Editing pass over the Overview, Tutorial, and Reference sections of the book r=nikomatsakis a=seanchen1991

This PR includes a number of proposed changes, mostly fixing typos, a few additions/rearrangements where I thought it made sense, as well as a couple of questions delineated in brackets, to the book in an effort to polish it up a bit. 

There's also a question around whether the book should standardize around 'Salsa' or 'salsa'. 

Co-authored-by: Sean Chen <seanchen11235@gmail.com>
Co-authored-by: Sean Chen <skypemaster007@gmail.com>
2022-08-25 10:27:21 +00:00
DropDemBits
5927ae23a3 Have users of SalsaStruct specify allowed options 2022-08-25 01:48:34 -04:00
XFFXFF
266505d58e remove synthetic_write from Runtime 2022-08-25 13:46:58 +08:00
XFFXFF
f899551962 fix unused import 2022-08-25 06:43:47 +08:00
XFFXFF
8e754ec0d7 add report_untracked_read to salsa::Database 2022-08-25 06:30:27 +08:00
XFFXFF
e86252d051 add synthetic_write to salsa::Database 2022-08-25 06:13:12 +08:00
XFFXFF
2dc5a6c796 remove salsa_runtime 2022-08-25 06:01:23 +08:00
Adam Andersson
18507f2ff7 fix some typos 2022-08-24 21:12:58 +02:00
Sean Chen
c99ed79b86 Fix a merge conflict 2022-08-24 13:00:24 -05:00
Sean Chen
b9bd1462cb Fix a merge conflict 2022-08-24 12:01:45 -05:00
andrzej.gluszak
73102b1e8e Fix clippy issues 2022-08-24 18:45:53 +02:00
Andrzej Głuszak
dc696726cf Update test.yml
- Add names to steps
- No need to run clippy AND check (https://stackoverflow.com/questions/57449356/is-cargo-clippy-a-superset-of-cargo-check)
2022-08-24 18:45:53 +02:00
Sean Chen
f2aff84b73 Merge branch 'master' of https://github.com/seanchen1991/salsa 2022-08-24 09:40:14 -05:00
Sean Chen
6eaab4f9b5 Incorporate PR feedback 2022-08-24 09:40:09 -05:00
Sean Chen
6995da0678
Expand on what dyn-safe means
Co-authored-by: Niko Matsakis <niko@alum.mit.edu>
2022-08-24 09:39:28 -05:00
XFFXFF
0e0626abfa writes with jars_mut 2022-08-24 20:17:13 +08:00
XFFXFF
6776919f39 give salsa_runtime a default implementation 2022-08-24 20:11:48 +08:00
XFFXFF
f5b0ff59d3 add runtime_mut and synthetic_write to HasJarsDyn 2022-08-24 20:01:00 +08:00
XFFXFF
ea0df0fc03 impl runtime_mut for test in debug.rs 2022-08-24 19:04:35 +08:00
XFFXFF
2912e60938 impl salsa_runtime_mut for all the tests 2022-08-24 19:00:21 +08:00
XFFXFF
340e2d521d add synthetic write 2022-08-24 19:00:21 +08:00
bors[bot]
5ce4662b81
Merge #371
371: Ported LRU improvements from old salsa to salsa 2022 r=nikomatsakis a=OLUWAMUYIWA

## What?
In handling evictions from the LRU, I replaced the `delete_memo`  with `evict` in the while keeping the `delete_memo` intact. 

## How?
This mechanism was already implemented in old `salsa `. I only had to port it.

Fixes: #365

Co-authored-by: OLUWAMUYIWA <onigbindemy@gmail.com>
Co-authored-by: Onigbinde Oluwamuyiwa Elijah <onigbindemy@gmail.com>
Co-authored-by: Niko Matsakis <niko@alum.mit.edu>
2022-08-24 10:47:28 +00:00
Niko Matsakis
282f45e011 run cargo fmt 2022-08-24 06:46:03 -04:00
bors[bot]
38c9b612dd
Merge #378
378: Derive DebugWithDb r=nikomatsakis a=agluszak

Closes #317 

Co-authored-by: Andrzej Głuszak <gluszak.andrzej@gmail.com>
2022-08-24 10:37:09 +00:00
Andrzej Głuszak
fe1c4b42e2 Fix parser test 2022-08-24 11:24:31 +02:00
Andrzej Głuszak
8e27ecd098 Fix formatting 2022-08-24 00:10:07 +02:00
Andrzej Głuszak
0c3084d009 Test cleanup 2022-08-24 00:01:44 +02:00
Andrzej Głuszak
fbb219a527 Add a test 2022-08-23 23:54:18 +02:00