Skip to content

Releases: elastio/bon

v2.3.0

14 Sep 13:38
469e232
Compare
Choose a tag to compare

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

Added

  • Add support for positional params in start_fn and finish_fn (#125)

Fixed

  • Forward lint suppression from #[allow()/expect()] attributes written by the user on the top-level to the generated items (#125)
  • Suppress the false-positive (clippy issue) clippy::future_not_send lint (#125)
  • Fix the cases where #[builder(derive(Debug, Clone))] didn't validate for all members to implement Clone/Debug if these members were of reference or generic types (#125)

v2.2.1

09 Sep 23:18
3bf514a
Compare
Choose a tag to compare

Changed

  • Lower MSRV from 1.70.0 to 1.59.0 (#120)

v2.2.0

08 Sep 15:22
32ebacc
Compare
Choose a tag to compare

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)

v2.1.1

03 Sep 12:45
1aa666f
Compare
Choose a tag to compare

Added

  • Set MSRV to 1.70.0. Note that we plan to set an even lower MSRV. This is just an initial attempt to define the MSRV that should be good enough in the meantime while we work on lowering it even more (#101)

Fixed

  • Fix lints triggered by generated code such as private_bounds, clippy::missing_const_for_fn (#101)
  • Add more context to the messages such that it's clear what member isn't set in Rust Analyzer error messages (#98)

v2.1.0

01 Sep 12:25
dfd788e
Compare
Choose a tag to compare

See the blog post for this release that describes some of the most notable changes in detail. This post is available on the platform of your choice:

Added

  • #[must_use] on the build() method for structs and call() for functions (if the original function has #[must_use]) (#82). Thanks @EdJoPaTo for the contribution!

Changed

  • Optimize bon's generated code type-checking performance and improve error messages (#84)
  • Improve builder() method docs (#76). Thanks @EdJoPaTo for the contribution!

Fixed

  • Don't warn on clippy::impl_trait_in_params (#80). Thanks @EdJoPaTo for the contribution!
  • Fix typos in messages and code comments (#79). Thanks @EdJoPaTo for the contribution!

Other

  • Add more tests for #[must_use] (#87)

v2.0.1

28 Aug 22:26
c9f66a8
Compare
Choose a tag to compare

Docs

  • Add a new section "None literals inference" to docs for "Into Conversions In-Depth"
  • Fix the docs about the comparison of Into conversions on the "Alternatives" page that were not updated during the v2 release

Fix

  • Fix capturing of generic params that appear only in return types (#72)
  • Fix support for associated types (#72)

Internal

  • Add more tests for various edge cases (#70)

v2.0.0

26 Aug 17:53
c136273
Compare
Choose a tag to compare

See the blog post for details.

v1.2.1

12 Aug 16:05
d787606
Compare
Choose a tag to compare

Other

  • Remove unnecessary const block (#52)
  • Small cleanup (#51)

v1.2.0

09 Aug 21:13
f35bcba
Compare
Choose a tag to compare

Added

  • Add #[builder(skip)] attribute to skip generating setters (#44)
  • Add automatic docs for setters (#45)

Other

  • Remove dependencies on easy-ext, heck and itertools (#42)

v1.1.0

07 Aug 21:06
068b3d4
Compare
Choose a tag to compare

Added

  • Add no_std support (#36). Thanks @danielschemmel for the contribution!
  • Add asm comparison and benchmarks to docs (#29)
  • Add map!{} and set![] macros (#33). Thanks @korrat for the contribution!

Fixed

  • Fix missing_docs lint in the generated code (#39)