Repository navigation
Conversation
f9f223c added `rbs_types_function_forwarding_param_t` and the `forwarding` field on `rbs_types_function_t` to the C AST, but the Rust crates were not updated, so `ruby-rbs` failed to build from clean (E0425 for the missing binding, E0004 for the unhandled `Node::FunctionForwardingParam`). The breakage stayed hidden because `ruby-rbs-sys` was not rebuilt after C header changes. * Allow-list the forwarding param type and the parser options API in `ruby-rbs-sys`. * Add `ast::ForwardingParam` and `FunctionType::forwarding`, converted from the new node. * Add a crate-private `ParseOptions` / `parse_with_options` so the conversion can be tested; `(...)` is rejected by default. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Collaborator
Author
|
Closing: this was based on a wrong premise. CI vendors the C sources from the pinned tag in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
f9f223c ("Support forwarding parameters in method types") added
rbs_types_function_forwarding_param_tandrbs_types_function_t.forwardingto the C AST, but the Rust crates were not updated. From a clean build,ruby-rbsfails:rbs_types_function_forwarding_param_tnot found (missing from the bindgen allowlist)Node::FunctionForwardingParamis not handled inconvert.rsThis stayed hidden because
ruby-rbs-syswas not rebuilt after C header changes (see #3198).Changes
ruby-rbs-sys: allowlistrbs_types_function_forwarding_param_t,rbs_parser_new_with_optionsandrbs_parser_options_t.ruby-rbs: addast::ForwardingParam(location only, likeRBS::Types::Function::ForwardingParam) andFunctionType::forwarding, converted from the new node.ParseOptions/parse_with_options. The parser rejects(...)unlessenable_forwarding_paramsis set, so the conversion could not be tested throughparse. It ispub(crate)on purpose; whether to expose it publicly is left for a separate decision.Verification
LC_ALL=en_US.UTF-8, inrust/:cargo build,cargo test,cargo clippy --all-targets,cargo fmt --checkall pass.converts_forwarding_paramchecksdef bar: (Integer, ...) -> voidyieldsforwardingwith a location spanning..., and that(String) -> voidyieldsNone. Before the change, the same source fails with "forwarding parameter syntax is not enabled".🤖 Generated with Claude Code