ruby / gem_rbs_collection

A collection of RBS for gems.
MIT License
247 stars 101 forks source link

globalid: Use `top` instead of `void` to avoid error on RBS v3.3 #486

Closed pocke closed 7 months ago

pocke commented 7 months ago

The globalid RBS raises an error on rbs validate with RBS v3.3 because RBS v3.3 does not allow void as an argument.

$ rbs _3.2.2_ -I gems/globalid/1.1/ validate --silent
$ rbs _3.3.0_ -I gems/globalid/1.1/ validate --silent
gems/globalid/1.1/globalid.rbs:36:15...36:32: `void` type is only allowed in return type or generics parameter
gems/globalid/1.1/globalid.rbs:47:24...47:126: `void` type is only allowed in return type or generics parameter

By this change, rbs validate does not display this error.

$ rbs _3.2.2_ -I gems/globalid/1.1/ validate --silent
$ rbs _3.3.0_ -I gems/globalid/1.1/ validate --silent

Close #473

tk0miya commented 7 months ago

Thanks! I missed your comment https://github.com/ruby/gem_rbs_collection/pull/473#issuecomment-1805133266. So this is very helpful :-)