haskell-mafia / mismi

Haskell library for AWS
BSD 3-Clause "New" or "Revised" License
22 stars 5 forks source link

`s3 read` semantics #341

Closed olorin closed 8 years ago

olorin commented 8 years ago

s3 read is pretty savage - it's designed for reading text objects, but assumes they don't have a line terminator at the end? I would argue that an object with no terminating newline isn't a text file, it's binary data which happens to be in ascii/utf8/whatever. This is certainly mitigated somewhat by the existence of s3 cat, but it'd be nice to have a utf8-handling human-oriented read which doesn't assume its input isn't a valid text file.

Are there hysterical raisins such that everything will break if we remove the extra newline, or any other objections to changing s3 read to just decode utf-8 and print it?

olorin commented 8 years ago

s3 read may be in use by some old scripts. For now, we will deprecate it.

ref https://github.com/ambiata/mismi/pull/340#issuecomment-265665717