Skip to content

Conversation

lsylvester
Copy link
Contributor

What are you trying to accomplish?

Fix issue where packwerk check can fail if stringio has not been implicitly required.

When running packwerk check against my application after performing a Rails upgrade, I am seeing the following error.

../vendor/bundle/ruby/3.1.0/gems/packwerk-3.2.1/lib/packwerk/cli.rb:12:in `block in <class:Cli>': uninitialized constant Packwerk::Cli::StringIO (NameError)

        out: T.any(StringIO, IO),
                   ^^^^^^^^

It is not possible to reproduce this error in the tests because minitest requires 'stringio', and so StringIO is always defined.

What approach did you choose and why?

What should reviewers focus on?

Type of Change

  • Bugfix
  • New feature
  • Non-breaking change (a change that doesn't alter functionality - i.e., code refactor, configs, etc.)

Additional Release Notes

  • Breaking change (fix or feature that would cause existing functionality to change)

Include any notes here to include in the release description. For example, if you selected "breaking change" above, leave notes on how users can transition to this version.

If no additional notes are necessary, delete this section or leave it unchanged.

Checklist

  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • It is safe to rollback this change.

@lsylvester lsylvester requested a review from a team as a code owner November 8, 2024 03:10
@lsylvester
Copy link
Contributor Author

I have signed the CLA!

@gmcgibbon gmcgibbon merged commit 933c7fd into Shopify:main Nov 8, 2024
9 checks passed
@gmcgibbon
Copy link
Member

Thank you!

Copy link

@graham-jobber graham-jobber left a comment

Choose a reason for hiding this comment

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

:shipit:

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.

3 participants