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-static-and-runtime from 0.5.10539 to 0.5.10554 #1270

Merged
merged 2 commits into from
Nov 16, 2022

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Nov 14, 2022

Bumps sorbet-static-and-runtime from 0.5.10539 to 0.5.10554.

Release notes

Sourced from sorbet-static-and-runtime's releases.

sorbet 0.5.10553.20221110153602-f47b72adf

To use Sorbet add this line to your Gemfile:

gem 'sorbet', '0.5.10553', :group => :development
gem 'sorbet-runtime', '0.5.10553'

sorbet 0.5.10552.20221110151500-2da789758

To use Sorbet add this line to your Gemfile:

gem 'sorbet', '0.5.10552', :group => :development
gem 'sorbet-runtime', '0.5.10552'

sorbet 0.5.10551.20221110140754-b98f4dbc6

To use Sorbet add this line to your Gemfile:

gem 'sorbet', '0.5.10551', :group => :development
gem 'sorbet-runtime', '0.5.10551'

sorbet 0.5.10550.20221110123241-20d8b24c9

To use Sorbet add this line to your Gemfile:

gem 'sorbet', '0.5.10550', :group => :development
gem 'sorbet-runtime', '0.5.10550'

sorbet 0.5.10549.20221109131652-5e4d7a0e8

To use Sorbet add this line to your Gemfile:

gem 'sorbet', '0.5.10549', :group => :development
gem 'sorbet-runtime', '0.5.10549'

sorbet 0.5.10548.20221109113712-f3413fc00

To use Sorbet add this line to your Gemfile:

gem 'sorbet', '0.5.10548', :group => :development
gem 'sorbet-runtime', '0.5.10548'

sorbet 0.5.10547.20221109125123-6946d7f16

To use Sorbet add this line to your Gemfile:

gem 'sorbet', '0.5.10547', :group => :development
gem 'sorbet-runtime', '0.5.10547'

