Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
serializing "package_version" object causes infinite recursion #37
The following R code causes RProtoBuf to infinitely recurse:
x <- package_version("1.2") RProtoBuf::serialize_pb(x)
I did some digging and it looks like when this is because when sub indexing the list, the list returns itself:
x <- package_version("1.2") identical(x,x[]) > TRUE
Perhaps in these situations, we should call unlist?
The package_version object is a funny one. For kicks, can you check what happens with these two:
I presume these travel fine. I am not quite where we'd have to go to stop the recursion. But your suggested check is a good one. If you have time to dig ...