Skip to content

Ruby: Reform RBS signatures of lex_file and parse_file - #2233

Open
elizamarcum wants to merge 4 commits into
marcoroth:mainfrom
elizamarcum:main
Open

Ruby: Reform RBS signatures of lex_file and parse_file#2233
elizamarcum wants to merge 4 commits into
marcoroth:mainfrom
elizamarcum:main

Conversation

@elizamarcum

Copy link
Copy Markdown

@github-actions github-actions Bot added ruby Ruby source for the gem and its libraries rubygem The herb RubyGem and its packaging labels Aug 14, 2026
@marcoroth marcoroth changed the title Reform rbs signatures lex file parse file Ruby: Reform RBS signatures of lex_file and parse_file Aug 15, 2026
@marcoroth marcoroth added the rbs RBS type signatures in sig/ label Aug 15, 2026

@marcoroth marcoroth left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thank you so much @elizamarcum, this is exactly the right approach in my option. A few things:

  1. I think we also need to match the signatures for parse and lex in sig/herb_c_extension.rbs (or maybe it already perfectly matches?).
  2. In order to get the RBS signarures in sig/* re-generated you need to run bundle exec rake rbs_inline, so that it looks at all the RBS inline comments in the Ruby files and writes the matching *.rbs file for it.
  3. Great catch about the Brewfile changes, I guess I never caught these, since I somehow already had a matching Python+Ruby version installed already, feel free to keep the changes in here. 馃檶馃徏

Thank you so much for the contribution! 馃檹馃徏

@elizamarcum
elizamarcum force-pushed the main branch 2 times, most recently from 104698e to fe33bed Compare August 26, 2026 17:08
Comment thread sig/herb.rbs Outdated
Comment thread lib/herb.rb
Comment thread lib/herb.rb Outdated
@elizamarcum
elizamarcum force-pushed the main branch 2 times, most recently from 9cd0b33 to 890e8af Compare August 27, 2026 18:54
Comment thread lib/herb.rb Outdated
elizamarcum and others added 3 commits August 27, 2026 15:09
Alternative approach based on PR review notes on marcoroth#1990
Co-authored-by: Marco Roth <marco.roth@intergga.ch>
Signed-off-by: Eliza Brock Marcum <eliza@elizamarcum.com>
@marcoroth

Copy link
Copy Markdown
Owner

@elizamarcum we need one more bundle exec rake rbs_inline and then we are good to merge this. Sorry for the long back and forth 馃檲

Co-authored-by: Marco Roth <marco.roth@intergga.ch>
Signed-off-by: Eliza Brock Marcum <eliza@elizamarcum.com>
@elizamarcum

Copy link
Copy Markdown
Author

@marcoroth I think we've got it this time! 馃檲馃

@marcoroth marcoroth left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thank you so much @elizamarcum! 馃檹馃徏

@marcoroth
marcoroth enabled auto-merge (squash) August 27, 2026 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rbs RBS type signatures in sig/ ruby Ruby source for the gem and its libraries rubygem The herb RubyGem and its packaging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RBS: Error using tapioca gem on herb because of malformed RBS on lex_file and parse_file

2 participants