Commit graph

919 commits

Author SHA1 Message Date
bors[bot]
47d409937f
Merge #260
260: Include user-readable query keys in cycle errors r=nikomatsakis a=jonas-schievink

Previous output:

```
---- nameres::tests::macros::unexpanded_macro_should_expand_by_fixedpoint_loop stdout ----
thread 'nameres::tests::macros::unexpanded_macro_should_expand_by_fixedpoint_loop' panicked at 'Internal error, cycle detected:

DatabaseKeyIndex { group_index: 2, query_index: 11, key_index: 1 }
', /home/jonas/.cargo/registry/src/github.com-1ecc6299db9ec823/salsa-0.16.1/src/lib.rs:490:48
```

Output after this PR:

```
---- nameres::tests::macros::unexpanded_macro_should_expand_by_fixedpoint_loop stdout ----
thread 'nameres::tests::macros::unexpanded_macro_should_expand_by_fixedpoint_loop' panicked at 'Internal error, cycle detected:

hygiene_frame(HirFileId(MacroFile(MacroFile { macro_call_id: LazyMacro(LazyMacroId(0)) })))
', /home/jonas/dev/salsa/src/lib.rs:492:35
```

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-05-15 09:03:36 +00:00
Niko Matsakis
6eca1641eb
Merge pull request #247 from ChristopherBiscardi/on-demand-example
update on_demand_inputs invalidation
2021-05-15 04:55:37 -04:00
Aleksey Kladov
a7d59dc610 fix the name of the job for bors 2021-05-09 16:44:27 +03:00
Aleksey Kladov
10ecabf5d8 run CI on bors branches 2021-05-08 00:40:09 +03:00
Aleksey Kladov
6b728a4a50 use bors for not rocket science rule 2021-05-08 00:12:18 +03:00
Jonas Schievink
08c7a6bd63 Include user-readable query keys in cycle errors 2021-05-06 19:56:05 +02:00
Aleksey Kladov
e3313ff995 Publish v0.16.1
- #259 salsa's `debug!` logs now include query dependencies in
  human-readable format, which helps with debugging unwanted
  dependencies.
2021-05-05 18:32:23 +03:00
Aleksey Kladov
b5683fec5e
Merge pull request #259 from jonas-schievink/debug-query-deps
Log `MemoInputs` in human-readable form
2021-05-05 18:31:52 +03:00
Jonas Schievink
dae31a9bb7 Log MemoInputs in human-readable form 2021-05-05 15:34:58 +02:00
Christopher Biscardi
c17778e358 add links 2020-11-01 12:23:17 -08:00
Aleksey Kladov
789cf5e99b
Merge pull request #251 from matklad/16
Publish v0.16.0
2020-10-14 12:36:19 +02:00
Aleksey Kladov
9e6adc9900 Publish v0.16.0
- #242 allow `dyn Database` to be non-'static
- #248 allow using borrowed keys for invalidation
- #250 upgrade crossbeam_utils
2020-10-14 12:33:39 +02:00
Aleksey Kladov
6b96a1e22f Leverage Cargo defaults 2020-10-14 12:29:29 +02:00
Aleksey Kladov
1917a2a37b Pubish 0.15.3 2020-10-13 17:24:58 +02:00
Aleksey Kladov
15e5fa0112 ⬆️ crossbeam-utils 2020-10-13 17:24:58 +02:00
Andrew Hickman
b275d36adf Allow using a borrowed key in DerivedQueryStorageOps::invalidate 2020-09-24 14:35:52 +03:00
Christopher Biscardi
5c1ebc22af update on_demand_inputs invalidation 2020-09-13 00:17:39 -07:00
Niko Matsakis
2e2239a307
Merge pull request #242 from Marwes/lift_static_restriction
feat: Allow the dynamic db to be non-static
2020-09-09 10:52:50 -04:00
Aleksey Kladov
590c037323 Release v0.15.2
* #243, better error message from proc macro
* #240, purge method for cleaning the database completely
2020-08-05 13:55:12 +02:00
Niko Matsakis
2084b99ba4
Merge pull request #240 from matklad/purge
Add purge method
2020-07-31 14:17:00 -04:00
Niko Matsakis
543beebb8f
Merge pull request #243 from Kixiron/less-panics
Made proc-macros panic less
2020-07-31 14:16:40 -04:00
Aleksey Kladov
a760f9e3c9 Release v0.15.1
- replace `rand` with `oorandom` (#241)
2020-07-29 19:25:13 +02:00
Niko Matsakis
2e5b841405
Merge pull request #241 from matklad/oorandom
Switch from rand to oorandom
2020-07-29 12:11:46 -04:00
Chase Wilson
78b32d69da
Made proc-macros panic less
Replaced the panics in query_group with syn errors for better user feedback and experience
2020-07-25 14:38:13 -05:00
Markus Westerlind
3a84a77ebc Remove some unnecessary changes 2020-07-24 11:23:41 +02:00
Markus Westerlind
e2ab6c8bfa feat: Allow the dynamic db to be non-static 2020-07-23 17:08:06 +02:00
Aleksey Kladov
35a420d0c0 Remove LRU distribution tests
They are ignored and in the git history anyway.
2020-07-23 11:36:38 +02:00
Markus Westerlind
ce6428fbbd Lift the static restriction on the traits 2020-07-23 11:34:20 +02:00
Aleksey Kladov
b460db700a Switch from rand to oorandom
The primary motivation here is reducing dependencies. rand has quite a
few of them, and many come from `getrandom` crate (bindings to system
APIs to get true randomness). Some of `getrandom` crates don't have
Apache 2.0 OR MIT license, and it probably doesn't make sense to make
salsa's licensing situation more complicated for feature we don't even
use.

There's a number of small&fast random crates there:

* randomize
* oorandom
* fastrand

I've picked oorandom because it was the simplest & smallest (doesn't
have a thread_local RNG, for example).
2020-07-23 11:30:23 +02:00
Aleksey Kladov
5f53837458 Add purge method
This is mostly useful for debugging, rust-analyzer uses it to measure
memory usage of tables
2020-07-22 18:41:53 +02:00
Aleksey Kladov
380c4c1dc8 Release v0.15.0
The single (but big) change is Dynamic Database RFC implementation:

