Repository navigation
Conversation
ApiMap::Index#map_overrides added an override tag by tag and called reset_generated! after each. Pin::Method#reset_generated! reads #signatures, which caches the signatures and overloads built from the docstring as it stood, so only the first @overload took effect. The @!override of ActiveRecord::Calculations#pluck in solargraph-rails thus typed pluck as Array alone on Rails 7.0 and 7.1. The same caching happened earlier whenever anything read the pin signatures before the override was applied, such as the debug log in map_overrides inspecting the pins. Add all of the override tags before regenerating anything, and have Pin::Method#reset_docstring_signatures! drop the overloads, signatures and return type generated from the docstring, keeping ones that were passed in or assigned.
apiology
marked this pull request as ready for review
November 16, 2026 21:33
Owner
Author
|
Claude: Closing as covered by castwide/solargraph#1104, which applies every |
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.
This PR was written by Claude Code on behalf of @apiology.
Problem
An
@!overridewith several@overloadtags keeps only the first one:solargraph-rails declares
ActiveRecord::Calculations#pluckthis way, so its Rails 7.0 definitions spec fails against current Solargraph.Solution
Add all of an override tags before rebuilding the method signatures from its docstring, and clear signatures cached from the docstring first, so an earlier
inspectorreset_generated!can no longer lock in the first overload.