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
Change design to "operation mode" #33
Comments
This is something that I considered during the initial design, but I think it would create too tight of a coupling between version-like tags and the output version. For example, right now, you could have a tag like |
But you could still preserve that with one "custom" operation mode, where the regexp is required. Also you could support different operation modes for in and out. I.e. you could use custom for in and PEP 440 for out. However that'd have its own challenges, as different version systems have different parts. For example, you cannot convert a PEP 440 with epoch to a semver. |
You could describe the current functionality as having a single in-mode ( |
Yes, PEP 440 epoch is not supported AFAIK. Although probably it could be supported by just adjusting the regexp a little bit more and adding the new epoch concept to it. |
After seeing the way dunamai is done, and problems like #32, I think there's a conceptual problem: it tries to have an input regexp to rule them all. IMHO if I'm parsing a PEP440 project, dunamai should instead:
packaging.version.Version
.dev{commit_number}+{commit_hash}
as needed.Which of course doesn't make any sense if I'm on a semver project.
This would make its behavior more predictable, and it would save dunamai from maintaining the correct regexp (it won't work as a drop-in for dunamai, BTW).
So, instead of an input regexp and an output format, dunamai should just have a mode of operation, which affects both input and output.
The text was updated successfully, but these errors were encountered: