8000 Sorbet support · Issue #1139 · kaminari/kaminari · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Sorbet support #1139
Open
Open
@rzane

Description

@rzane

I apologize for putting a feature request in an issue, but I'm not sure where else I'd propose this. Would you be interested in making Kaminari work seamlessly with Sorbet?

Currently, Sorbet users use a tool called Tapioca to generate static type definitions for Ruby gems. Tapioca also provides "compilers" that are able to introspect applications at runtime in order to generate type definitions from metaprogramming DSLs.

Due to the way that Kaminari dynamically defines the .page scope, Tapioca doesn't automatically discover this scope. Also, even if Tapioca did automatically discover the .page scope, the types would be slightly wrong due to the use of .extending.

I wrote a custom DSL compiler that resolves this issue. The Tapioca maintainers would like to see the Ruby community maintain RBI definitions and Tapioca compilers alongside the actual gems. Would you be willing to accept a pull request to ship a Tapioca compiler alongside Kaminari?

Docs are here: https://github.com/Shopify/tapioca?tab=readme-ov-file#writing-custom-dsl-compilers

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0