trustfall-v0.6.0
版本发布时间: 2023-07-26 03:46:20
obi1kenobi/trustfall最新发布版本:trustfall-v0.7.1(2023-11-18 05:35:14)
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 https://github.com/obi1kenobi/trustfall/pull/330
- Add bin target for
trustfall_stubgen
and ensure deterministic stubs. by @obi1kenobi in https://github.com/obi1kenobi/trustfall/pull/331 - Add CODEOWNERS and repo settings file. by @obi1kenobi in https://github.com/obi1kenobi/trustfall/pull/332
- Fix repo settings file. by @obi1kenobi in https://github.com/obi1kenobi/trustfall/pull/333
- Improve docs and README for
trustfall_stubgen
. by @obi1kenobi in https://github.com/obi1kenobi/trustfall/pull/334 - Add GitHub Actions workflow for automatically bumping dependencies. by @obi1kenobi in https://github.com/obi1kenobi/trustfall/pull/335
- Rename
A-frontend
and addA-playground
label. by @obi1kenobi in https://github.com/obi1kenobi/trustfall/pull/336 - Improve docs for
SchemaAdapter
. by @obi1kenobi in https://github.com/obi1kenobi/trustfall/pull/337 - Minor docs fixes for formatting and consistency. by @obi1kenobi in https://github.com/obi1kenobi/trustfall/pull/338
- Fix dependency updater GitHub Action. by @obi1kenobi in https://github.com/obi1kenobi/trustfall/pull/340
- Allow
TryIntoStruct
to unpackEdgeParameters
as well. by @obi1kenobi in https://github.com/obi1kenobi/trustfall/pull/350 - Only declare module tree once in
trustfall_stubgen
. by @obi1kenobi in https://github.com/obi1kenobi/trustfall/pull/351 - Generate more edge-handling code in
trustfall_stubgen
. by @obi1kenobi in https://github.com/obi1kenobi/trustfall/pull/352 - Tweak stubgen so it doesn't generate linty code. by @obi1kenobi in https://github.com/obi1kenobi/trustfall/pull/353
- Remove unnecessary lint suppressions. by @obi1kenobi in https://github.com/obi1kenobi/trustfall/pull/355
- Trigger the CI workflow manually when auto-updating dependencies. by @obi1kenobi in https://github.com/obi1kenobi/trustfall/pull/358
- Add
actions: write
permission to auto-updater workflow. by @obi1kenobi in https://github.com/obi1kenobi/trustfall/pull/360 - Open dependency-updating PRs with a custom access token. by @obi1kenobi in https://github.com/obi1kenobi/trustfall/pull/361
- Weekly
cargo update
of primary dependencies by @obi1kenobi in https://github.com/obi1kenobi/trustfall/pull/362 - Auto-update the fuzzing dependencies via an Actions workflow. by @obi1kenobi in https://github.com/obi1kenobi/trustfall/pull/363
- Use the default GITHUB_TOKEN to auto-merge PRs. by @obi1kenobi in https://github.com/obi1kenobi/trustfall/pull/364
- Better names for the automated workflow's jobs. by @obi1kenobi in https://github.com/obi1kenobi/trustfall/pull/366
- Weekly
cargo update
of fuzzing dependencies by @obi1kenobi in https://github.com/obi1kenobi/trustfall/pull/365 - Bail out if no Cargo.lock changes are needed. by @obi1kenobi in https://github.com/obi1kenobi/trustfall/pull/367
- Print bail-out messages to stdout when updating dependencies. by @obi1kenobi in https://github.com/obi1kenobi/trustfall/pull/368
- Weekly
cargo update
of primary dependencies by @obi1kenobi in https://github.com/obi1kenobi/trustfall/pull/370 - Weekly
cargo update
of fuzzing dependencies by @obi1kenobi in https://github.com/obi1kenobi/trustfall/pull/369 - add InvalidSchemaError::DuplicateFieldDefinition by @u9g in https://github.com/obi1kenobi/trustfall/pull/373
- Implement InvalidSchemaError::DuplicateTypeOrInterfaceDefinition by @u9g in https://github.com/obi1kenobi/trustfall/pull/374
- Add optimization to VertexType entrypoint in schema adapter by @u9g in https://github.com/obi1kenobi/trustfall/pull/339
- Weekly
cargo update
of fuzzing dependencies by @obi1kenobi in https://github.com/obi1kenobi/trustfall/pull/376 - Weekly
cargo update
of primary dependencies by @obi1kenobi in https://github.com/obi1kenobi/trustfall/pull/377 - Update rustdoc playground schema. by @obi1kenobi in https://github.com/obi1kenobi/trustfall/pull/378
- Get rid of unnecessary clone in schema adapter by @u9g in https://github.com/obi1kenobi/trustfall/pull/379
- Update rustdoc adapter version in playground. by @obi1kenobi in https://github.com/obi1kenobi/trustfall/pull/380
- Add more example queries to rustdoc playground. by @obi1kenobi in https://github.com/obi1kenobi/trustfall/pull/381
- Weekly
cargo update
of fuzzing dependencies by @obi1kenobi in https://github.com/obi1kenobi/trustfall/pull/382 - Weekly
cargo update
of primary dependencies by @obi1kenobi in https://github.com/obi1kenobi/trustfall/pull/383 - Query both Rust and crates.io crates in rustdoc playground. by @obi1kenobi in https://github.com/obi1kenobi/trustfall/pull/386
- Fix new clippy lints. by @obi1kenobi in https://github.com/obi1kenobi/trustfall/pull/385
- Enable the
cli
feature intrustfall_stubgen
by default. by @obi1kenobi in https://github.com/obi1kenobi/trustfall/pull/388 - Check that adapters implement declared properties, edges, and coercions. by @obi1kenobi in https://github.com/obi1kenobi/trustfall/pull/384
- Generate invariant-enforcing tests in stubgen adapters. by @obi1kenobi in https://github.com/obi1kenobi/trustfall/pull/389
- Output
__typename
in "items with allowed lints" example rustdoc query. by @obi1kenobi in https://github.com/obi1kenobi/trustfall/pull/391 - Weekly
cargo update
of fuzzing dependencies by @obi1kenobi in https://github.com/obi1kenobi/trustfall/pull/395 - Weekly
cargo update
of primary dependencies by @obi1kenobi in https://github.com/obi1kenobi/trustfall/pull/394 - Allow querying for edge parameter default values. by @obi1kenobi in https://github.com/obi1kenobi/trustfall/pull/396
- Check adapter edge implementation for edges with default values. by @obi1kenobi in https://github.com/obi1kenobi/trustfall/pull/397
- Remove
ron
from dependencies and move to dev-dependencies. by @obi1kenobi in https://github.com/obi1kenobi/trustfall/pull/398 - Remove
chrono
from dependencies. Removes datetime value variant. by @obi1kenobi in https://github.com/obi1kenobi/trustfall/pull/399 - Include vertex
Debug
output in helper panic message. by @obi1kenobi in https://github.com/obi1kenobi/trustfall/pull/401 - Make
FieldValue
cheaper to clone byArc
-ing internally. by @obi1kenobi in https://github.com/obi1kenobi/trustfall/pull/400 - Replace various uses of
vec!
with arrays by @nvzqz in https://github.com/obi1kenobi/trustfall/pull/402 - Make
test_field_value_into
nicer to work with by @nvzqz in https://github.com/obi1kenobi/trustfall/pull/403 - Format with max small heuristics by @nvzqz in https://github.com/obi1kenobi/trustfall/pull/404
- Release Trustfall v0.6 and associated crates. by @obi1kenobi in https://github.com/obi1kenobi/trustfall/pull/405
Full Changelog: https://github.com/obi1kenobi/trustfall/compare/trustfall-v0.5.1...trustfall-v0.6.0