-
Notifications
You must be signed in to change notification settings - Fork 471
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch to Calendar Versioning #2251
Comments
+1 for this. I read about Calendar Versioning and think Yazi fits well with the Ubuntu example it describes:
Yazi consists of several functional submodules (plugin system, I like the idea of pinpointing version numbers down to the day, like --- @minVersion 25.01.27
return {
entry = funcion() end
} Before running a plugin, Yazi can check for this requirement and notify the user in a more user-friendly way if they need to upgrade. The |
I just tried it, and it seems like cargo doesn't support it very well:
I checked how Helix does it - their |
See helix-editor/helix#12414. Cargo doesn't support leading zeros, as that error says. The only place that uses the non-leading-zero padded version is Cargo, and the command line |
The Yazi version on crate.io will not have zero padding which will be inconsistent with the versions in other distribution packages, Helix hasn't released it on crate.io, so this isn't really an issue for them, but Yazi does |
--- @minVersion 25.01.27
return {
entry = funcion() end
} If I understand the implications here correctly, you will also need a way in plugins to check for the For that sort of thing you probably want to have some system in place. Either it's well documented at what calver you deprecate lua api functions. Or you come up with some smarter idea to solve this problem. Maybe you just keep around dummies for all deprecated lua api functions and show a nice error message to the user that the plugin is outdated (maybe you do that already :D). Then it's not on the plugin author to keep track of that. However the user only finds out if the plugin works with their version after they have installed and used it, unfortunately. The way I see it, that problem can only be solved if the plugin author keeps track of the max version, though. |
What? Regular releases would still happen at the same pace, just the number would be different. It isn't like release notes are disappearing either 😅 |
I'm not sure if If it is necessary, using semantic versioning would definitely make it easier. The plugin could simply specify something like Then, we would just need to ensure that the Yazi plugin API doesn't change in 0.4, or perhaps create an internal version number for the plugin system (and any subsystems). For example, Yazi could be at version 0.4, and the plugin system could be at 0.18, indicating the 18th major change. However, this would undoubtedly add more maintenance overhead, as it would require keeping track of multiple version numbers. |
Not talking about release pace here. Sorry if this is not helpful. Just tell me I'll stop. My point is basically this: There is an implicit tradeoff when choosing calver over semver, iff you break backwards compatibility. If the lua API breaks backwards compatibility ever, then some plugins will stop working. If the plugin author is not around to notice that their plugin stopped working due to a breaking change, they won't adapt their plugin. They won't make it comply to the changed API nor will they add a max version guard nor will they add a note to the readme. The user will then install a plugin, expect it work, to find out it doesn't. Without a max version check the error the user gets will be confusing. With semver you can prevent this, because the plugin author can write a max version guard into their plugin at the time they create it and if the plugin breaks, semver will protect the plugin from being executed, catching the error early, helping the user experience. When using calver, you could also get around this issue by simply saying, every time you break the lua API, you keep the deprecated functions around, but calling such a broken/deprecated function from Lua will result in a user friendly error. Telling the user what plugin is broken and why. Neither semver nor this workaround solve the greater issue that users will sometimes install plugins that don't work any more and that your plugin eco system will shrink a little every time you break backwards compatibility, since you lose the functionality of some unmaintained plugins. All those issues would go away if you never break backwards compatibility. But that brings with it other problems of course. Edit: also I wanna emphasize that I'm not advocating for either semver or calver here. I just wanna point out some tradeoffs they bring with them. |
yazi --debug
outputPlease describe the problem you're trying to solve
I think Calendar Versioning (CalVer)](https://calver.org/) would make a lot of sense for a project like Yazi. With Yazi making breaking changes most releases, Semantic Versioning (SemVer) doesn't really make much sense. For example, see Helix, where they release every ~4 months using CalVer: https://github.com/helix-editor/helix/releases - so the versions look like 24.07 and 25.01.
Would you be willing to contribute this feature?
Describe the solution you'd like
Release the next version using Calendar Versioning.
Additional context
It could look like (assuming it was released today): 2025.01.27 (YYYY.MM.DD), 2025.01 (YYYY.MM), 25.01 (YY.MM, what Helix uses as mentioned above), 25.01.27 (YY.MM.DD), etc. If a format without the day as the third number (e.g. YY.MM) is used, another digit can be added for subsequent versions in the same month. So versioning might go like 25.01 (one release in January), 25.01.1 (another January release), 25.02 (now a release in February), 25.02.1 (another February release), 25.02.3 (yet another February release), 26.4 (a release in April of the next year), etc...
Checklist
The text was updated successfully, but these errors were encountered: