Skip to content

Add RBI <> RBS translation of class helpers and generics #733

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
May 20, 2025

Conversation

Morriar
Copy link
Collaborator

@Morriar Morriar commented May 14, 2025

This PR does a major rewrite of our current translator so we can also handle class annotations such as @abstract and generic signatures.

Sadly, to support generic translation we need to point to an unreleased version of RBS at the moment as we need RBS::Parser.parse_type_params.

I'd advise reviewing it commit by commit.

@Morriar Morriar self-assigned this May 14, 2025
@Morriar Morriar requested a review from a team as a code owner May 14, 2025 17:43
@Morriar Morriar added the feature New feature label May 14, 2025
@Morriar Morriar force-pushed the at-rbs-rewriter branch 3 times, most recently from 2d3c468 to 2faf81e Compare May 14, 2025 18:35
@Morriar Morriar force-pushed the at-rbs-rewriter branch from 2faf81e to 00bb5df Compare May 14, 2025 19:17
@vinistock
Copy link
Member

Would it be possible to split this PR and have the framework for rewriting be separate? It will be much quicker to ship that part in isolation.

@Morriar
Copy link
Collaborator Author

Morriar commented May 15, 2025

Would it be possible to split this PR and have the framework for rewriting be separate? It will be much quicker to ship that part in isolation.

Good point: #734

@Morriar Morriar force-pushed the at-rbs-rewriter branch from 00bb5df to 76757fb Compare May 15, 2025 16:10
@Morriar
Copy link
Collaborator Author

Morriar commented May 15, 2025

Rebased on top of #734.

@Morriar Morriar changed the base branch from main to at-rbs-rewriter-base May 15, 2025 16:10
@Morriar Morriar requested review from st0012 and vinistock May 15, 2025 16:10
@Morriar Morriar force-pushed the at-rbs-rewriter-base branch from 7d19cd5 to 287d56d Compare May 15, 2025 16:16
@Morriar Morriar force-pushed the at-rbs-rewriter branch from 76757fb to 267b319 Compare May 15, 2025 16:19
@Morriar Morriar force-pushed the at-rbs-rewriter-base branch from 287d56d to 94d57fb Compare May 15, 2025 20:17
Base automatically changed from at-rbs-rewriter-base to main May 16, 2025 13:58
@Morriar Morriar force-pushed the at-rbs-rewriter branch from 267b319 to 373ca8b Compare May 16, 2025 13:59
@st0012 st0012 force-pushed the at-rbs-rewriter branch from c06ef0e to 07b5688 Compare May 20, 2025 13:46
@@ -213,6 +213,7 @@ def test_display_errors_with_limit_and_code_but_no_count

def test_display_errors_from_path
@project = new_project
@project.bundle_install!
Copy link
Member

Choose a reason for hiding this comment

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

When pointing rbs to GH sources, I found that the these test projects weren't installing bundles correctly.

Morriar added 4 commits May 20, 2025 11:59
Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
@Morriar Morriar force-pushed the at-rbs-rewriter branch from 07b5688 to bec8918 Compare May 20, 2025 16:17
Morriar added 4 commits May 20, 2025 12:39
Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
@Morriar Morriar force-pushed the at-rbs-rewriter branch from bec8918 to e4a2068 Compare May 20, 2025 16:39
@Morriar Morriar merged commit 381009c into main May 20, 2025
8 checks passed
@Morriar Morriar deleted the at-rbs-rewriter branch May 20, 2025 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants