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
There should a way to save file compatibility information. Currently, there isn't a reliable way to tell which version of Potku was used to create/edit a request. This is problematic when there are backwards incompatible changes to file formats.
Types of files that are affected:
settings
presets
data
A simple solution would be to add a version field to files. It could use the date of the latest file format change for its value. The version field would then be checked whenever a file deserialized. If the version of the file doesn't match, the user can be warned about this with a proper message (e.g. f"'.profile' settings file version '{file_format}' is not compatible with '{self.FILE_FORMAT}'.").
The text was updated successfully, but these errors were encountered:
Issue #46 is relevant here too. What I recommend is always saving the (hypothetical) version number of Potku for each file. When opening files (possibly in the future) it can be determined from the version number how to handle the file: version specific deserialization (good for small changes, difficult to maintain in the long term), falling back to defaults (when new features are added) or whether to warn or fail (compatibility is intentionally broken).
The files can of course have their own version numbering, but this becomes only relevant if the files are used outside Potku.
There should a way to save file compatibility information. Currently, there isn't a reliable way to tell which version of Potku was used to create/edit a request. This is problematic when there are backwards incompatible changes to file formats.
Types of files that are affected:
A simple solution would be to add a version field to files. It could use the date of the latest file format change for its value. The version field would then be checked whenever a file deserialized. If the version of the file doesn't match, the user can be warned about this with a proper message (e.g.
f"'.profile' settings file version '{file_format}' is not compatible with '{self.FILE_FORMAT}'."
).The text was updated successfully, but these errors were encountered: