You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a property of an object has been converted from a system type (e.g. System.String) to an IObject, when deserialising from an old version, the property in question (if the old property is not null) deserialises as null, which is a valid value for an IObject, so deserialisation carries on as normal.
There is no check that the original value was not null. This leads to data loss as the deserialiser doesn't have mismatches on property types, so the upgrader for the object is not run, which means that explicit versioning upgrades are not applied unless there is some other issue with the object.
Steps to reproduce:
clone the LadybugTools_Toolkit repository, checkout LadybugTools_Toolkit-#296-SeparateSimulationFromPlotting and build, then clone Versioning_Toolkit, checkout the same named branch there and build. Then open the provided grasshopper script.
The FromJson method should return a SimulationResult, but the EpwFileFileSettings property will be missing FileName and Directory information.
Expected behaviour:
FileName and Directory should be set.
Test file(s):
Unzip this and make sure that both the json and gh files are in the same folder, then run the gh script: serialiser.zip
Description:
When a property of an object has been converted from a system type (e.g.
System.String
) to anIObject
, when deserialising from an old version, the property in question (if the old property is not null) deserialises as null, which is a valid value for anIObject
, so deserialisation carries on as normal.There is no check that the original value was not null. This leads to data loss as the deserialiser doesn't have mismatches on property types, so the upgrader for the object is not run, which means that explicit versioning upgrades are not applied unless there is some other issue with the object.
Steps to reproduce:
clone the LadybugTools_Toolkit repository, checkout
LadybugTools_Toolkit-#296-SeparateSimulationFromPlotting
and build, then clone Versioning_Toolkit, checkout the same named branch there and build. Then open the provided grasshopper script.The
FromJson
method should return aSimulationResult
, but theEpwFile
FileSettings
property will be missingFileName
andDirectory
information.Expected behaviour:
FileName
andDirectory
should be set.Test file(s):
Unzip this and make sure that both the json and gh files are in the same folder, then run the gh script:
serialiser.zip
@IsakNaslundBh
The text was updated successfully, but these errors were encountered: