-
Notifications
You must be signed in to change notification settings - Fork 155
Description
After upgrading Tapioca to 0.17.2 (or more recent) and regenerating the RBI for actionpack, the signature for AbstractController::Collector#turbo_stream is missing.
The AbstractController::Collector methods are dynamically generated based on Mime::SET: https://github.com/rails/rails/blob/v8.0.2/actionpack/lib/abstract_controller/collector.rb#L18-L20
The turbo-rails gem registers the turbo_stream format in a Rails initializer: https://github.com/hotwired/turbo-rails/blob/v2.0.16/lib/turbo/engine.rb#L102-L104
So it looks like something changed in 0.17.2 that causes the Rails initializer to no longer be executed.
This is problematic for us because we have code in controllers like this:
respond_to do |format|
format.turbo_stream do
render(turbo_stream: ...)
end
endand after regenerating the RBI for actionpack, the code above produces a Sorbet error:
Method `turbo_stream` does not exist on `ActionController::MimeResponds::Collector`