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

Document exporting signatures using rbi/ folder #1792

Merged
merged 2 commits into from
Feb 22, 2024
Merged

Conversation

KaanOzkan
Copy link
Contributor

Motivation

Looking at the implementation I don't think this is documented anywhere.

Implementation

Tests

@KaanOzkan KaanOzkan requested a review from a team as a code owner February 8, 2024 20:04
README.md Outdated
@@ -40,6 +40,7 @@ Tapioca makes it easy to work with [Sorbet](https://sorbet.org) in your codebase
* [Excluding a gem from RBI generation](#excluding-a-gem-from-rbi-generation)
* [Changing the strictness level of the RBI for a gem](#changing-the-strictness-level-of-the-rbi-for-a-gem)
* [Keeping RBI files for gems up-to-date](#keeping-rbi-files-for-gems-up-to-date)
* [Exporting signatures using `rbi/` folder](#exporting-signatures-using-rbi-folder)
Copy link
Member

Choose a reason for hiding this comment

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

All of our documentation is written from the point of view of the consumer of types via RBI files, but this topic is written from the gem author's point of view, which is confusing.

I think what we are really trying to say here, for Tapioca users, is that Tapioca can use the signatures exported from gems in rbi/ folders. So, I think we should word this, and the paragraph below to read that way.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My thought process was that "users" of this feature are the gem authors, unlike other features. I don't have strong opinions, I can reword it to importing and make it explicit what gem author has to do and what gem user has to do.

Copy link
Member

Choose a reason for hiding this comment

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

The case for gem authors, and the fact that they can export an /rbi folder is already documented by Sorbet. I think we should be documenting that Tapioca will automatically import and merge those signatures when the gem exports them. Also, that one can opt out of that behaviour using the --no-exported-gem-rbis flag.

Copy link
Member

@paracycle paracycle left a comment

Choose a reason for hiding this comment

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

Thank you!

@KaanOzkan KaanOzkan merged commit 73eba6f into main Feb 22, 2024
34 checks passed
@KaanOzkan KaanOzkan deleted the ko/rbi-folder-readme branch February 22, 2024 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants