Skip to content
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

Fix app cache folder source gems #318

Merged
merged 1 commit into from May 17, 2021
Merged

Conversation

paracycle
Copy link
Member

@paracycle paracycle commented May 17, 2021

Motivation

When Bundler is configured to cache gems inside the vendor/cache folder in the app directory, for source gems, it creates git clones in that folder. Those gems are consumed from those git clones, so they look like they are part of the application code, as far as Tapioca is concerned.

Implementation

By adding an explicit check for the source files coming from Bundler.app_cache folder, we can make sure we treat those source locations are gem sources.

Tests

I am afraid we don't have a good way to test these yet. But, this was tested on a real Shopify app which was using vendor/cache folder as default. The current install of Tapioca ended up not generating any RBI files for source gems. We debugged it with @leoncustodio to this issue and confirmed that with this patch, we were able to make Tapioca produce RBI files for those gems as well.

When Bundler is configured to cache gems inside the `vendor/cache`
folder in the app directory, for source gems, it creates git clones in
that folder. Those gems are consumed from those git clones, so they
look like they are part of the application code, as far as Tapioca is
concerned.

By adding an explicit check for the source files coming from
`Bundler.app_cache` folder, we can make sure we treat those source
locations are gem sources.
@paracycle paracycle requested review from leoncustodio and a team May 17, 2021 12:40
@paracycle paracycle merged commit a3d21c2 into master May 17, 2021
@paracycle paracycle deleted the uk-fix-bundler-app-cache branch May 17, 2021 14:30
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.

None yet

3 participants