Is there ever a syndrome that you can spend several hours on a problem like this, and you solve it a few minutes after asking the StackOverflow question?
It turns out that, thanks to the details specific to the compiler , such a sealed trait will not know its direct subclasses until there is a point in the file where it is defined. So, in this case, I defined the trait and its cases after the main method, where the upickle will do its macro extension and magic. At the moment, he will not know about cases of signs. If the main method moves in the same file after defining the attribute and its cases, it will work.
Jean-philippe pellet
source share