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.
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
- 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)
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.
- major refactoring to the database APIs for safer parallel
processing (#78, #82):
- To set an input, you now write `db.query_mut(Query).set(...)`,
and you must declare your database as `mut`.
- To fork a thread, you now write `db.snapshot()`, which acquires
a read-lock that is only released when the snapshot is dropped
(note that this read-lock blocks `set` from occuring on the main
thread).
- Therefore, there can only be one mutable handle to the
database; all other handles are snapshots. This eliminates a variety
of complex and error-prone usage patterns.
- introduced the `salsa_event` callback that can be used for logging
and introspection (#63)