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

Perform static type checking #427

Open
Yang-33 opened this issue Apr 1, 2025 · 1 comment
Open

Perform static type checking #427

Yang-33 opened this issue Apr 1, 2025 · 1 comment
Assignees
Labels

Comments

@Yang-33
Copy link
Contributor

Yang-33 commented Apr 1, 2025

In v2, we have set up the process to automatically generate RBS files along with the code. For static type checking, there are tools like steep and sorbet. While Sorbet might seem popular(?), speed is not that crucial for us, and it seems there are no special RBS files needed, as the SDK code is not very complex. Therefore, I thought it would be good to start with steep, which is easy to begin with. Switching to aorbet later doesn't seem too difficult.

There are three reasons to do this:

  1. To detect any strange code that might be generated and doesn't work at the type level.
  2. To automatically verify the consistency between types and implementation. If not verified, it can lead to user confusion.
  3. To ensure that examples and tests work correctly at the type level. Examples in dynamically typed languages tend to break easily, which can discourage SDK beginners. This should not be the case.
@Yang-33
Copy link
Contributor Author

Yang-33 commented Apr 9, 2025

WIP, but almost errors are resolved (or ignored..)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant