Skip to content

Commit 093110e

Browse files
ksssclaude
andcommitted
Use regex allowlist so pinned vendor and master both build
The previous `allowlist_type("rbs_ast_ruby_annotations_t")` relied on bindgen's transitive allowlisting through the union. That works against the current master (where the union lists all 14 annotation members after auto-generation), but CI vendors the pinned v4.0.2 tag via `rake rust:rbs:sync`, whose union only has 6 members. The other 7 annotation structs referenced by ruby-rbs therefore never appeared in bindings.rs, breaking `cargo test`. Switch to the regex `rbs_ast_ruby_annotations_.*` which matches every annotation struct directly (and still includes the union itself) in both the pinned vendor and the current master, preserving the auto-follow property intended by this PR. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 1207c7b commit 093110e

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

rust/ruby-rbs-sys/build.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,10 @@ fn generate_bindings(include_path: &Path) -> Result<bindgen::Bindings, Box<dyn E
103103
.allowlist_type("rbs_ast_members_prepend_t")
104104
.allowlist_type("rbs_ast_members_private_t")
105105
.allowlist_type("rbs_ast_members_public_t")
106-
// The union pulls in every `rbs_ast_ruby_annotations_*_t` member transitively,
107-
// so individual annotation structs do not need separate allowlist entries.
108-
.allowlist_type("rbs_ast_ruby_annotations_t")
106+
// Match every `rbs_ast_ruby_annotations_*` struct (and the union itself)
107+
// so newly added annotation kinds do not require edits here. This keeps the
108+
// Rust bindings in sync with `config.yml` automatically.
109+
.allowlist_type("rbs_ast_ruby_annotations_.*")
109110
.allowlist_type("rbs_ast_string_t")
110111
.allowlist_type("rbs_ast_symbol_t")
111112
.allowlist_type("rbs_ast_type_param_t")

0 commit comments

Comments
 (0)