-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Labels
type:enhancementNew features or improvements to existing features.New features or improvements to existing features.
Milestone
Description
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.
paulboocock
Metadata
Metadata
Assignees
Labels
type:enhancementNew features or improvements to existing features.New features or improvements to existing features.