Skip to main content

confval v0.4.0

The confval and confval-derive crates now share a single version and are released together. From this release on, one version number and one set of release notes cover the whole workspace.

Highlights

Enforced Validate bound on specs

A compiler error will occur if a spec does not implement the Validate trait. The trigger for this is lowering.

The compilation error will be similar to this, where the trait is not implemented for the example LimitsSpec. It materializes as an unsatisfied trait bound on #[derive(confval::Config)]:

error[E0277]: the trait bound `spec::LimitsSpec: confval::pipeline::Validate` is not satisfied
--> crates/confval/examples/common/config.rs:21:10
|
21 | #[derive(confval::Config)]
| ^^^^^^^^^^^^^^^ unsatisfied trait bound
|
help: the trait `confval::pipeline::Validate` is not implemented for `spec::LimitsSpec`
--> crates/confval/examples/common/spec.rs:23:1

To resolve such errors, implement the trait for the spec.

Unified workspace versioning

confval and confval-derive are now versioned in lockstep through [workspace.package].

confval pins its derive crate with confval-derive = "=0.4.0", so a given confval always resolves the matching derive.

Changed

  • confval-derive moves from 0.1.1 to 0.4.0 to align with confval. This is a version-number change only. There is no change to the derive macro output or its public API.

Upgrading

Depend on confval as before. The derive feature continues to pull in the matching confval-derive automatically.

[dependencies]
confval = { version = "0.4", features = ["derive", "hcl", "color"] }