Skip to content

v2.2.0

Compare
Choose a tag to compare
@github-actions github-actions released this 08 Sep 15:22
· 55 commits to master since this release
32ebacc

See the blog post for this release that describes some of the most notable changes in detail.

Changed

  • The #[bon::builder] attribute was deprecated on structs. The new #[derive(bon::Builder)] should be used to derive a builder from a struct. Starting with bon 2.3 (next minor release) all usages of #[bon::builder] on structs will generate deprecation warnings. (#99).

    There is a CLI to assist in migrating to the new syntax. See the release blog post for details about that.

Added

  • Add the top-level #[builder(derive(...))] attribute to be able to derive Clone and Debug for the builder type itself (#113)

  • Add support for conditional compilation with cfg/cfg_attr (#99)

Fixed

  • Fix developer experience in Rust Rover. The new #[derive(Builder)] syntax should now be easier for Rust Rover to analyze (#99)
  • Fix a bug where a member of opaque Option type (i.e. the Option type that was renamed to make the builder macro not detect it as Option) was still optional. (#99)
  • Fix code generation for structs with default values for generic parameters (#108)