Open zverok opened 3 months ago
- How to describe that in RBS syntax?
It would be using an interface that’s along the lines of
interface _Addable[T]
def +: (T other) -> T
end
@sampersand has ongoing interest in interfaces [P.S. and Ruby core RBSs in general] like this; it’d be conveient to coördinate this addition with him.
- How to adjust RBS
core/range.rbs
to specify that the signature was changed between 3.3 and 3.4?
RBS files doesn’t have Ruby versioning currently and the latest versions only track the latest Ruby release. However, release notes include statements on updating Ruby version and links to PRs.
- How to proceed with those two PRs (into Ruby itself and into rbs)?
Soutaro released RBS 3.4 nearing Ruby 3.3’s release as the new bundled version.
I say, proceed with the Ruby side first.
RBSs in this repo (or at least those for the Ruby core) also include a copy of Ruby’s docs; so if the Ruby doc mentions using #+
during Ruby 3.4’s preview, it gives Soutaro time to update the docs here for an accompanying RBS release.
I say, proceed with the Ruby side first.
I see. My concern here is that due to this “incompatibility”, the core Ruby CI is red (the test-bundled-gems
task), therefore if I’ll merge it into the main branch, then it would be red for everybody till the rbs would be adjusted.
So I am looking for a way to mitigate it.
@zverok Thank you for letting us know the change.
How about using rbs_skip_tests in Ruby repo to put your change there? You can skip tests of RBS gem in Ruby repo, and then we can update the RBS tests.
@soutaro Thank you for your help! :pray:
I used rbs_skip_tests solution, and now the PR is merged :tada:
This is a PR to support this change in Ruby: https://github.com/ruby/ruby/pull/7444 (the design is approved by Matz, and the code itself is approved by the Ruby core team).
I am not sure how this actually should be addressed, so I will be thankful for any advice.
Basically, the essence of the change is that:
Ruby#step
’s type signature wasstep(Int step?)
step(Addable step)
, withAddable
being such thatRange#begin + step
will work and produce the next value.So, my questions are:
core/range.rbs
to specify that the signature was changed between 3.3 and 3.4?Please advise :pray: