Skip to content

Conversation

@apiology
Copy link
Contributor

@apiology apiology commented Apr 8, 2025

RBS::Environment#declarations was removed recently in favor of a more flexible interface in RBS::Environment#declarations

I'd like to restore RBS::Environment#declarations as a simplified consumer of RBS::Environment#declarations so that current users of the rbs gem are not broken by this change.

In particular, the situation I am facing:

  1. Solargraph is a user of the rbs gem to pull in RBS types to work alongside YARD-style types.

  2. Solargraph is striving to maintain compatibility with Ruby 3.0, and thus we'd like to support older versions of the rbs gem, given the requirement of Ruby 3.1 for the current rbs gem.

  3. Solargraph uses RBS::Environment#declarations - the code which uses RBS::Environment#declarations is here: https://github.com/castwide/solargraph/blob/master/lib/solargraph/rbs_map/conversions.rb

Would you accept this small shim to maintain compatibility, or perhaps advise on how we can prepare for the new version by switching to a more stable API? I'm not sure if you intended this function to be used from the outside world.

BTW, very excited to see the current work landing--looks very interesting for everyone 🎉

Copy link
Member

@soutaro soutaro left a comment

Choose a reason for hiding this comment

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

OK! 👍

@soutaro soutaro added this to the RBS 4.0 milestone May 9, 2025
@soutaro soutaro added this pull request to the merge queue May 9, 2025
Merged via the queue into ruby:master with commit d4fc1f0 May 9, 2025
20 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