There are many chances to improve RBS (the standard type signature for Ruby) toolchain. One of the major areas waiting for improvements is generating RBS from other type definitions, like RDB schema and schema for serialization formats.
The followings are examples of the projects:
- RBS generation from Rails database schema definition (
db/schema.rb
file). - RBS generation from Rails ActiveRecord classes.
- RBS generation from Protocol Buffers data definition (
.proto
files). - RBS generation from MessagePack formats.
- RBS generation from JSON schema.
- RBS generation from YARD docs.
You can propose any idea to improve the RBS toolchain. (You will find a missing piece easily if you try to use the tools. đź’¨)
- Recommendation: We have been working for type checking support for Ruby for years. These projects will help making our type checking solution much more practical.
- Prerequisites: Ruby
- Programming areas include: Data structure
- Estimated difficulty level: Easy/Medium
- Student: Tadashi Saito
- Mentors: @mame, @soutaro
RubyGSOC 2020 Final Report
https://writtensomeday.blogspot.com/2020/08/google-summer-of-code-2020-final-report.html
Status Updates
Week 10 (08/11/2020)
- What did you accomplish this past week?
- Continued to implement
rbs subtract
in topic branch
- Continued to implement
- What will you do this upcoming week?
- Investigate and add codes for subtract
- What obstacles are impeding your progress?
- None
- Would you like help from some mentors for this task?
- No
Week 9 (08/04/2020)
- What did you accomplish this past week?
- Changed some behavior of soutaro/steep#173
- Investigated and began to implement
rbs subtract
- What will you do this upcoming week?
- Continue to implement
rbs subtract
in above topic branch
- Continue to implement
- What obstacles are impeding your progress?
- None
- Would you like help from some mentors for this task?
- No
Week 8 (07/28/2020)
- What did you accomplish this past week?
- Investigated some problems of
steep check
- Investigated a problem and created PR about
steep watch
- Investigated some problems of
- What will you do this upcoming week?
- Improve above PR
- Check RBS codes to implement
rbs subtract
- This would be helpful to merge machine-generated RBS with hand-written RBS
- What obstacles are impeding your progress?
- None
- Would you like help from some mentors for this task?
- No
Week 7 (07/21/2020)
- What did you accomplish this past week?
- Updated to follow new syntax of RBS in Mastodon
- Tried to improve speed on interrupting
steep watch
- Tried to fix Steep’s problem about
::String | false
- Setup LSP package on local Emacs and check behavior of Steep
- What will you do this upcoming week?
- Create an issue of
::String | false
- Create a PR about
steep watch
- Create an issue of
- What obstacles are impeding your progress?
- None
- Would you like help from some mentors for this task?
- No
Week 6 (07/10/2020)
- What did you accomplish this past week?
- Improved RBS Rails to auto-generate more signatures about DB columns pocke/rbs_rails#32
boolean_attr?
(end with?
),anyattr_changed?
(_changed?
suffix), etc
- Finished to annotate User model of Mastodon
- Used the improved RBS Rails with pocke/rbs_rails#32
- 2 errors remain. One seems to be a problem of Steep, another seems a dead-code of implementation
- Tried to fix the above issue of Steep (not completed)
- Improved RBS Rails to auto-generate more signatures about DB columns pocke/rbs_rails#32
- What will you do this upcoming week?
- Investigate the issue of Steep
- Investigate and improve
steep watch
- What obstacles are impeding your progress?
- None
- Would you like help from some mentors for this task?
- No
Week 5 (07/03/2020)
- What did you accomplish this past week?
- Created some issues and PRs: steep#158, rbs_rails#28, rbs_rails#29, rbs_rails#30
- Almost completed to type User model of Mastodon
- Looked over the new RBS syntax
- What will you do this upcoming week?
- Continue to type (write signatures) of Mastodon’s User model
- Improve some behavior of
steep watch
- Auto-generate additional signatures with RBS Rails for some Rails model convention
foo?
method for a boolean columnfoo
foo_changed?
method for a columnfoo
- What obstacles are impeding your progress?
- None
- Would you like help from some mentors for this task?
- No for now, but I’ll continue to communicate
Week 4 (06/26/2020)
- What did you accomplish this past week?
- Made a bugfix PR for Ruby CI (This is found by static analysis)
- Continued typing Ruby CI
- Began typing (huge) User model of Mastodon as an example of larger practical Rails app
- What will you do this upcoming week?
- Improve and (hopefully) complete typing of Mastodon’s User model
- Create a PR for some lacked signatures in RBS Rails
- Catch up for a new syntax of RBS and its PR
- What obstacles are impeding your progress?
- None
- Would you like help from some mentors for this task?
- No
Week 3 (06/19/2020)
- What did you accomplish this past week?
- Fixed an issue of RBS about anonymous modules / classes: ruby/rbs#302
- Typing Ruby CI, a small but practical Rails app, is mostly completed
- Some bugs found with RBS!
- With typing of Ruby CI, many bugs and features found to be improved in RBS / Steep
- What will you do this upcoming week?
- What obstacles are impeding your progress?
- Nothing!
- Would you like help from some mentor for this task?
- No for now
Week 2 (06/12/2020)
- What did you accomplish this past week?
- Run
rbs prototype runtime
for Rails app - Created a PR to fix
rbs prototype runtime --require-relative
- Another PR to fix old name of RBS
- Reported an issue about anonymous modules
- Run
- What will you do this upcoming week?
- Mostly complete to add signatures of RubyCI
- Fix
ruby/rbs#301
- Fix RBS Rails with adding signatures of
ActiveRecord::Base
methods
- What obstacles are impeding your progress?
- None
- Would you like help from some mentor for this task?
- No
Week 1 (06/07/2020)
- What did you accomplish this past week?
- What will you do this upcoming week?
- Continue to add signatures of RubyCI
- Try
rbs prototype runtime
for Rails appseager_load!
would be needed
- What obstacles are impeding your progress?
- None
- Would you like help from some mentor for this task?
- No