Skip to content

Include RBS paths when indexing workspace#609

Open
vinistock wants to merge 1 commit intomainfrom
02-26-include_rbs_paths_when_indexing_workspace
Open

Include RBS paths when indexing workspace#609
vinistock wants to merge 1 commit intomainfrom
02-26-include_rbs_paths_when_indexing_workspace

Conversation

@vinistock
Copy link
Member

@vinistock vinistock commented Feb 26, 2026

Now that we have some RBS indexing, we can automatically include the RBS paths for core and stdlib to get the complete data when using index_workspace. In the future, we may want to ship with a fully indexed RBS cache, but for now let's just include the paths.

One design note: we should not require that rbs be on the bundle. Instead of using Gem::Specification.find or Gem.find_files (both of which are scoped to the bundle), I just searched Gem.path manually for the latest rbs installation.

@vinistock vinistock self-assigned this Feb 26, 2026
Copy link
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@vinistock vinistock marked this pull request as ready for review February 26, 2026 20:37
@vinistock vinistock requested a review from a team as a code owner February 26, 2026 20:37
@vinistock vinistock force-pushed the 02-26-include_rbs_paths_when_indexing_workspace branch from bbb8d49 to 6234d63 Compare February 26, 2026 20:40
@vinistock
Copy link
Member Author

Ended up uncovering an issue in the RBS crate ruby/rbs#2859


def test_index_workspace_includes_rbs_core_definitions
# Ensure the `rbs` gem is installed on CI
Gem.install("rbs") if ENV["CI"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if Gem.install in a test is the right approach here — it's a side effect that modifies the system state during a test run.

Should we add it to the tests group in the Gemfile instead?

Another solution is to only install the gem in the context as we do in Tapioca: https://github.com/Shopify/tapioca/blob/main/spec/tapioca/cli/gem_spec.rb#L120-L125

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