Missing RBI declarations for APIs made by `gobject-introspection`
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 873
- Forks
- 164
- Avg merge
- 4d 27m
- Merged PRs (30d)
- 9
Description
TL;DR: tapioca dsl misses modules created for GObject interfaces, and maybe other types, too.
Cause
gobject-introspection is a gem brigding to GObject APIs.
For example, GObject interfaces get modelled via Ruby Modules, created here, and set via const_set here. Every such interface will have its const_source_location point to gobject-introspection/lib/gobject-introspection/loader.rb#L618.
When other gems (like gio2) import GObject interfaces, their const_source_location will always point to gobject-introspection/lib/gobject-introspection/loader.rb#L618. Since this location is outside the gem (and in gobject-introspection), Tapioca will skip those module, because it's not defined_in_gem?:
As a result, the generated gio2.rbi will be missing some interface declaration. It will still include lines that rely on them, leading to type errors.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in lib/tapioca/gem/pipeline.rb around lines 449-455 and reproduce RBI generation for the gio2 gem. Trace how const_source_location and defined_in_gem? cause GObject interface modules to be skipped; done means the generated gio2.rbi includes the missing interface declarations without producing type errors from its include lines.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100