https://github.com/salsa-rs/salsa/pull/231
2020-07-07 15:45:39 +02:00
Niko Matsakis
9b9dbcca8c
Merge pull request #231 from nikomatsakis/dynamic-databases-rfc
[RFC] Dynamic databases
2020-07-07 06:13:03 -04:00
Niko Matsakis
4974d649ec mention the plumbing 2020-07-07 10:07:47 +00:00
Niko Matsakis
f0c28c7e30 fix hello-world documentation 2020-07-07 10:05:02 +00:00
Niko Matsakis
b00981935a fix doc tests 2020-07-07 09:59:57 +00:00
Niko Matsakis
da7c8b30db fix mdbook tests 2020-07-07 09:55:04 +00:00
Niko Matsakis
fd036a4f15 do not generate in_db_mut when it is inappropriate 2020-07-06 21:48:14 +00:00
Niko Matsakis
d2e9f64bda add shims for input queries 2020-07-06 21:48:07 +00:00
Niko Matsakis
9596c25b77 move the shims into private, hidden functions 2020-07-06 21:06:36 +00:00
Aleksey Kladov
a5626cd8a0 Force codegen in the query-defning crate 2020-07-06 21:04:07 +00:00
Aleksey Kladov
0442f628cd release v0.14.4
Significantly amount of memory used to store dependency information
2020-07-06 11:31:42 +02:00
Niko Matsakis
b66eb81311 experiment: extract some Memo code to be independent from Q
This should enable more sharing and less monomorphization. There is
probably room for more radical restructing in this vein.
2020-07-06 00:55:01 +00:00
Niko Matsakis
f7071dd137 RFC: remove RFC text about DependencySlot
It's simpler to just store a DatabaseKeyIndex. It may be somewhat
slower, we'll have to measure.  But we can add back in this other
design later if we want.
2020-07-05 20:13:29 +00:00
Niko Matsakis
8ca3ab56b5 update the mdbook documentation, introducing a diagram 2020-07-05 16:45:07 +00:00
Niko Matsakis
0a8c2038b5 RFC: remove link, linkcheck doesn't like it 2020-07-05 10:52:49 +00:00
Niko Matsakis
b1e3003c1e RFC: describe new bounds 2020-07-05 10:52:47 +00:00
Niko Matsakis
0b82d24514 RFC: describe 'static requirement 2020-07-05 10:52:43 +00:00
Niko Matsakis
b59dcc9145 RFC: describe in_db functions 2020-07-05 10:34:15 +00:00
Niko Matsakis
fad97eeb6a remove the DB parameter
This had two unexpected consequences, one unfortunate, one "medium":

* All `salsa::Database` must be `'static`. This falls out from
`Q::DynDb` not having access to any lifetimes, but also the defaulting
rules for `dyn QueryGroup` that make it `dyn QueryGroup + 'static`. We
don't really support generic databases anyway yet so this isn't a big
deal, and we can add workarounds later (ideally via GATs).

* It is now statically impossible to invoke `snapshot` from a query,
and so we don't need to test that it panics. This is because the
signature of `snapshot` returns a `Snapshot<Self>` and that is not
accessible to a `dyn QueryGroup` type. Similarly, invoking
`Runtime::snapshot` directly is not possible becaues it is
crate-private. So I removed the test. This seems ok, but eventually I
would like to expose ways for queries to do parallel
execution (matklad and I had talked about a "speculation" primitive
for enabling that).

* This commit is 99% boilerplate I did with search-and-replace. I also
rolled in a few other changes I might have preferred to factor out,
most notably removing the `GetQueryTable` plumbing trait in favor of
free-methods, but it was awkward to factor them out and get all the
generics right (so much simpler in this version).
2020-07-04 14:17:11 +00:00
Niko Matsakis
d64dfa1727 make for_each_query dyn-safe 2020-07-04 14:17:11 +00:00