prism icon indicating copy to clipboard operation
prism copied to clipboard

patch baked file system

Open da1nerd opened this issue 5 years ago • 5 comments

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 avatar May 24 '20 14:05 da1nerd

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 avatar May 24 '20 14:05 da1nerd

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 avatar May 24 '20 15:05 da1nerd

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

da1nerd avatar May 24 '20 15:05 da1nerd

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

da1nerd avatar Jun 10 '20 15:06 da1nerd

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

da1nerd avatar Jun 15 '20 08:06 da1nerd