da1nerd / prism

A 3D game engine written in crystal
https://prism-api.netlify.com/
MIT License
95 stars 4 forks source link

patch baked file system #79

Open da1nerd opened 4 years ago

da1nerd commented 4 years ago

The nightly builds are failing because IO.write now returns the number of bytes written. The writer at https://github.com/schovi/baked_file_system/blob/master/src/loader/string_encoder.cr#L20 is not returning the number of bytes.

da1nerd commented 4 years ago

at first glance we could just return slice.size, however, it's not always writing everything in the slice. Also, I'm not sure what going on here https://github.com/schovi/baked_file_system/blob/master/src/loader/string_encoder.cr#L37

da1nerd commented 4 years ago

this to_s method is deprecated https://github.com/schovi/baked_file_system/blob/master/src/loader/string_encoder.cr#L39.

See https://crystal-lang.org/api/master/Int.html#to_s(base:Int,io:IO,upcase:Bool=false):Nil-instance-method

This is writing the string to the IO as an uppercase. we'll need to count that as well.

da1nerd commented 4 years ago

I think there is some gzip stuff that needs to be updated as well.

da1nerd commented 4 years ago

There's already a PR open for this https://github.com/schovi/baked_file_system/pull/36

da1nerd commented 4 years ago

The core feature that caused this break is being reverted. See https://github.com/crystal-lang/crystal/pull/9469