Tapioca generates empty RBIs; cannot debug
jplaisted opened this issue · 1 comments
Tapioca has somehow broken from underneath me (it no longer works on an existing project), and I'm not sure why.
Every RBI now says Compiled [gem] (empty output)
; and the RBIs are in fact empty. I've tried running with bundle exec tapioca gem -w 1 --verbose
and I do not get any additional output. I've tried also to add requires to the require.rb
file, as suggested by the empty file output, and I get the same result. I'm not even sure how to go about debugging this; help would be appreciated.
I'm running in a linux docker image, which itself is running on an M3 mac. I will note that srb
is currently broken in this environment due to sorbet/sorbet#1487. I could've sworn that tapioca gem
was working even with that broken, but I might be misremembering. And, for what its worth, it seems like bundle exec tapioca dsl
still works fine.
Dependencies:
- Ruby 3.2.4
- Tapioca 0.16.1
- Sorbet 0.5.11549
- Sorbet runtime 0.5.11549
Example with ddtrace 1.10.1, after deleting its RBI to start fresh.
require.rb contents:
# typed: strict
# frozen_string_literal: true
# Add your extra requires here (`bin/tapioca require` can be used to boostrap this list)
require 'ddtrace' # this should not be necessary, last I checked; but adding it anyway to eliminate this as the issue
Running tapioca
bundle e tapioca gem -w 1 --verbose ddtrace
Requiring all gems to prepare for compiling...
Done
Removing RBI files of gems that have been removed:
Nothing to do.
Compiled ddtrace (empty output)
create sorbet/rbi/gems/ddtrace@1.10.1.rbi
Checking generated RBI files... Done
No errors found
All operations performed in working directory.
Please review changes and commit them.
We run sorbet to kickstart gem
RBI process so it needs to be working https://github.com/Shopify/tapioca/blob/main/lib/tapioca/static/symbol_loader.rb#L83