Closed bcardiff closed 4 years ago
Yeah, it'll require a little bit of thought to have it returning the actual bytes written efficiently. This works for now
@stakach I see that there is already a branch revert-io-write-size. Be aware that reverting it completely will prevent usage 0.35.0. Your call, I'm just raising awareness.
thanks, I'll see if I can keep it compatible with both
In Crystal 0.35
IO#write
is supposed to return the written bytes. This propagates down toObject#to_io
.I didn't track how to get the information in bindata implementation. Since this is new feature no other shard is using it right now. I needed this patch to have a working version of https://github.com/crystal-community/jwt
Related to changes in shards 0.11 I recommend adding a crystal property in the shard.yml to state which crystal version are expected to be used with this shard.
If compatibility with older versions is wanted {% if compare_versions(Crystal::VERSION, "0.35.0-0") >= 0 %} can be used.
Feel free to close the PR and use it as input for an actual 🙈 migration.