Skip to content

Skip ActiveSupport deprecation proxies when gathering DSL constants - #2701

Open
Hashim1999164 wants to merge 1 commit into
Shopify:mainfrom
Hashim1999164:fix/skip-deprecation-proxies-in-dsl-discovery
Open

Skip ActiveSupport deprecation proxies when gathering DSL constants#2701
Hashim1999164 wants to merge 1 commit into
Shopify:mainfrom
Hashim1999164:fix/skip-deprecation-proxies-in-dsl-discovery

Conversation

@Hashim1999164

@Hashim1999164 Hashim1999164 commented Aug 18, 2026

Copy link
Copy Markdown

Fixes #2463

Rails 8.1 replaced LoadInterlockAwareMonitor with a DeprecatedConstantProxy. DSL compilers walk every loaded module and call methods such as singleton_class on each one. Those calls go through method_missing on the proxy and print deprecation warnings even though Tapioca is only enumerating ObjectSpace.

This change drops DeprecatedConstantProxy modules from all_modules so every DSL compiler skips them. Kernel.class is used to recognize the proxy without triggering the warning.

The ActiveSupportConcern gather_constants spec covers the Rails 8.1 LoadInterlockAwareMonitor proxy.

@Hashim1999164
Hashim1999164 requested a review from a team as a code owner August 18, 2026 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rails 8.1 deprecation warnings for LoadInterlockAwareMonitor during DSL generation

1 participant