You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, this tracker uses the Contracts gem. All the public API methods have type checking.
There are a couple of downsides to this. Users who have a Contract class or module in their codebase have a name clash problem. Also, a broken Contract throws an Error, not a warning - mistakes in setting up tracking can lead to RuntimeErrors. Perhaps it would be better to catch mistakes elsewhere in the pipeline?
Ruby 3 introduced a native type checking system called Ruby Signatures. Each .rb file can have a matching .rbs file where the type signature is defined. Although according to this JetBrains survey most Ruby users currently use Ruby 2.7, this is the future of Ruby so it would be great to migrate away from Contracts in favour of RBS.
The text was updated successfully, but these errors were encountered:
Currently, this tracker uses the Contracts gem. All the public API methods have type checking.
There are a couple of downsides to this. Users who have a Contract class or module in their codebase have a name clash problem. Also, a broken Contract throws an Error, not a warning - mistakes in setting up tracking can lead to RuntimeErrors. Perhaps it would be better to catch mistakes elsewhere in the pipeline?
Ruby 3 introduced a native type checking system called Ruby Signatures. Each
.rb
file can have a matching.rbs
file where the type signature is defined. Although according to this JetBrains survey most Ruby users currently use Ruby 2.7, this is the future of Ruby so it would be great to migrate away from Contracts in favour of RBS.The text was updated successfully, but these errors were encountered: