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

Bump sorbet and sorbet-runtime to address change of public API on newest version of sorbet-runtime #201

Merged
merged 4 commits into from
Apr 25, 2022

Conversation

alexevanczuk
Copy link
Contributor

@alexevanczuk alexevanczuk commented Apr 21, 2022

What are you trying to accomplish?

See #200 for more info.

TLDR: sorbet-runtime's public API changed, so this explicitly bumps sorbet-runtime, sets a version constraint, and migrates the offending use of public API in packwerk.

What approach did you choose and why?

I decided to constrain the version of sorbet-runtime. bin/packwerk check would fail for clients because it would employ the wrong API of type_member on their older version of sorbet-runtime.

This change requires the user to bump sorbet-runtime.

What should reviewers focus on?

Let me know if I'm missing something. Another approach might be to just migrate PackageSet off of type_member so we don't have to bump sorbet-runtime.

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.

@@ -12,7 +12,7 @@ class PackageSet
extend T::Generic
include Enumerable

Elem = type_member(fixed: Package)
Elem = type_member { { fixed: Package } }
Copy link
Contributor

Choose a reason for hiding this comment

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

Ruby syntax strikes again... This is a block returning a hash. It took me a second to realize that.

Copy link
Contributor

@exterm exterm left a comment

Choose a reason for hiding this comment

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

Not sure why sorbet is not following semantic versioning, but this seems like the correct fix.

@exterm exterm merged commit e2d1dbd into Shopify:main Apr 25, 2022
@shopify-shipit shopify-shipit bot temporarily deployed to rubygems April 27, 2022 15:37 Inactive
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