Open Naikless opened 2 years ago
The serialization format between versions is not stable and thus mixed version are not supported (see https://docs.julialang.org/en/v1/stdlib/Serialization/).
I think what would be a great addition is during initial connection to check that the Julia version is the same and otherwise error.
Thanks for clearing this up!
At the very least this should be mentioned in the documentation of the Distributed module where I currently couldn’t find any hint about these kind of issues.
For someone not as familiar with the inner workings of the remote function calls this is especially confusing, because Julia in general claims to be mostly compatible for all 1.x versions.
because Julia in general claims to be mostly compatible for all 1.x versions.
The code you write is mostly backward-compatible. Communication between different processes, which is the problem here, is a different matter.
I think what would be a great addition is during initial connection to check that the Julia version is the same and otherwise error.
It might be sufficient to improve the error message. Since https://github.com/JuliaLang/julia/pull/35376 introduced an explicit check for binaries coming from a Julia version higher than the local one, this could be extended to only allow the same version. However, the above conversation at least indicates that backward compatibility should be expected.
The code you write is mostly backward-compatible. Communication between different processes, which is the problem here, is a different matter.
Yes, I see that now. However, I feel this is not reflected sufficiently in the documentation, so I filed PR https://github.com/JuliaLang/julia/pull/45368 to improve it.
Maybe instead of (or in addition to?) the Julia version we should check the serialization format version? https://github.com/JuliaLang/julia/blob/0f2ed77dca88785c9ae0fb1cf1a77593d1527c18/stdlib/Serialization/src/Serialization.jl#L82
As I said, that check already exists for future versions: https://github.com/JuliaLang/julia/blob/0f2ed77dca88785c9ae0fb1cf1a77593d1527c18/stdlib/Serialization/src/Serialization.jl#L742
I would probably either
Does this still need to be worked since JuliaLang/julia#45368 is merged? If so, I'm thinking of just adding an elseif warning to Serialization.jl for a less than version to put in practice what @Naikless suggested
My PR only addressed the documentation. If the checks are still the same, I believe this could still improve error identification.
As described already here, running
on a host with Julia 1.6.1 and connecting to a remote with Julia 1.7.2 leads to
However, when I use Julia 1.7.2 instead of 1.6.1 on the host, everything works as expected. Both systems run CentOS 7.