MyGit

trustfall-v0.6.0

obi1kenobi/trustfall

版本发布时间: 2023-07-26 03:46:20

obi1kenobi/trustfall最新发布版本:trustfall-v0.7.1(2023-11-18 05:35:14)

What's Changed

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

Full Changelog: https://github.com/obi1kenobi/trustfall/compare/trustfall-v0.5.1...trustfall-v0.6.0

相关地址:原始地址 下载(tar) 下载(zip)

查看:2023-07-26发行的版本