Skip to content

Conversation

@alex-tan
Copy link
Contributor

Motivation

Addresses #343

We have some vendored gems in vendor/gems. Note that this is not our BUNDLE_PATH. We just point to some gems by using the path: option in the Gemfile. Without this change tapioca doesn't compile rbis for these gems.

Implementation

There was an ignore condition that ignored any gems in the app dir. This removes it.

Tests

Added

@alex-tan alex-tan requested a review from a team as a code owner January 16, 2026 21:31
Copy link
Member

@paracycle paracycle left a comment

Choose a reason for hiding this comment

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

I am not sure what the best path forward for your use-case would be, but I am happy to discuss alternatives. It will definitely not be the current solution.


#: (String gemfile_dir) -> bool
def ignore?(gemfile_dir)
gem_ignored? || gem_in_app_dir?(gemfile_dir, full_gem_path)
Copy link
Member

@paracycle paracycle Jan 16, 2026

Choose a reason for hiding this comment

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

I am afraid this won't be enough since the condition exists for a specific reason: In our core monolith at Shopify we have what we call "in-repo gems" which are gems that exist inside folders under the app path. Since they are under the app path, they already get type-checked by Sorbet, so we should not be generating extra RBI files for them as well. For all practical purposes, the code in those paths in our Core monolith is a part of the monolith even though it gets loaded as a gem.

Your case is similar but somewhat different. You load some actual gems from the vendor folder inside your app path, so you want to generate RBIs for them, but removing this condition will break our use-case.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah I see. I tried adding typechecking to these gems and was able to work through the issues. Thanks 👍

@alex-tan alex-tan closed this Jan 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants