trustfall-v0.6.0
What's Changed
- Breaking: the
FieldValue::DateTime
variant has been removed since it used the unmaintainedchrono
library (#399) - Breaking:
FieldValue::String
andFieldValue::List
now useArc
internally, makingFieldValue
cheap to clone (#400) - Feature: Automatic checker for ensuring
Adapter
implementations implement their schema and uphold invariants (#384) - Feature:
TryIntoStruct
can now also unpackEdgeParameters
(#343) - Feature: when querying schemas using
SchemaAdapter
, it's now possible to query edge parameters' default values (#396)
Feature Highlight: Automatic tests for Adapter
implementations (#384)
The new check_adapter_invariants()
function is a self-contained adapter tester that can ensure you didn't forget to implement any components of your adapter's schema. Using it is as simple as:
pub use trustfall::provider::check_adapter_invariants;
#[test]
fn ensure_adapter_satisfies_invariants() {
let adapter = todo!("get an `impl Adapter` type");
let schema = todo!("get a `&Schema` for our adapter");
check_adapter_invariants(schema, adapter);
}
In addition to catching incomplete schema implementation errors, it also catches violations of other Trustfall adapter invariants, such as context reordering or accidentally dropped data.
For more information, check out its docs: https://github.com/obi1kenobi/trustfall/blob/trustfall-v0.6.0/trustfall_core/src/interpreter/helpers/correctness.rs#L15-L78
Upgrading from Trustfall v0.5.x
The breaking changes should be immaterial to almost all users. Most use cases should be able to upgrade to Trustfall v0.6 without any changes to their own code.
All Merged PRs
- Update stubgen dependency on trustfall. by @obi1kenobi in #330
- Add bin target for
trustfall_stubgen
and ensure deterministic stubs. by @obi1kenobi in #331 - Add CODEOWNERS and repo settings file. by @obi1kenobi in #332
- Fix repo settings file. by @obi1kenobi in #333
- Improve docs and README for
trustfall_stubgen
. by @obi1kenobi in #334 - Add GitHub Actions workflow for automatically bumping dependencies. by @obi1kenobi in #335
- Rename
A-frontend
and addA-playground
label. by @obi1kenobi in #336 - Improve docs for
SchemaAdapter
. by @obi1kenobi in #337 - Minor docs fixes for formatting and consistency. by @obi1kenobi in #338
- Fix dependency updater GitHub Action. by @obi1kenobi in #340
- Allow
TryIntoStruct
to unpackEdgeParameters
as well. by @obi1kenobi in #350 - Only declare module tree once in
trustfall_stubgen
. by @obi1kenobi in #351 - Generate more edge-handling code in
trustfall_stubgen
. by @obi1kenobi in #352 - Tweak stubgen so it doesn't generate linty code. by @obi1kenobi in #353
- Remove unnecessary lint suppressions. by @obi1kenobi in #355
- Trigger the CI workflow manually when auto-updating dependencies. by @obi1kenobi in #358
- Add
actions: write
permission to auto-updater workflow. by @obi1kenobi in #360 - Open dependency-updating PRs with a custom access token. by @obi1kenobi in #361
- Weekly
cargo update
of primary dependencies by @obi1kenobi in #362 - Auto-update the fuzzing dependencies via an Actions workflow. by @obi1kenobi in #363
- Use the default GITHUB_TOKEN to auto-merge PRs. by @obi1kenobi in #364
- Better names for the automated workflow's jobs. by @obi1kenobi in #366
- Weekly
cargo update
of fuzzing dependencies by @obi1kenobi in #365 - Bail out if no Cargo.lock changes are needed. by @obi1kenobi in #367
- Print bail-out messages to stdout when updating dependencies. by @obi1kenobi in #368
- Weekly
cargo update
of primary dependencies by @obi1kenobi in #370 - Weekly
cargo update
of fuzzing dependencies by @obi1kenobi in #369 - add InvalidSchemaError::DuplicateFieldDefinition by @u9g in #373
- Implement InvalidSchemaError::DuplicateTypeOrInterfaceDefinition by @u9g in #374
- Add optimization to VertexType entrypoint in schema adapter by @u9g in #339
- Weekly
cargo update
of fuzzing dependencies by @obi1kenobi in #376 - Weekly
cargo update
of primary dependencies by @obi1kenobi in #377 - Update rustdoc playground schema. by @obi1kenobi in #378
- Get rid of unnecessary clone in schema adapter by @u9g in #379
- Update rustdoc adapter version in playground. by @obi1kenobi in #380
- Add more example queries to rustdoc playground. by @obi1kenobi in #381
- Weekly
cargo update
of fuzzing dependencies by @obi1kenobi in #382 - Weekly
cargo update
of primary dependencies by @obi1kenobi in #383 - Query both Rust and crates.io crates in rustdoc playground. by @obi1kenobi in #386
- Fix new clippy lints. by @obi1kenobi in #385
- Enable the
cli
feature intrustfall_stubgen
by default. by @obi1kenobi in #388 - Check that adapters implement declared properties, edges, and coercions. by @obi1kenobi in #384
- Generate invariant-enforcing tests in stubgen adapters. by @obi1kenobi in #389
- Output
__typename
in "items with allowed lints" example rustdoc query. by @obi1kenobi in #391 - Weekly
cargo update
of fuzzing dependencies by @obi1kenobi in #395 - Weekly
cargo update
of primary dependencies by @obi1kenobi in #394 - Allow querying for edge parameter default values. by @obi1kenobi in #396
- Check adapter edge implementation for edges with default values. by @obi1kenobi in #397
- Remove
ron
from dependencies and move to dev-dependencies. by @obi1kenobi in #398 - Remove
chrono
from dependencies. Removes datetime value variant. by @obi1kenobi in #399 - Include vertex
Debug
output in helper panic message. by @obi1kenobi in #401 - Make
FieldValue
cheaper to clone byArc
-ing internally. by @obi1kenobi in #400 - Replace various uses of
vec!
with arrays by @nvzqz in #402 - Make
test_field_value_into
nicer to work with by @nvzqz in #403 - Format with max small heuristics by @nvzqz in #404
- Release Trustfall v0.6 and associated crates. by @obi1kenobi in #405
Full Changelog: trustfall-v0.5.1...trustfall-v0.6.0