Is there a way either to tell the scala compiler to make all generated objects serializable - or at least all objects which are referenced as members of a serializable object, or at a minimum to check that if an object extends Serializable that all member objects (right down the tree) are also serializable?
Currently you do not find out until run time which is less than ideal…
Is this something that a macro could enforce? If so has anyone written such a macro?
This will become more important as with Java 9 Field.setAccessible is being deprecated and by all accounts it is due to be removed in Java 10. This will make rolling your own serialization much more difficult, and many of the existing external serialization methods rely on using Field.setAccessible. One of the reasons why people use non-native serialization is to avoid having to decorate all their objects.