sorbet 0.5.10546.20221108155600-c9323cf18

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [sorbet-static-and-runtime](https://github.com/sorbet/sorbet) from 0.5.10539 to 0.5.10554.
- [Release notes](https://github.com/sorbet/sorbet/releases)
- [Commits](https://github.com/sorbet/sorbet/commits)

---
updated-dependencies:
- dependency-name: sorbet-static-and-runtime
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot requested a review from a team as a code owner November 14, 2022 21:01
@dependabot dependabot bot added dependencies Pull requests that update a dependency file ruby Pull requests that update Ruby code labels Nov 14, 2022
@st0012
Copy link
Member

st0012 commented Nov 15, 2022

The build failure seems to be generic related:

     it compiles constants of generic types                         ERROR (0.03s)
Minitest::UnexpectedError:         TypeError: T.let: Expected type GenericInterface[::Numeric], got type Concrete with hash -331136995797773254
        Caller: /tmp/d20221114-3907-ipwiw3/lib/generic.rb:16
            /tmp/d20221114-3907-ipwiw3/lib/generic.rb:16:in `<top (required)>'
            /home/runner/work/tapioca/tapioca/lib/tapioca.rb:23:in `block in silence_warnings'
            /opt/hostedtoolcache/Ruby/2.7.6/x64/lib/ruby/2.7.0/rubygems/user_interaction.rb:47:in `use_ui'
            /home/runner/work/tapioca/tapioca/lib/tapioca.rb:22:in `silence_warnings'
            /home/runner/work/tapioca/tapioca/spec/tapioca/gem/pipeline_spec.rb:3328:in `block (2 levels) in <class:PipelineSpec>'

I'm not sure if the problem is on Sorbet or Tapioca. But here are the Sorbet changes that are related to the build failure.

@st0012
Copy link
Member

st0012 commented Nov 16, 2022

Actually, the error seems to be unrelated as it's been reported in other PRs as well: #1241 (comment)

It's because builds with Rails gemfile don't lock gem versions so they bumped Sorbet earlier.

@st0012
Copy link
Member

st0012 commented Nov 16, 2022

Why Does The Latest Commit Breaks?

Changing T::Generic#[] affects 2 things:

  1. It affects how T.let coerce generic types
  2. It also affects what Tapioca::Runtime::Reflection#signature_of retrieves. Specifically, it affects the returned value's return_type attribute.

main

#<T::Private::Methods::Signature:0x0000000109aa5b40
 @arg_types=[],
 @bind=nil,
 @block_name=nil,
 @block_type=nil,
 @check_level=:always,
 @defined_raw=false,
 @has_keyrest=false,
 @has_rest=false,
 @keyrest_name=nil,
 @keyrest_type=nil,
 @kwarg_types={},
 @method=#<UnboundMethod: Root#children() /var/folders/lf/4xqm_gk10ts83_mxrhsz9qf80000gn/T/d20221116-87187-bplnyv/lib/generic.rb:8>,
 @method_name=:children,
 @mode="abstract",
 @on_failure=nil,
 @override_allow_incompatible=nil,
 @parameters=[],
 @req_arg_count=0,
 @req_kwarg_names=[],
 @rest_name=nil,
 @rest_type=nil,
 @return_type=#<T::Types::TypedArray:0x0000000109aa5ca8 @type=#<Tapioca::Runtime::GenericTypeRegistry::GenericType:0x0000000109aa5f28 @raw_type=#<Module:0x0000000109aa6130>, @underlying_type=Node>>>

with this PR's change

#<T::Private::Methods::Signature:0x000000010e5f6f40
 @arg_types=[],
 @bind=nil,
 @block_name=nil,
 @block_type=nil,
 @check_level=:always,
 @defined_raw=false,
 @has_keyrest=false,
 @has_rest=false,
 @keyrest_name=nil,
 @keyrest_type=nil,
 @kwarg_types={},
 @method=#<UnboundMethod: Root#children() /var/folders/lf/4xqm_gk10ts83_mxrhsz9qf80000gn/T/d20221116-87306-sqd4l8/lib/generic.rb:8>,
 @method_name=:children,
 @mode="abstract",
 @on_failure=nil,
 @override_allow_incompatible=nil,
 @parameters=[],
 @req_arg_count=0,
 @req_kwarg_names=[],
 @rest_name=nil,
 @rest_type=nil,
 @return_type=#<T::Types::TypedArray:0x000000010e5f7080 @type=#<T::Types::Simple:0x000000010e5fcee0 @raw_type=Node>>>

And that affects how Tapioca::Gem::Listeners::SorbetSignatures#compile_signature compiles the final signature.

  • main: "T::Array[Node[::Integer]]"
  • Latest commit: "T::Array[Node]"

@dirceu dirceu force-pushed the dependabot/bundler/sorbet-static-and-runtime-0.5.10554 branch 2 times, most recently from 6a089a8 to a69b5c3 Compare November 16, 2022 18:11
Adapt `CoercePatch` to reflect changes to T::Utils from
sorbet/sorbet#6559.

Co-authored-by: Stan Lo <[email protected]>
Co-authored-by: Adison Lampert <[email protected]>
@dirceu dirceu force-pushed the dependabot/bundler/sorbet-static-and-runtime-0.5.10554 branch from a69b5c3 to af7aec2 Compare November 16, 2022 18:22
Copy link
Member

@st0012 st0012 left a comment

Choose a reason for hiding this comment

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

Thanks for the fix @dirceu 🙏

@st0012 st0012 merged commit 6f01511 into main Nov 16, 2022
@st0012 st0012 deleted the dependabot/bundler/sorbet-static-and-runtime-0.5.10554 branch November 16, 2022 22:02
val.__tapioca_override_type
else
super
module Private
Copy link
Member

Choose a reason for hiding this comment

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

I am afraid the fix for Tapioca is not as simple as changing the namespace and the method name, since after this change Tapioca will no longer work with any older version of Sorbet runtime.

We either need to require a newer version of sorbet-runtime as a runtime dependency, which I don't particularly like since it is too recent for most folks, or we need to make sure this code works properly both with the old Sorbet runtime code and the new one.

/cc @dirceu, @st0012 and @adisonlampert

dirceu added a commit that referenced this pull request Nov 21, 2022
This reintroduces the monkeypatch to T::Utils#coerce that was removed
on #1270. See
https://github.com/Shopify/tapioca/pull/1270/files#r1026916745 for more
information.
dirceu added a commit that referenced this pull request Nov 21, 2022
This reintroduces the monkeypatch to T::Utils#coerce that was removed
on #1270. See
https://github.com/Shopify/tapioca/pull/1270/files#r1026916745 for more
information.
dirceu added a commit that referenced this pull request Nov 21, 2022
This reintroduces the monkeypatch to T::Utils#coerce that was removed
on #1270. See
https://github.com/Shopify/tapioca/pull/1270/files#r1026916745 for more
information.
dirceu added a commit that referenced this pull request Dec 19, 2022
This reintroduces the monkeypatch to T::Utils#coerce that was removed
on #1270. See
https://github.com/Shopify/tapioca/pull/1270/files#r1026916745 for more
information.
paracycle pushed a commit that referenced this pull request Dec 19, 2022
This reintroduces the monkeypatch to T::Utils#coerce that was removed
on #1270. See
https://github.com/Shopify/tapioca/pull/1270/files#r1026916745 for more
information.
@shopify-shipit shopify-shipit bot temporarily deployed to production December 19, 2022 22:14 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file ruby Pull requests that update Ruby code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants