crystal
crystal copied to clipboard
API breakage with IO::Evented#evented_read
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.