These are chat archives for nrinaudo/kantan.csv

26th
Apr 2017
Nicolas Rinaudo
@nrinaudo
Apr 26 2017 14:25
@aroberts so I've just discovered that scala.Serializable and java.io.Serializable are two different classes, and that my decoders extend java.io.Serializable. Is it possible that you check for the later?
Nicolas Rinaudo
@nrinaudo
Apr 26 2017 14:36
mmm... no, that's not where it's from. Also, sometimes, Scala is really messed up
yeah, ok, got it.
Nicolas Rinaudo
@nrinaudo
Apr 26 2017 14:54
jesus, you've opened a real can of worms
Andrew Roberts
@aroberts
Apr 26 2017 15:00
I’m good at that
:P
closing is harder
Nicolas Rinaudo
@nrinaudo
Apr 26 2017 15:01
Working on that, but it turns out that a whole lot of decoders are not actually serializable
and that some will never be - the joda and java8 ones, for instance, cannot be (since they hold values of types that are not serializable)
Andrew Roberts
@aroberts
Apr 26 2017 15:02
oh, interesting
I didn’t have that problem with my homegrown java8 cell decoders
they only hold strings, though
Nicolas Rinaudo
@nrinaudo
Apr 26 2017 15:03
that's... weird
since they should hold some sort of DateDecoder, or however it's called in java8
and this is not serializable
Andrew Roberts
@aroberts
Apr 26 2017 15:04
oh, I use {Zoned,Local}DateTime.parse() with a set of format strings
and a function to handle epoch seconds
Nicolas Rinaudo
@nrinaudo
Apr 26 2017 15:04
oh right, you're not using the java8 module
Andrew Roberts
@aroberts
Apr 26 2017 15:05
oh, no, not the kantan one- I have weird requirements around date interpretation so I just write my own
it’s not too bad
Nicolas Rinaudo
@nrinaudo
Apr 26 2017 15:05
yeah ok, so in that case that makes sense
and none of the instances obtained through GeneratedRowDecoder are currently serializable either, although that's a weird corner case that I can easily work around
Andrew Roberts
@aroberts
Apr 26 2017 15:06
well that’s good news for me, at least
Nicolas Rinaudo
@nrinaudo
Apr 26 2017 15:06
I'd just like to write proper tests for that at the kantan.codecs level, so that I nuke this problem once and for all, and in all kantan libraries
Andrew Roberts
@aroberts
Apr 26 2017 15:56
sounds good to me
Nicolas Rinaudo
@nrinaudo
Apr 26 2017 15:56
I'm finding so many errors. I hate you a little bit, but thanks :)
Andrew Roberts
@aroberts
Apr 26 2017 16:02
:D
I’m a jerk
a true ally would have submitted a PR not an issue :P
Nicolas Rinaudo
@nrinaudo
Apr 26 2017 19:04
I'm quite glad you found it though, I would never have found it by myself and I wouldn't want people to write kantan.csv off because of this issue
Andrew Roberts
@aroberts
Apr 26 2017 19:05
totally - this would come up with all of the streaming frameworks
Nicolas Rinaudo
@nrinaudo
Apr 26 2017 19:05
exactly, none of which I use
(well, except for scalaz-streams / fs2, but they don't need Serializable)
Nicolas Rinaudo
@nrinaudo
Apr 26 2017 19:37
and obviously, all shapeless generated instances are non-serializable, and now my evening is shot.