Skip to content
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

Load gem-included types #155

Merged
merged 5 commits into from
Oct 4, 2022
Merged

Load gem-included types #155

merged 5 commits into from
Oct 4, 2022

Conversation

dorner
Copy link
Contributor

@dorner dorner commented Sep 6, 2022

When trying to add RBS to a repo of mine, I ran into an issue where sord was complaining that it couldn't find a constant in one of the included gems - this was despite the fact that the included gem had a sig/defs.rbs file as the convention is for generated RBS files.

This update pulls in any RBS or RBI signatures to the set of constants that sord knows about.

We can update this in the future to pull in from sorbet-typed or any other source of RBI/RBS files.

For now I made this an automatic change (i.e. not part of a setting), because I'm not really sure why someone would specifically not want to type constants that gems make public. Feedback is welcome!

Related to #147.

@dorner
Copy link
Contributor Author

dorner commented Sep 6, 2022

Note - I also changed the workflow file to test on Ruby >= 2.7 as this is the last version that's not officially EOL. If we need to support older versions (we had 2.4 in the workflow) please let me know.

Daniel Orner added 3 commits September 7, 2022 09:02
@AaronC81
Copy link
Owner

AaronC81 commented Oct 4, 2022

This is neat! The RBS gem seems really powerful.

Fine with the version bump too - looks like the RBS gem only supports >= 2.6 so we'd need to bump anyway, and going up to after last EOL makes sense.

Cheers for your contributions!

@AaronC81 AaronC81 merged commit 4aeb247 into AaronC81:master Oct 4, 2022
@dorner dorner deleted the load-gemfiles branch October 6, 2022 14:48
@dorner
Copy link
Contributor Author

dorner commented Oct 6, 2022

Thanks so much! And good to hear the delay was for a good reason (I hope?)

Can we get a new version of the gem with the updates please? 🙏

@AaronC81
Copy link
Owner

AaronC81 commented Oct 6, 2022

Sure, will try to cut a release this evening!

@AaronC81
Copy link
Owner

AaronC81 commented Oct 6, 2022

@dorner 5.0.0 contains this change! :)

@dorner
Copy link
Contributor Author

dorner commented Oct 6, 2022

Amazing, thanks so much!

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