Conversation
Signed-off-by: Alexandre Terrasa <[email protected]>
| tree = parse_rbi(rbi) | ||
| assert_equal(rbi, tree.string) | ||
| assert_equal(<<~RBI, tree.string) | ||
| Foo = T.let(T.unsafe(nil), T.untyped) |
There was a problem hiding this comment.
Do we consider RBI files as documentation? Could this be a confusing change?
There was a problem hiding this comment.
Also, will this create huge RBI changes when it's adopted by Tapioca?
There was a problem hiding this comment.
Do we consider RBI files as documentation? Could this be a confusing change?
From RBI files what we really care about is the type (and accessorily the comment since we also extract it). I'm not sure the value as that much importance when it comes to document behaviour especially if the value is not a literal.
will this create huge RBI changes when it's adopted by Tapioca?
If you mean diff, yes. If you means API change for Tapioca to use it? Less.
|
Given it's a breaking change, can the description also include the benefits it will bring too? |
paracycle
left a comment
There was a problem hiding this comment.
I don't think this is a breaking change at all. The fact that we were including actual constant values in RBI files wasn't intentional and there should be nothing that relies on then being there.
Follow up on #408 (comment).
In the context of an RBI file, does it really make sense to hold the value of constants?
This PR proposes to change
Constso it only stores the type we find a theT.letif any.So this:
gives this:
This is quite a breaking change for the gem's API and should be released with at least a minor version bump.
I think we can apply the same logic to optional positional and keyword parameters 🤔