Sorbet type-checking freezes in my Rails 6 project with latest sorbet and tapioca versions

143 Views Asked by At

We have a Rails 6 project and running into problems getting Sorbet typechecking to work. We have been following the adoption guide and getting stuck at Step 3 with no debug output or errors.

These are the versions we are running in our Rails app:

  • rails (6.1.0)
  • sorbet (0.5.10827)
  • sorbet-static (0.5.10827)
  • sorbet-runtime (0.5.10827)
  • tapioca (0.11.6)

Observed output

  1. using Tapioca to generate rbi files works and correctly generates a Sorbet config and rbi files for gems but hangs on Finding all unresolved constants and never completes.
pritikan@Pritikas-MBP rosie % bundle exec tapioca init
        skip  sorbet/config
        skip  sorbet/tapioca/config.yml
   identical  sorbet/tapioca/require.rb
       force  bin/tapioca
Retrieving index from central repository... Done
Listing gems from Gemfile.lock... Done
Removing annotations for gems that have been removed...  Nothing to do
Fetching gem annotations from central repository...

  Fetched actionmailer
   identical  sorbet/rbi/annotations/actionmailer.rbi

  Fetched actionpack
   identical  sorbet/rbi/annotations/actionpack.rbi

  Fetched actionview
   identical  sorbet/rbi/annotations/actionview.rbi

  Fetched activemodel
   identical  sorbet/rbi/annotations/activemodel.rbi

  Fetched activerecord
   identical  sorbet/rbi/annotations/activerecord.rbi

  Fetched activesupport
   identical  sorbet/rbi/annotations/activesupport.rbi

  Fetched configs
   identical  sorbet/rbi/annotations/configs.rbi

  Fetched delayed_job
   identical  sorbet/rbi/annotations/delayed_job.rbi

  Fetched globalid
   identical  sorbet/rbi/annotations/globalid.rbi

  Fetched lhm
   identical  sorbet/rbi/annotations/lhm.rbi

  Fetched mocha
   identical  sorbet/rbi/annotations/mocha.rbi

  Fetched railties
   identical  sorbet/rbi/annotations/railties.rbi

  Fetched rainbow
   identical  sorbet/rbi/annotations/rainbow.rbi

  Fetched state_machines
   identical  sorbet/rbi/annotations/state_machines.rbi

  Fetched stripe
   identical  sorbet/rbi/annotations/stripe.rbi

  Fetched webmock
   identical  sorbet/rbi/annotations/webmock.rbi

Done
Removing RBI files of gems that have been removed:

  Nothing to do.

Generating RBI files of gems that are added or updated:

  Nothing to do.

Checking generated RBI files...  Done
  No errors found

All operations performed in working directory.
Please review changes and commit them.

Finding all unresolved constants, this may take a few seconds...
  1. Typechecking hangs without any output
pritikan@Pritikas-MBP rosie % bundle exec srb tc -P
Indexing |=======================================================| ETA: 0h00m00s
Resolving |                                                      | ETA: 0h00m00s

Expected behavior

pritikan@Pritikas-MBP rosie % bundle exec srb tc

would return a list of type errors.

We have tried the above with 2 Rails projects and 1 Ruby project and find that the issues are with the Rails projects only.

0

There are 0 best solutions below