-
-
Notifications
You must be signed in to change notification settings - Fork 638
Add RBS validation and runtime type checking to CI #1950
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
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
9b67226
Add RBS validation and runtime type checking to CI
justin808 e3e09a8
Add rbs gem to Pro package development dependencies
justin808 b0e9c47
Fix Steep type checker CI failures
justin808 fe12c5e
Improve RBS type checking implementation and documentation
justin808 7238125
Fix critical RBS runtime checking and validation issues
justin808 79dce33
Address RBS runtime checking review comments
justin808 ac47a6d
Address additional RBS review suggestions
justin808 bd1265e
Fix RBS validation issues and improve error handling
justin808 ec792e8
Fix require path in RBS runtime checking spec
justin808 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| # frozen_string_literal: true | ||
|
|
||
| # Steepfile - Configuration for Steep type checker | ||
| # See https://github.com/soutaro/steep for documentation | ||
| # | ||
| # IMPORTANT: This file lists only the files that are ready for type checking. | ||
| # We use a positive list (explicit check statements) rather than checking all files | ||
| # because not all files have RBS signatures yet. | ||
| # | ||
| # Files/directories intentionally excluded (no RBS signatures yet): | ||
| # - lib/generators/**/* - Rails generators (complex Rails integration) | ||
| # - lib/react_on_rails/engine.rb - Rails engine setup | ||
| # - lib/react_on_rails/doctor.rb - Diagnostic tool | ||
| # - lib/react_on_rails/locales/**/* - I18n files | ||
| # - lib/react_on_rails/props_js_builder.rb - TODO: Add signature | ||
| # - lib/react_on_rails/shakapacker/**/* - Shakapacker integration (complex) | ||
| # | ||
| # To add a new file to type checking: | ||
| # 1. Create corresponding RBS signature in sig/react_on_rails/filename.rbs | ||
| # 2. Add `check "lib/react_on_rails/filename.rb"` below | ||
| # 3. Run `bundle exec rake rbs:steep` to verify | ||
| # 4. Fix any type errors before committing | ||
|
|
||
| D = Steep::Diagnostic | ||
|
|
||
| target :lib do | ||
| # Core files with RBS signatures (alphabetically ordered for easy maintenance) | ||
| check "lib/react_on_rails.rb" | ||
| check "lib/react_on_rails/configuration.rb" | ||
| check "lib/react_on_rails/controller.rb" | ||
| check "lib/react_on_rails/git_utils.rb" | ||
| check "lib/react_on_rails/helper.rb" | ||
| check "lib/react_on_rails/packer_utils.rb" | ||
| check "lib/react_on_rails/server_rendering_pool.rb" | ||
| check "lib/react_on_rails/test_helper.rb" | ||
| check "lib/react_on_rails/utils.rb" | ||
| check "lib/react_on_rails/version_checker.rb" | ||
|
|
||
| # Specify RBS signature directories | ||
| signature "sig" | ||
|
|
||
| # Configure libraries (gems) - Steep will load their RBS signatures | ||
| configure_code_diagnostics(D::Ruby.default) | ||
|
|
||
| # Library configuration - standard library gems used by checked files | ||
| library "pathname" | ||
| library "singleton" | ||
| library "logger" | ||
| library "monitor" | ||
| library "securerandom" | ||
| end | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's not have to maintain this list, just iterate over all files in
liband check for each if it has a signature insig.