Repository navigation
Avoid loading unused ActiveSupport::Configurable during reflection - #2748
Open
thomasklemm wants to merge 1 commit into
Open
thomasklemm wants to merge 1 commit into
thomasklemm wants to merge 1 commit into
Conversation
thomasklemm
force-pushed
the
fix/skip-unused-active-support-configurable
branch
from
October 20, 2026 12:59
b308489 to
272facd
Compare
Author
|
Friendly ping: is there anything I can change to help get this reviewed? Thanks! |
Leave the deprecated Rails 8.1 API pending instead of triggering its load-time deprecation while eager loading or compiling gem symbols. Keep explicit usage warnings and already-loaded APIs intact.
thomasklemm
force-pushed
the
fix/skip-unused-active-support-configurable
branch
from
November 18, 2026 11:59
7294b59 to
dd72843
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
On Rails 8.1, generating gem RBIs can emit
ActiveSupport::Configurable is deprecated without replacement, and will be removed in Rails 8.2even when the application never uses that API. With deprecations configured to raise, generation fails instead.Rails deliberately removed Configurable from its eager autoloads in rails/rails#55943: its plain autoload must remain available, but loading the file emits the deprecation. Tapioca's autoload tracker currently forces it anyway. This is a different mechanism from the deprecated constant proxies addressed in #2701.
Implementation
Runtime::Reflection.constantizeleaves the Rails 8.1+ Configurable autoload pending when asked for it or a constant under it, unless the application already loaded it. The check sits in the shared lookup rather than in the autoload tracker, because the gem pipeline resolves symbols and subconstants through the same helper. Other autoloads load normally, explicit usage still emits the Rails deprecation and generates Configurable RBIs, and Rails 8.0 is unchanged.Tests
Added a CLI test that generates Active Support RBIs with deprecations set to raise and leaves the Configurable autoload unchanged (it fails without the fix), and a control showing that explicit Configurable usage still warns and gets its RBI. A maintainer will need to add the
bugfixrelease label.