Skip to content

Commit

Permalink
Update Serialization.jl to fix Issue #45362
Browse files Browse the repository at this point in the history
Inserted a warning for a less than case of data version to complement error for greater than case. Modeled language after doc language update in issue JuliaLang#45368
  • Loading branch information
davpayne authored Aug 1, 2023
1 parent 7b587ac commit 269ae0d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions stdlib/Serialization/src/Serialization.jl
Original file line number Diff line number Diff line change
Expand Up @@ -742,6 +742,10 @@ function readheader(s::AbstractSerializer)
if version > ser_version
error("""Cannot read stream serialized with a newer version of Julia.
Got data version $version > current version $ser_version""")
elseif version < ser_version
@warn("""Got data $version < current version $ser_version.
It is recommended that a common Julia version is used.
Unexpected behavior may result otherwise.""")
end
s.version = version
return
Expand Down

0 comments on commit 269ae0d

Please sign in to comment.