On 29.05.2025 17:42, ichthyo wrote:
On 28.05.25 10:38, Will Godfrey wrote:
I don't think we need to give any warning when loading an older version.
I can't think of any occasion where we've lost any settings as a result.
Where the file version is newer than the instance version,
the warning should be that re-saving would lose some information.
These proposals together seem to indicate a good path to handle this issue.
One additional aspect however is that we try to /migrate/ an incompatible
config automatically by re-saving. This might not be a good idea in case
of a newer config loaded into an older version.
Taking those points into account, I now did the following changes
- implement a more fine-grained compatibility logic.
See Config::is_compatible(VerInfo)
* only revision differs => compatible
* other version is newer => incompatible
* both have same major: silently accept any lower minor
* when current-Yoshimi is a major-bump: accept 1 major back
One question: What do you mean exactly with "accept 1 major back"?
Accept silently? Or accept, but warn?
The reason I ask is that if we bump the major version, it is likely
because we introduce some kind of incompatibility. So I reckon this case
should always be warned about. If we know exactly what the
incompatibility is, we could perhaps point to more info, or create some
custom code for dealing with that specific issue. But we won't know what
it is until we come to that point.
* else mark any earlier major as incompatible
And if it is incompatible, what happens? I reckon it must still be
possible to load it, to the extent possible, but with big fat warnings.
So is there really any difference between one version apart or several
versions apart?
- only take any action if this check cadence indicated incompatibility
- for the migration, we now additionally check if the loaded config
was from a newer version. In this case we warn only, but don't
automatically save it any more
I'm somewhat skeptical of automatically resaving in general. If the
config is compatible enough not to require any warnings, then resaving
is unnecessary, since loading it again later will produce the same
results. This also makes it easier to try out a new version without
committing to it right away. And if it does require warnings, I think it
should be up to the user to decide to save the new one.
- Improved the message at GUI start-up to include the actual
version numbers involved, and to differentiate if the config
was auto-saved, or if (for newer config) we should even
warn to be careful with saving.
Indeed.
--
Kristian
_______________________________________________
Yoshimi-devel mailing list
Yoshimi-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/yoshimi-devel