Skip to content

Conversation

@ebarajas
Copy link
Contributor

Motivation

This PR updates the built-in Tapioca::Dsl::Compilers::ActiveRecordRelations compiler to add a narrowed type for the return value of #ids. Before this was simply set to Array, so each item in the array was resolving to T.untyped.

Implementation

I duplicated some existing work done for the #find method to determine the type of the primary key column.

Tests

I've updated the existing test to assert the RBI is generated as expected.

@ebarajas ebarajas requested a review from a team as a code owner May 12, 2025 20:05
@ebarajas
Copy link
Contributor Author

I have signed the CLA!

@ebarajas ebarajas requested a review from KaanOzkan June 25, 2025 16:27
Copy link
Contributor

@KaanOzkan KaanOzkan left a comment

Choose a reason for hiding this comment

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

I can't trigger CI from the GitHub UI, hooks might have ran into an issue. Can you rebase and push?

@KaanOzkan KaanOzkan added the enhancement New feature or request label Jun 25, 2025
@KaanOzkan KaanOzkan merged commit 913e9bc into Shopify:main Jul 3, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants