Skip to content
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

youtube-dl versioning #30

Open
LucidOne opened this issue Aug 29, 2020 · 11 comments
Open

youtube-dl versioning #30

LucidOne opened this issue Aug 29, 2020 · 11 comments

Comments

@LucidOne
Copy link

So I'm trying to validate release versions for youtube-dl, but I'm a little lost how both 2020.06.16.1 and 2020.06.16 are valid versions. Does YYYY.0M.0D_MICRO match both or does it need some other notation?

@mahmoud
Copy link
Owner

mahmoud commented Aug 29, 2020

Oh, seems like they have an optional MICRO segment for patches that happen on the same day, so it'd be YYYY.0M.0D.MICRO. Not sure about extra notation to represent optional segments. I think omitting latter segments isn't so unforgivable when it's still reasonably compliant with the intent of the core version (YYYY.0M.0D) in this case.

@mbarkhau
Copy link

mbarkhau commented Aug 29, 2020

We could assume that no sane person would put parentheses in their version numbers and introduce something like YYYY.0M.0D(.MICRO). Of course this syntax would have to be restricted to suffixes, or you would have to define precedence.

This is also common with python versions which use release tags that are omitted when it is final as opposed to alpha, beta, etc.

@LucidOne
Copy link
Author

I'm not super picky on notation but one option might be something like YYYY.0M.0D<_MICRO>.
Either way I think calver could benefit from a more formal definition, as it will make automating release tracking easier.

@mbarkhau
Copy link

Off the top of my head, I can't think of a case where it would be an issue, but it should be noted that the <> characters are already used for version specifiers, e.g. pip install my-package<2020.8.29.

@mbarkhau
Copy link

@mahmoud can you clarify if you even want to specify something WRT. optional segments? Do you consider this within the scope of the calver.org project?

I also saw for example that WW is the week, but there are ISO calendar based weeks and US weeks (for strftime %W and %U respectively). Then I remembered we're talking about version numbers here, so it maybe doesn't matter and might be OK to not define it. Then again, if you have two different maintainers, it would be better if they use the same definition, IDK.

@mahmoud
Copy link
Owner

mahmoud commented Aug 29, 2020

I've been thinking about it and I think it would be nice to specify optional components. CalVer is meant to be practical, I think youtube_dl is doing something very practical indeed. Full date version by default, resolving collisions (multiple releases on the same date) by adding an optional counter.

I'm liking the parentheses for exactly the reason you outlined, @mbarkhau. That said, I think this is a Python bias, as I've become aware that some versions use () and [] to specify version ranges (exclusive/inclusive, as in math).

Weeks is a separate topic, I'd open another issue for a discussion there. :)

@mbarkhau
Copy link

I found at least one example where () and [] are also used for version specifiers: https://docs.oracle.com/middleware/1212/core/MAVEN/maven_version.htm#MAVEN8905

@LucidOne
Copy link
Author

I'm not sure it is aesthetically optimal, but I'm wondering if < and > make sense because they are already considered reserved for version comparison and it wouldn't make sense to compare version format specifiers.

ie. YYYY.0M.0D<.MICRO> < YYYY.MM.DD doesn't make sense, so there shouldn't be a conflict.

@mbarkhau
Copy link

mbarkhau commented Aug 30, 2020

Since all characters appear to be used in some version specifier syntax, perhaps that shouldn't be the deciding factor.

I've instead had a look at existing notation for optional parts/segments. After a brief survey, I'm leaning toward [ ]:

I did not find examples for another notation.

@LucidOne
Copy link
Author

I think there is some ambiguity regarding MICRO
I wonder if a 00MICRO notation is worth specifying.

@mbarkhau
Copy link

I don't think so. AFAICT these are synonyms: MICRO, PATCH and I don't think I have ever seen zero padding for them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants