[regression] Add back bundler/require support for solargraph-rails #941
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 fix is needed for solargraph-rails; see https://github.com/iftheshoefritz/solargraph-rails/actions/runs/15252590965/job/42892684049 for what happens without it. Specifically, look at how active_storage support is broken - any active_storage fields on models won't be able to be qualified, as the classes they reference are not in our api_map.
Background:
Rails includes
Bundler.require(*Rails.groups)
andrequire 'rails/all'
, which both auto-requires paths from a number of gems.Currently, we don't properly handle
rails/all
, as it includes gem dependencies that look likeactivestorage
(gem name), whereas our current code won't find the dependency unless it's spelledactive_storage
(require name).We also dropped support for bundler/require at some point, so that doesn't catch it either, as well as breaking some expected behavior around other gems which are not specifically brought in by 'rails/all'.