Skip to content

Print currently compiling gems. Add verbose attribute to gem command. - #2395

Merged
KaanOzkan merged 1 commit into
Shopify:mainfrom
cub8:output-currently-compiling-gems
Sep 29, 2025
Merged

KaanOzkan merged 1 commit into
Shopify:mainfrom
cub8:output-currently-compiling-gems

Conversation

@cub8

@cub8 cub8 commented Sep 29, 2025

Copy link
Copy Markdown
Contributor

Motivation

Recently in one project I was working on I encountered the following problem when initializing tapioca:

  • while compiling gems, the process just halted at some point - I guess it encountered some issues with compiling specific gems
  • I had problems with pinpointing exactly WHICH gems Tapioca had problem with - because the pipeline outputs only compiled gems, not ongoing compilations
  • This made debugging very hard - finding those problematic gems required me to put debuggers inside library and I don't think that's how it's supposed to work
  • Also, it baffled me that --verbose flag didn't change anything in output when running bundle exec tapioca init or bundle exec tapioca gems - I thought it's gonna tell me what's happening in the background or what gems are currently compiled but it looks like this parameter isn't passed to gems command at all
  • Eventually, I found those gems that halted tapioca gems compilation process and just excluded them from compilation

Implementation

  • I've added @verbose attribute to AbstractGem class which is passed there from cli options
  • When @verbose is true, it outputs Currently compiling <gem_name> before compiling gem
  • This make it easier to find in the pipeline output which gems are being compiled, but which weren't compiled

Tests

  • Two tests for running bundle exec tapioca gems --verbose and bundle exec tapioca gems -V

Example

image

@cub8
cub8 requested a review from a team as a code owner September 29, 2025 08:30
@cub8

cub8 commented Sep 29, 2025

Copy link
Copy Markdown
Contributor Author

I have signed the CLA!

@KaanOzkan KaanOzkan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks. I think it makes sense to have.

@KaanOzkan KaanOzkan added the enhancement New feature or request label Sep 29, 2025
@KaanOzkan
KaanOzkan merged commit 6bf27f3 into Shopify:main Sep 29, 2025
18 of 20 checks passed

This branch was previously deployed

1 inactive deployment
production — 3864d7a5 Deployed Oct 20, 2025 by shopify-shipit[bot]
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.

2 participants