crystal icon indicating copy to clipboard operation
crystal copied to clipboard

API breakage with IO::Evented#evented_read

Open MistressRemilia opened this issue 8 months ago • 13 comments

Crystal v1.12.2 and previous has this for the signature:

def evented_read(slice : Bytes, errno_msg : String, &) : Int32

But the current trunk as of time of writing (commit [a1db18c3b8ca68dca0481b3622c04107321eb5be]) has this signature:

def evented_read(errno_msg : String, &) : Int32

The change is totally understandable (slice is pointless in the older version, it's just yielded again), and is technically not that big of a deal... but the removal breaks the API despite the semantic version major number not increasing, which looks bad and necessitates populating code with silly {% if compare_versions(Crystal::VERSION, "1.13.0") <= 0 %} calls.

MistressRemilia avatar Jun 24 '24 21:06 MistressRemilia