Commit graph

39 commits

Author SHA1 Message Date
Niko Matsakis
b73cf109d7 update hello-world with the desired naming convention 2019-01-25 10:47:01 -05:00
Niko Matsakis
9b5c7eeb5e change #[salsa::query_group] attribute to take a struct name 2019-01-25 10:26:39 -05:00
Niko Matsakis
a468292984 generate set_X and set_constant_X methods for each input
Convert some of the tests to use them
2019-01-25 05:18:26 -05:00
Niko Matsakis
f4c3aae081 update docs 2019-01-25 04:50:13 -05:00
Niko Matsakis
a8d9fb2d6b adopt salsa::database attribute macro 2019-01-24 19:02:56 -05:00
Niko Matsakis
c0978fede8 remove the need to list individual queries in database_storage 2019-01-24 05:35:57 -05:00
Cormac Relf
3b15a09b8e replace $crate with salsa in proc macro and make hello_world run 2019-01-21 10:59:12 -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
4a8b9123e6 update hello-world 2018-11-01 05:59:33 -04: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
df320c71dd
Merge pull request #58 from kleimkuhler/issue-56-remove-eq-bound
[WIP] Removal of Eq bound on `Q::Val`
2018-10-19 05:20:44 -04:00
Niko Matsakis
b046894de9 update readme 2018-10-18 21:30:55 -04:00
Kevin Leimkuhler
7b20806417 Initial removal of Eq bound on Q::Val 2018-10-18 15:29:15 -07:00
Aleksey Kladov
f14d846146 Re-export runtime
cc #17
2018-10-07 14:08:22 +03:00
Niko Matsakis
1428adda47 update readme docs 2018-10-05 11:03:51 -04:00
Niko Matsakis
8366b3a38b rename query_prototype to query_group 2018-10-05 10:35:50 -04:00
Niko Matsakis
55ec1f51d3 switch to use fn 2018-10-05 10:30:17 -04:00
Niko Matsakis
1b98ecb7a8 change to db.query(Query).set(key, value) 2018-10-05 06:58:51 -04:00
Niko Matsakis
0ee6f3884d make query_prototype also define queries, remove query_definition 2018-10-05 05:55:35 -04:00
Niko Matsakis
cd5622c6de make query method get by default
Use `Query.set(db, key, value)` to set. Not sure about this.
2018-10-05 05:28:51 -04:00
Niko Matsakis
a4fb4b7b13 rename query context to database 2018-10-05 04:54:51 -04:00
Niko Matsakis
0a2a871d98 improve docs 2018-10-02 05:50:38 -04:00
Niko Matsakis
2ddc8032ee make query_prototype take trait, rename hello_world to compiler 2018-10-01 20:42:41 -04:00
Niko Matsakis
968149dc34 rename from of to get and use read in tests 2018-09-30 10:59:08 -04:00
Niko Matsakis
72a5b50368 update comments and remove storage 2018-09-29 06:44:08 -04:00
Niko Matsakis
d7b1d194de remove the pub use for runtime to keep the "main namespace" clean
Not sure which is better.
2018-09-29 06:20:12 -04:00
Niko Matsakis
f8bf23bfb5 document the implementation module 2018-09-29 06:10:06 -04:00
Niko Matsakis
d6821d1097 allow user to define link to storage/runtime entirely
This seems like a more consistent abstraction.
2018-09-29 05:52:14 -04:00
Niko Matsakis
5bee46108d remove the need to manually specify the QueryDescriptor
The macro can handle it now.
2018-09-29 05:44:34 -04:00
Niko Matsakis
2e40e9d1e5 rename BaseQueryContext to just QueryContext
And use it like `salsa::QueryContext` elsewhere.
2018-09-29 05:34:29 -04:00
Niko Matsakis
288fe5b25f add a "runtime" and use that from query context impls 2018-09-29 05:31:26 -04:00
Niko Matsakis
7dcbaf4f2f add test for transparent queries 2018-09-29 04:50:08 -04:00
Niko Matsakis
1b873281a1 permit multiple queries in query_prototype 2018-09-29 04:34:19 -04:00
Niko Matsakis
8184723357 more comments 2018-09-28 17:39:21 -04:00
Niko Matsakis
16563b3666 some more comments 2018-09-28 15:50:34 -04:00
Niko Matsakis
9b4267f7c1 add a boilerplate reducing macro 2018-09-28 14:26:46 -04:00
Niko Matsakis
086005dc52 convert the example into a test 2018-09-28 13:54:40 -04:00
Niko Matsakis
3646890b38 make the example build 2018-09-28 11:40:43 -04:00
Niko Matsakis
798a8a418c add an example and get it building 2018-09-28 11:26:53 -04:00