This issue is intended to be complimentary to #2173779: Update DrupalorgVersioncontrolLabelVersionMapperGit for semantic versioning in Drupal 8, though they may end up altering some of the same regexes. It's also intended to be more focused and short-term than the discussion going on in #1612910: [policy, no patch] Switch to Semantic Versioning for Drupal contrib extensions (modules, themes, etc), which is a pretty major bikeshed.
Over in the Aegir project, we'd very much like to be able to #2168955: switch to semantic versionning. We're fine with 7.x-3.x.y for the time-being, and 8.x.y-4.x.y (or whatever) down the road. In #2170443: [meta] Create a plan for implementing semantic versioning for core, webchick posted a list of places where changes may be required to support re-numbering the Drupal core version. Some subset of these will need work to support semver for contrib.
I'll post a patch shortly that allows semver for contrib in DrupalorgVersioncontrolLabelVersionMapperGit. I've also looked through Update Status module, which shouldn't require any modification for this. I'll keep working through the list, and post any relevant findings here (unless a meta issue for this is in order.)
Tasks
- ✅ Done - Deploy https://git.drupalcode.org/project/versioncontrol_project/commit/cf52b05
- ✅ Done - Make the changes to
DrupalorgVersioncontrolLabelVersionMapperGit& deploy. - ✅ Done - Build something to prevent conflicting versions.
- #3104684: Update project_composer_get_project_namespace() to handle semver releases without $api_tid
- #3110860: Allow restricting “supportable” branches,
$conf['project_release_supportable_branch_pattern'] = '/^(.*\.x-|\d+\.)\d+\.$/'; - ✅ Done - https://www.drupal.org/project/semver_example - Make an example project with a variety of legacy and semver releases including: 8.x-1.x-dev, 8.x-1.0, 2.x-dev, 2.0.0, 2.1.x-dev, 2.1.0-beta1
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | drupalorg-allow_contrib_semver-2189131-1.patch | 2.47 KB | ergonlogic |
Comments
Comment #1
ergonlogicPatch attached.
Since, I don't have a full testing environment, I tested like so (with a couple dsm()'s):
While this was sufficient for this very limited component, the entire packaging system wouldn't be so easily fooled. I'll look into getting some more complete testing environment in place. A pointer towards documentation for that would be greatly appreciated.
Comment #2
ergonlogicI grepped (via the git-web browser) the code of all the modules I could think might be relevant, looking fot the string 'version_patch'. Presumably this would be used to access the relevant data set in DrupalorgVersioncontrolLabelVersionMapperGit.
It doesn't appear in any of the following:
drupalorgmodulesdrupalorg_drushdrupalorg_crosssiteapidrupalorgdocumentationinfrastructureproject_issueversion_controlversioncontrol_gitproject_solrapiupdate_test_moduleproject_dependencyproject_issue_file_reviewproject_git_instructionsdoobiegit_deployHere are the places where it did come up:
I probably missed some, so feel free to post other projects I should look at. But I guess my next step is to evaluate each of the items on the latter list, and see whether they need patching to accommodate semver for contrib.
Comment #3
drummdrupalorg_testing is not maintained.
The best way to check around the codebase is to use the actual codebase on a dev site, https://drupal.org/node/1018084. These aren't properly integrated with a Git daemon, so they aren't good for actual testing yet.
For testing, we have just have git7staging for now. This should follow after #2173779: Update DrupalorgVersioncontrolLabelVersionMapperGit for semantic versioning in Drupal 8 since that is a blocker for Drupal 8.0.0.
Comment #4
dwwNote: aegir isn't a module and shouldn't have Drupal module versioning at all. That's yet another case for #322626: META: Package and version non-modules for download, not this.
I still don't think semver makes sense for Drupal modules, but that's to discuss at bikeshed-o-rama #1612910: [policy, no patch] Switch to Semantic Versioning for Drupal contrib extensions (modules, themes, etc), not here.
Until that's resolved, it's pointless to have this issue active, lest we risk forking the discussion/debate.
That said, thanks for the patch!
Cheers,
-Derek
Comment #5
drummComment #7
drummWith #3104912: Swap storage of version minor & patch almost done, I do not think this is blocked on anything.
This will be full semver option, without an API compatibility component. Legacy version numbers should still be supported, without any additions.
For Composer, 8.x-… and semver releases will be mixed in the same Composer endpoint, duplicate version numbers should be prevented. As in, if
8.x-1.2exists, you can not make a1.2.0release. The whole major version used for legacy version numbers should probably be considered off-limits for semver, so there are less edge cases for version number comparison.Comment #8
drummComment #9
drummAdd tasks to issue summary.
Comment #11
drummThe first two tasks are done, Drupal.org now has some ability to handle contrib semver version numbers, once we enable them.
Adding #3104684: Update project_composer_get_project_namespace() to handle semver releases without $api_tid, since not having an API compatibility walks straight into this.
Comment #12
drummComment #14
drumm“Build something to prevent conflicting versions” is ready to go now. All semver releases for a project must have a major version higher than the highest
8.x-*major version; and all new8.x-*releases will need to have a lower major versions than the lowest semver major version.This means if you have a fresh project and release
1.0.0, you can’t go back and release8.x-1.0.I also updated the issue summary with another restriction tedbow discovered we should have:
Comment #16
drummI moved the last addition to #3110860: Allow restricting “supportable” branches
Now is a good time for version number requests for the test project.
Comment #17
drummBoth #3104684: Update project_composer_get_project_namespace() to handle semver releases without $api_tid & #3110860: Allow restricting “supportable” branches are now deployed. I believe making the example project is the only remaining task.
Comment #18
drummThe example project now exists: https://www.drupal.org/project/semver_example/releases
Comment #19
dwwFantastic! Great work, @drumm.
Might make sense to make myself and @tedbow maintainers for https://www.drupal.org/project/semver_example so we can tag other releases as needed for various update.module testing scenarios?
Thanks again,
-Derek
Comment #20
andypostLooks https://twitter.com/drupal8modules can't parse new versions
Comment #21
drummtedbow is already a maintainer, and I’ve just added you. It is easy to opt-in a handful of projects, if we need another test from scratch.
Comment #22
drummThat Twitter account is in no way official. Their profile says
And the “8” in the name will become increasingly inaccurate too, anyway.
Comment #23
dww@drumm:
Re: #21: Thanks!
Re: #22: Yup. ;)
Cheers,
-Derek