Skip to content

[regression] Add back bundler/require support for solargraph-rails #941

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jun 1, 2025

Conversation

apiology
Copy link
Contributor

@apiology apiology commented May 19, 2025

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) and require '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 like activestorage (gem name), whereas our current code won't find the dependency unless it's spelled active_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'.

@apiology apiology marked this pull request as ready for review May 19, 2025 13:30
@apiology apiology marked this pull request as draft May 19, 2025 13:30
@apiology apiology changed the title Add back bundler/require support for solargraph-rails [regression] Add back bundler/require support for solargraph-rails May 26, 2025
@apiology apiology marked this pull request as ready for review May 26, 2025 18:21
@castwide castwide merged commit db08df2 into castwide:master Jun 1, 2025
8 checks passed
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.

2 participants