You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: website/src/changelog.md
+22-15Lines changed: 22 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,19 +7,29 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
8
8
## [Unreleased]
9
9
10
-
All the breaking changes are very unlikely to actually break your code that was written against the `v2` version of `bon` unless you've been doing some crimes like using items marked as `#[doc(hidden)]` or using unconventional macro delimiters like `#[builder{}/[]]` instead of `#[builder()]`. See also the "Removed" section about removed/replaced deprecated APIs that you most likely never used.
10
+
All the breaking changes are very unlikely to actually break your code that was written against the `v2` version of `bon`. 99% of users should be able to update without any migration.
11
11
12
12
### Changed
13
13
14
-
- 🎉🎉 Stabilize the builder's typestate API allowing for [custom builder extensions](https://bon-rs.com/guide/builder-extensions). This is the **main theme** of this release. This new API brings the flexibility to a whole new level 🚀 🚀.
14
+
- 🎉🎉 Stabilize the builder's [typestate API](https://bon-rs.com/guide/typestate-api) allowing for custom builder extensions. This is the **main theme** of this release. This new API brings the flexibility to a whole new level 🚀 🚀 ([#145](https://github.com/elastio/bon/pull/145))
15
+
16
+
- Improve rustdoc output. See the rustoc examples and comparison in the [Alternatives](https://bon-rs.com/guide/alternatives#generated-docs-comparison) section ([#145](https://github.com/elastio/bon/pull/145))
17
+
18
+
- Add info that the member is required or optional.
19
+
20
+
- For members with default values show the default value in the docs.
21
+
22
+
- For optional members provide links to `{member}(T)` and `maybe_{member}(Option<T>)` setters.
23
+
24
+
- Remove `__` prefixes for generic types and lifetimes from internal symbols. Instead, the prefixes added only if the macro detects a name collision.
15
25
16
26
- ⚠️ **Breaking.** Reject unnecessary empty attributes e.g. `#[builder()]` or `#[builder]` with no parameters on a member ([#145](https://github.com/elastio/bon/pull/145))
17
27
18
28
- ⚠️ **Breaking.** Reject square brackets and curly braces delimiters for `builder_type`, `finish_fn`, `start_fn` and `on` attributes syntax. Only parentheses are accepted e.g. `#[builder(finish_fn(...))]` or `#[builder(on(...))]`. This no longer works: `#[builder(finish_fn[...])]` or `#[builder(on{...})]` ([#145](https://github.com/elastio/bon/pull/145))
19
29
20
30
- ⚠️ **Breaking.** Reject non-consecutive `on(...)` clauses. For example, the following now generates a compile error: `#[builder(on(String, into), finish_fn = build, on(Vec<_>, into))]`, because there is a `finish_fn = ...` between `on(...)` clauses. ([#155](https://github.com/elastio/bon/pull/155))
21
31
22
-
- ⚠️ **Breaking.**`#[builder(derive(Clone, Debug))]` now generates impl blocks that follow the behaviour of standard `Clone` and `Debug` derives in that it conservatively adds `Clone/Debug` trait bounds for all the generic types declared on the original item (struct or function). Previously no additional bounds were required on `Clone` and `Debug` impls. See the _Added_ section for details on the way to override these bounds with `#[builder(derive(Clone/Debug(bounds(...))))]`.
32
+
- ⚠️ **Breaking.**`#[builder(derive(Clone, Debug))]` now generates impl blocks that follow the behaviour of standard `Clone` and `Debug` derives in that it conservatively adds `Clone/Debug` trait bounds for all the generic types declared on the original item (struct or function). Previously no additional bounds were required on `Clone` and `Debug` impls. See the _Added_ section for details on the way to override these bounds with `#[builder(derive(Clone/Debug(bounds(...))))]` ([#145](https://github.com/elastio/bon/pull/145))
23
33
24
34
- ⚠️ **Breaking.** The name of the builder struct generated for methods named `builder` changed from `TBuilderBuilder` to just `TBuilder` making methods named `builder` work the same as methods named `new`. ([#145](https://github.com/elastio/bon/pull/145))
25
35
@@ -50,7 +60,7 @@ All the breaking changes are very unlikely to actually break your code that was
50
60
51
61
### Added
52
62
53
-
- ⚠️ **Breaking.**Buildermacrosnowgenerateadditional `modbuilder_name {}` where `builder_name` isthesnake_caseversionofthenameofthebuilderstruct.ThisnewmodulecontainsthetypestateAPIofthebuilder.Thereisalowprobabilitythatthisnewmodulenamemayconflictwithexistingsymbolsinyourscope, sothischangeismarkedasbreaking.
63
+
- ⚠️ **Breaking.**Buildermacrosnowgenerateadditional `modbuilder_name {}` where `builder_name` isthesnake_caseversionofthenameofthebuilderstruct.ThisnewmodulecontainsthetypestateAPIofthebuilder.Thereisalowprobabilitythatthisnewmodulenamemayconflictwithexistingsymbolsinyourscope, sothischangeismarkedasbreaking ([#145](https://github.com/elastio/bon/pull/145))
54
64
55
65
-Add [`#[builder(builder_type(vis ="...", doc { ... }))]`](https://bon-rs.com/reference/builder/top-level/builder_type) that allows overriding the visibility and docs of the builder struct ([#145](https://github.com/elastio/bon/pull/145))
56
66
@@ -74,16 +84,6 @@ All the breaking changes are very unlikely to actually break your code that was
74
84
75
85
-Add [`#[builder(derive(Clone/Debug(bounds(...))]`](https://bon-rs.com/reference/builder/top-level/derive#generic-types-handling) to allow overriding trait bounds on the `Clone/Debug` impl block of the builder ([#145](https://github.com/elastio/bon/pull/145))
-SplitAPIreferenceintomultiplepages.The [rootpage](https://bon-rs.com/reference/builder) now contains convenient table with short descriptions of all available configuration attributes ([#164](https://github.com/elastio/bon/pull/164))
0 commit comments