-
Notifications
You must be signed in to change notification settings - Fork 92
NodeSeq.Empty is not serializable #154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
It's a good question. I'm not sure there is. For completeness, How are you coming across this? I presume you're loading XML, and then writing code that is filtering stuff out that is generating |
Lift uses It turns out this problem is more than just I simply marked |
After looking at this a bit, I'm not sure serialization ever worked given both this defect and possibly others. I have hard time believing this, since there is at least a semblance of serialization sprinkled around the library including some basic tests of its function. I worry that supporting serialization may have consequences, but I suppose most people using it will know and accept the risks. |
I've fortunately or unfortunately (not sure which LOL) been exposed to java serialization often over the past decade, hence why I wasn't a bit hesitant to depend on it for a new feature for Lift. So if you have any specific questions or concerns, I can certainly help us discuss them and understand how everyone involved feels about fixing this issue. FWIW, the way you finish sums it up well. Serialization has its surprises, but if you're reaching for serialization you're ready to watch for them. Furthermore if we add As it stands today, the surprise is that most instances of What do you believe is the best due diligence to determine the best way to resolve this issue? I suspect I will eventually find any other corner cases as I ago (for instance, fixing |
Thanks for reporting this and contributing the fix. I've merged #155 and it will be in the next release, version 1.1.0. |
It appears that the typical use case of
NodeSeq
serializes with no problems (I'm speaking ofNode
, which we can see here is marked asSerializable
), but theNodeSeq.Empty
surprisingly doesn't. I would expect it to behave likeString
where the empty string is trivially serializable.Is there any reason that
NodeSeq
should not extendSerializable
? The offender in the case ofNodeSeq.Empty
could trivially be marked to extendSerializable
hereYou can see the behavior below in this console session. Note that java version details are printed at the end. This was run on a MBP running Sierra 10.12.6.
The text was updated successfully, but these errors were encountered: