-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[rb] Add all the RBS files to add full rbs support to all selenium rb classes and modules #13234
[rb] Add all the RBS files to add full rbs support to all selenium rb classes and modules #13234
Conversation
…nium into rb_add_all_rbs_missing_files
…nium into rb_add_all_rbs_missing_files
Thank you for the quick review and the help @p0deje, here in Denmark is quite late now, so I will check all the answers tomorrow morning |
Can you please fix RuboCop complaints?
|
Out of curiosity, what are these warnings?
|
Would it be okay if I squash your PR into a single commit? |
For sure, that would be perfect, I usually make a lot of small commits to show progress and then I squash everything into one nice commit |
From what I researched these errors are related to the splat operator that throws the restarg (unknown variable issue) I will create this as a separate issue, but before it used to throw an actual error, now it just seems like a warning because of steep itself |
Thank you again for this massive effort, I'll merge the PR as soon as CI passes. Out of curiosity, did you use https://github.com/ruby/typeprof or something else to generate RBS files? |
I used RBS prototype: https://github.com/ruby/rbs (This is what rubymine does in the background) An end user of rbs will probably find rbs prototype the most useful. This command generates boilerplate signature declarations for ruby files. For example, say you have written the below ruby script. person.rb
Rubymine documentation: https://blog.jetbrains.com/ruby/2021/09/working-with-rbs-in-rubymine/ And I was thinking to keep working on this to add proper types now that all the files are there so I can learn more about the selenium ruby library if that is something that will be helpful @p0deje |
That would be amazing. I'm curious if you could try typeprof as it might generate more precise signatures, not just boilerplate as rbs. And maybe you won't have to work on manually changing every signature. |
I will give it a try to that, thank you for the suggestion 👍 |
Description
This PR adds more than 120 RBS files and updates the steep file to reduce all the current steep errors.
The goal with this PR is that afterward it would be possible to add a steep check on the bazel pipeline.
Motivation and Context
Based on #10943 I created the following PRs to add RBS type support to the ruby selenium library:
On #12844 I started adding support for RBS and I added the steep file configuration
On #13192 I extended the classes supported on RBS and updated the logger file
I stated on #13192 that I wanted to make smaller PRs to expand support and make it easier to review, but since there was a lot of work to be done to cover all the classes and modules in the library I decided to expand this PR to add all the missing coverage and fix all the steep issues
Right now if a steep check is run after the two previously mentioned PRs this is the result:
Already with the files added and the extension of libraries on the steep config file the amount of errors drops to:
This is currently a work in progress and I will submit this PR after all the type errors are reduced to 0 and all the files are properly updated to reflect the right types used in classes and not just undefined
Types of changes
Checklist