Repository navigation
Conversation
Plugin::ActiveSupport added an extend of ClassMethods only for includes in workspace source maps. Since Convention::ActiveSupportConcern was removed, classes defined in gems (ActiveJob::Base, ActionController::Base, Rails::Application) lost class methods that come from concerns they include, e.g. ActiveSupport::Callbacks .define_callbacks. Load external requires before running plugins and pass the external pins to the plugin panel, so the plugin also sees includes from gems and stdlib. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EhUSLUimEYJyCZv8NdQGKb
ActiveSupport::Concern extends an includer with the ClassMethods of the concern's own dependencies too: ActiveJob::Base includes ActiveJob::Callbacks, which includes ActiveSupport::Callbacks, so ActiveJob::Base gets set_callback. Plugin::ActiveSupport only extended the ClassMethods of the directly included module. Resolve each included module lexically and also extend the includer with the ClassMethods of the modules it includes, at any depth. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EhUSLUimEYJyCZv8NdQGKb
ActiveSupport::Concern runs a concern's included block and class_methods block in the includer, so the includer gets the concern's class methods and extends (e.g., ActiveRecord::Core's self.configurations, ActiveSupport::Callbacks' DescendantsTracker). Copy those pins onto the includer for each concern it includes, directly or as a dependency. Extend only ClassMethods defined in the included module itself: for an include of an undefined module, the old X::ClassMethods reference resolved lexically to an enclosing namespace's ClassMethods, e.g. ActiveRecord::Base::ClassMethods with its generics unbound. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EhUSLUimEYJyCZv8NdQGKb
apiology
marked this pull request as ready for review
October 30, 2026 08:28
Strong typecheck inferred Array, Array<Array> for the recursive flat_map in nested_include_paths; push into a typed result array instead. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EhUSLUimEYJyCZv8NdQGKb
apiology
added a commit
to iftheshoefritz/solargraph-rails
that referenced
this pull request
Oct 30, 2026
0.62.0 ships castwide/solargraph#1469, which stopped extending classes defined in gems with their concerns ClassMethods, so the Devise and ActiveStorage completion specs fail on it. apiology/solargraph#448 restores that. Skip on exactly 0.62.0, like rails_spec broken_versions, so a later broken release still fails. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EhUSLUimEYJyCZv8NdQGKb
Owner
Author
|
Claude: Moved upstream to castwide#1476 (same branch). |
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.
Claude: This PR was written by Claude Code on behalf of @apiology.
Problem:
A class defined in a gem loses the
ClassMethodsof the concerns it includes:Since castwide#1469 removed
Convention::ActiveSupportConcern,ActiveJob::Base(.set_callback,.rescue_from),Rails::ApplicationandActionController::Base(.config,.view_context_class) lose class methods from the concerns they include.Solution:
Give
Plugin::Panelthe gem and stdlib pins (loading requires before plugins run) and havePlugin::ActiveSupporttreat each included module and its nested includes asActiveSupport::Concerndoes: extend the includer with theirClassMethods, and for concerns also copy their own class methods and extends (fromclass_methodsandincludedblocks) onto the includer.