Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bpaf"
version = "0.9.25"
version = "0.9.26"
edition = "2021"
categories = ["command-line-interface"]
description = "A simple Command Line Argument Parser with parser combinators"
Expand All @@ -21,7 +21,7 @@ include = [


[dependencies]
bpaf_derive = { path = "./bpaf_derive", version = "=0.5.23", optional = true }
bpaf_derive = { path = "./bpaf_derive", version = "=0.5.26", optional = true }
owo-colors = { version = ">=3.5, <5.0", default-features = false, optional = true }
supports-color = { version = ">=2.0.0, <4.0", optional = true }

Expand Down
3 changes: 3 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Change Log

## bpaf [0.9.26], bpaf_derive [0.5.26] - 2026-05-13
- Support struct level doc comments along with `adjacent` (#453)

## bpaf [0.9.25] - 2026-04-15
- Change rendering of an adjacent block in Markdown - this is no longer a `###`
but a regular line item instead. Header messes up with generated navigation on
Expand Down
2 changes: 1 addition & 1 deletion bpaf_derive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bpaf_derive"
version = "0.5.23"
version = "0.5.26"
edition = "2018"
categories = ["command-line-interface"]
description = "Derive macros for bpaf Command Line Argument Parser"
Expand Down
2 changes: 1 addition & 1 deletion bpaf_derive/src/top.rs
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,8 @@ impl ToTokens for Top {
#[allow(unused_imports)]
use ::bpaf::Parser;
#body
#group_help
#adjacent
#group_help
#(.#attrs)*
#boxed
}
Expand Down
29 changes: 29 additions & 0 deletions bpaf_derive/src/top_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1112,6 +1112,35 @@ fn adjacent_for_struct() {
assert_eq!(top.to_token_stream().to_string(), expected.to_string());
}

#[test]
fn adjacent_with_group_help() {
let top: Top = parse_quote! {
#[bpaf(adjacent)]
/// help text
struct Opts {
a: String,
b: String,
}
};

let expected = quote! {
#[doc(hidden)]
fn opts() -> impl ::bpaf::Parser<Opts> {
#[allow(unused_imports)]
use ::bpaf::Parser;
{
let a = ::bpaf::short('a').argument::<String>("ARG");
let b = ::bpaf::short('b').argument::<String>("ARG");
::bpaf::construct!(Opts { a, b, })
}
.adjacent()
.group_help("help text")
}
};

assert_eq!(top.to_token_stream().to_string(), expected.to_string());
}

#[test]
fn box_for_struct() {
let top: Top = parse_quote! {
Expand Down
Loading