Proposal: Extend `ruby-rbs` crate features
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 25/100
Rechercherichtung
Beginne mit der Durchsicht des vorhandenen ruby-rbs-Crates und der entsprechenden höheren Schichten im rbs gem. Der Vorschlag umfasst TypeName/Namespace, EnvironmentLoader, Environment und DefinitionBuilder. Bestimme daher zunächst, welche Schicht und welchen Umfang das Projekt akzeptieren wird. Erledigt wäre die Aufgabe erst mit einer abgestimmten Rust-Schnittstelle und einem Implementierungsplan, nicht mit einer einzelnen isolierten Änderung.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Motivation
The ruby-rbs crate currently provides only the parser layer (AST + Visit trait).
The rbs gem, in contrast, ships several higher-level layers on top of the parser — environment construction, name resolution, and definition (ancestor / method) resolution.
Until those layers exist on the Rust side, downstream tooling (type checkers, LSP servers, code generators) cannot be built using ruby-rbs alone. This issue proposes to gradually port those upper layers into the crate.
Features I want
I'm building a static type checker in Rust for my own gem.
Currently, RBS type definitions are loaded on the Ruby side and the result is then handed over to Rust for analysis.
I'd like to move the loading step into Rust as well, so the whole pipeline can be driven through a Rust interface — which requires the following layers in ruby-rbs:
TypeName/Namespace— structured type names like::Foo::Bar; prerequisite for every layer belowEnvironmentLoader— discovering.rbsfiles from gem paths / libdirs, equivalent torbsgem's loaderEnvironment— merging declarations from multiple files (class reopens, module aliases) and exposing a lookup APIDefinitionBuilder— resolving inherited methods via MRO so callers can ask "what methods doesFoo::Barexpose?" without re-implementing ancestor traversal in every consumer
Of course, things won’t always go as planned.
Willingness to contribute
If the RBS core team is planning to expand ruby-rbs with these upper layers, I'd love to contribute actively — not just file this as a wishlist.
- Vorherrschende Sprache
- Ruby
- Sterne
- 2.2k
- Forks
- 263
- Ø Merge
- 1 T. 20 Std.
- Gemergte PRs (30 T.)
- 64
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus ruby/rbs
-
InlineParser: `@rbs @ivar` annotation is reported as unused unless it is the first thing in the class bodyEvtl. vergeben @ksss hat das vor 50 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 15/100
Maintainer antworten meist innerhalb von 1 Tag
Ähnliche Issues
-
Update axe-core to v4.14.1Evtl. vergeben @axe-core hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
dequelabs/axe-core-gems#539 ·
-
Pro request form loses all text when the subject is too longEvtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offenbug f:request-creation professional
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 64/100
mysociety/alaveteli#9733 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
needs verification
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 64/100
Maintainer antworten meist innerhalb von 13 Tagen
-
🐛 bug 👩💻 équipe CE 🧑🏭 entreprises
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
betagouv/conseillers-entreprises#4808 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100