Skip to content
This repository has been archived by the owner on Jan 16, 2020. It is now read-only.

Suggestion: switch to SemVer release naming #52

Open
Ocramius opened this issue May 28, 2018 · 3 comments
Open

Suggestion: switch to SemVer release naming #52

Ocramius opened this issue May 28, 2018 · 3 comments

Comments

@Ocramius
Copy link
Member

As per Roave/BackwardCompatibilityCheck#37 (comment) by @alcohol:

Composer does not strictly follow semver formatting. If you look at https://github.com/composer/semver (specifically, the tests) you'll see it is very similar but there are a few deviations for legacy reasons. I think the v prefix is the only prefix we support. The release- prefix is not supported btw, but it is stripped for legacy reasons AFAIK.

@weierophinney
Copy link
Member

We've been using release-X.Y.Z since, well, the very first public release, and continued that into ZF2; Composer added a rule to allow the release- prefix early on, because it was already our practice.

With the 2.5.0 release and breaking into components, we kept the release-X.Y.Z format as we were able to maintain the sha1 compatibility with existing composer.lock files if we did.

At the time, I made the following decision:

  • Keep the release-X.Y.Z for components already in the ZF tree or derived from existing components (e.g., zend-router, which was derived via a git subtree split operation).
  • Use X.Y.Z for any new components.

As such, we have >50% of our components currently using straight SemVer names, and around 50 or so on the old scheme.

We have a few options:

  • Keep things as-is. Tooling then has to adapt to what we do, or declare itself as incompatible with us.
  • Start using SemVer for new releases. This is problematic, however, as it's harder to sort by release name, and means we will revisit this over and over again as folks wonder why older tag names have the prefix.
  • Convert existing tag names to SemVer tag names; this has the very real possibility of breaking existing installations.
  • Duplicate existing release- tag names with those omitting the prefix. Sorting orders, duplication, etc. I have no idea how this would play with Packagist and Composer.

@Ocramius
Copy link
Member Author

Duplication of our tags should work quite okay, but I'll make sure that I ask first

@alcohol
Copy link

alcohol commented May 30, 2018

Well, we strip release- for legacy reasons (probably because you asked at some point if we can support your tags :P). And that isn't going to go away anytime soon. So basically, all your release-X.Y.Z tags are just considered as X.Y.Z tags. Adding proper Semver tags to those same references would probably result in unpredictable behavior as I am not sure how Composer would/could determine which X.Y.Z has precedence.

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

No branches or pull requests

3 participants