Remove call to Any#todo! from C parser#2249
Merged
soutaro merged 4 commits intoruby:masterfrom Jan 28, 2025
Merged
Conversation
Morriar
commented
Jan 21, 2025
lib/rbs/types.rb
Outdated
| @string || "untyped" | ||
| end | ||
|
|
||
| private |
Contributor
Author
There was a problem hiding this comment.
The private here is not required for the change to work but todo! shouldn't be called from clients.
This will impact the public API, maybe we should make a deprecation first?
Member
There was a problem hiding this comment.
Yeah, can you keep the method and print a deprecation message?
soutaro
reviewed
Jan 24, 2025
| class Any < Base | ||
| @string: String? | ||
|
|
||
| def initialize: (location: Location[bot, bot]?, ?todo: bool) -> void |
soutaro
requested changes
Jan 24, 2025
Member
soutaro
left a comment
There was a problem hiding this comment.
Looks good. The requested change is to keep the #todo! method public with deprecation.
d8b95cb to
b1656db
Compare
Contributor
Author
|
I removed the |
Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
b1656db to
8b80ea8
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
As we're trying to detangle the C parser implementation from Ruby, the call to
Any#todo!is problematic.Instead we can store a flag in the C structure and move this call to the Ruby implementation during the object initialization.