Problem/Motivation

  • Drupal 8 core introduces the concept of "experimental modules" that are not completely production-ready but that are included in core for testing.
  • Since these "experimental modules" are not considered stable and are not recommended for production use, it does not make sense to hold them to the same BC and patch release restrictions as stable code.
  • Experimental modules should be able to iterate quickly in core.
  • It should be clear to site builders and developers what state the experimental modules are in.

Proposed resolution

  • Give experimental modules their own versions, separate from core, so that they can be in unstable, alpha, beta, or RC separately from core.
  • Include these version numbers in the module's info.yml file and expose them on the Extend page.
  • The versions for these modules always begin with 8.y.x in D8 while they are experimental, to make it clear that they are of lower stability than the rest of core and versioned separately from any particular patch or minor release. Examples:
    • 8.y.x-alpha
    • 8.y.x-beta
    • 8.y.x-rc

    Optionally, we could designate specific multiple releases for the given stability in the future, e.g. 8.y.x-alpha3, but for now the suffix only indicates the level of stability/allowed changes and not any particular release.

  • migrate is marked alpha.
  • migrate_drupal is marked alpha.
  • inline_form_errors is marked alpha

Alternate proposal from #64

Use the same version scheme as contrib so that ModuleHandler::parserDependency() and drupal_check_incompatibility() work as expected.
Examples:

  • 8.x-0.x-alpha1
  • 8.x-0.x-beta1
  • 8.x-0.x-rc1

This also benefits from the fact that using this version number ModuleHandler::parserDependency() identifies the module's major version as 0. This means we are inline with semver which states the a major version of 0 has no bc promise. Which is the reality we are trying to get across.

Remaining tasks

User interface changes

Experimental modules display a different version number on the Extend page.

API changes

Version numbers for experimental modules change.

Data model changes

None.

CommentFileSizeAuthor
#97 96-97-interdiff.txt981 byteseffulgentsia
#97 2656994-2-97.patch8.43 KBeffulgentsia
#96 95-96-interdiff.txt1.17 KBeffulgentsia
#96 2656994-2-96.patch8.45 KBeffulgentsia
#95 92-95-interdiff.txt586 bytesalexpott
#95 2656994-2-95.patch7.82 KBalexpott
#95 92-95-interdiff.txt586 bytesalexpott
#92 2656994-2-91.patch7.81 KBalexpott
#92 87-91-interdiff.txt6.87 KBalexpott
#87 2656994-2-87.patch7.29 KBalexpott
#87 74-87-interdiff.txt8.53 KBalexpott
#74 2656994-2-74.patch8.16 KBalexpott
#74 71-74-interdiff.txt2.07 KBalexpott
#71 2656994-2-71.patch7.93 KBalexpott
#71 2656994.71-test-only.patch2.73 KBalexpott
#67 2656994-2-66.patch5.2 KBalexpott
#56 2656994-2-55.patch1.31 KBalexpott
#56 45-55-interdiff.txt1.32 KBalexpott
#45 interdiff-45.txt485 bytesxjm
#45 experimental-2656994-45.patch1.3 KBxjm
#37 experimental_versions.png43.58 KBxjm
#37 experimental_versions-2656994-37.patch1.31 KBxjm
#29 Extend___Site-Install.png43.55 KBxjm
#29 experimental_versions-2656994-28.patch1.31 KBxjm
#23 2656994-23.patch5.53 KBalexpott
#23 21-23-interdiff.txt1.33 KBalexpott
#21 2656994-21.patch5.53 KBalexpott
#21 20-21-interdiff.txt626 bytesalexpott
#20 2656994-20.patch5.47 KBalexpott
#20 18-20-interdiff.txt2 KBalexpott
#18 2656994-17.patch4.88 KBalexpott
#17 16-17-interdiff.txt891 bytesalexpott
#16 2656994-16.patch4.89 KBalexpott
#16 8-16-interdiff.txt3.48 KBalexpott
#8 interdiff-8.txt2.31 KBxjm
#8 experimental_versions-2656994-8.patch2.3 KBxjm
#8 Extend___Site-Install.png44.78 KBxjm
experimental_versions.patch1.31 KBxjm
experimental_module_versions.png44.93 KBxjm

Comments

xjm created an issue. See original summary.

alexpott’s picture

I think this looks great and would help satisfy the concern I raised in #2644818-7: Inline Form Errors Module Description

xjm’s picture

Issue summary: View changes
xjm’s picture

Issue summary: View changes
xjm’s picture

Component: base system » extension system
swentel’s picture

+++ b/core/modules/inline_form_errors/inline_form_errors.info.yml
@@ -1,6 +1,6 @@
-version: VERSION
+version: 8.1.0-unstable
 core: 8.x

Can't we do something like 'VERSION-unstable' so that we don't necessarily need to reroll this every minor release ? It would need a change in InfoParserDynamic though.

xjm’s picture

Assigned: Unassigned » xjm
Status: Needs review » Needs work
Issue tags: +Needs tests

That's a good idea. Adding something that-like.

xjm’s picture

Attached does that. Still adding tests.

Note that this results in version numbers like:

  • 8.1.3-beta in patch releases. (That's in line with @catch's suggestions.)
  • 8.1.0-beta in minor releases. That makes sense too.
  • 8.1.0-dev-beta for the dev branch. That looks kinda weird, but maybe it makes sense based on the pattern above.

Need to confirm whether or not that's a desired format for the version string.

Adding all the tags. We need subsystem maintainer signoff on the versions added for the particular subsystems, and then signoffs from the different committer groups since it affects all three.

benjy’s picture

For Migrate, I think beta makes sense for Migrate itself, especially while we're still exploring the plugin implementation. alpha is good for migrate_drupal which has missing D7 upgrade paths and migrate_upgrade which still requires some UX improvements and further testing.

tim.plunkett’s picture

As Form system maintainer, unstable for Inline Form Errors makes sense.

Untagging since @benjy covered the other two.

xjm’s picture

It occurs to me that this pattern would result in some very funny version numbers when core itself is in beta or RC, e.g.:
8.1.0-beta-beta
Hmmm. :)

swentel’s picture

Ha, yeah, that's a bit unfortunate, then again, one should never go in production with a alpha/beta core right ? ;)
It doesn't bother me /that/ much, but I'm not against the initial patch either, it was just a thought.

alexpott’s picture

Looks like we're going to need a new replacement. I was pondering whether we to provide MAJOR, MINOR and PATCH replacements but that seems extremely complex. What we need to is \Drupal::VERSION without the stability modifier. So perhaps "VERSION-" is a good enough way to indicate this.

catch’s picture

We could potentially remove the suffix from VERSION before adding the suffix - would just need to strip [a-z] of the end of it.

tstoeckler’s picture

Re #13: Actually I don't think that's very complex. In fact, we do some string parsing of \Drupal::VERSION to e.g. validate the core: 8.x declaration in moduels, etc. which would be a lot saner with something like \Drupal::MAJOR_VERSION. That doesn't mean that this issue should be the one to introduce that whole logic, but just saying that in general I think that would make a lot of sense.

alexpott’s picture

StatusFileSize
new3.48 KB
new4.89 KB

Unfortunately it is not possible to do proper testing without adding a method to InfoParserDynamic. But as this is for 8.1.x should be okay.

alexpott’s picture

Issue tags: -Needs tests
StatusFileSize
new891 bytes

Spelling mistake.

alexpott’s picture

StatusFileSize
new4.88 KB

oopsie

alexpott’s picture

So I guess with the patch in HEAD we have the issue that an experimental module could be ahead of core it terms of stability. I think in that case we should just change the string to version. Or we could get clever and compare the versions and use the most unstable.

alexpott’s picture

StatusFileSize
new2 KB
new5.47 KB

Here's a patch which makes it impossible for an experimental module to get ahead of core.

alexpott’s picture

StatusFileSize
new626 bytes
new5.53 KB
+++ b/core/modules/inline_form_errors/inline_form_errors.info.yml
@@ -1,6 +1,6 @@
-version: VERSION
+version: VERSION-unstable

Just a thought shouldn't this be -dev? Adding a test to ensure that unstable is less stable than dev...

swentel’s picture

+++ b/core/lib/Drupal/Core/Extension/InfoParserDynamic.php
@@ -38,8 +38,17 @@ public function parse($filename) {
+          // is VERSION-beta in the info.yml file the displayed version with be

s/with/will

alexpott’s picture

StatusFileSize
new1.33 KB
new5.53 KB

Wouldn't it be nice if the test runner told you've added a test that has not run :)

xjm’s picture

+++ b/core/tests/Drupal/Tests/Core/Extension/InfoParserDynamicTest.php
@@ -0,0 +1,70 @@
+      ['VERSION-dev', '8.0.x-beta12', '8.0.x-dev'],
+      ['VERSION-beta', '8.2.0', '8.2.0-beta'],
+      ['VERSION', '8.5.0', '8.5.0'],
+      ['Blah VERSION', '8.1.0-rc2', 'Blah VERSION'],
+      ['Blah VERSION-rc', '8.1.0-rc2', 'Blah VERSION-rc'],

So here we are missing like a beta-beta example.

If 8.1.0 is in beta, and the experimental module is in its own beta, do we care that those mean different things?

If 8.1.0 is in beta but we've moved the module to RC already, doesn't that imply that the experimental module is more stable than the rest of core? :P Or do we just solve that by not having experimental modules that are RC in a beta?

Edit: Sorry, I was looking at an earlier patch.

xjm’s picture

Assigned: xjm » Unassigned

So I actually think the logic in #23 seems okay.

xjm’s picture

Assigned: Unassigned » xjm

Discussed with alexpott; I'm going to make a couple of small additions for documentation and readability.

xjm’s picture

I was adding a few more test cases to document the expected behavior. So here is the scenario where I'm not sure this strategy works:

  1. As of 8.1.0, Migrate is in beta, so its version number is 8.1.0-beta.
  2. Immediately after 8.1.0, the Migrate version number is 8.1.x-beta in 8.1.x, 8.2.x-beta in 8.2.x.
  3. In the next patch release, its version number is 8.1.1-beta. Trick question: which is newer, 8.2.x-beta or 8.1.1-beta?
  4. Between 8.1.2 and 8.1.3, we decide Migrate is ready to be in RC, so its version number is 8.1.x-rc in 8.1.x, and 8.2.x-rc in 8.2.x, then 8.1.3-rc in the patch release.
  5. After the patch release, it is 8.1.x-rc and 8.2.x-rc again respectively.
  6. Concurrently with 8.1.4, we release a beta of 8.2.x which is named 8.2.0-beta. Migrate is then named 8.1.4-rc and 8.2.0-beta in those releases, respectively. Which version is newer, 8.2.x-rc or 8.2.0-beta? Is Migrate at this point still subject to RC rules, or are we again opening it up to beta rules?

This also leaves aside the possibility of marking multiple alphas or betas for those experimental modules, or having multiple betas or RCs for a core minor, which we might have occasion to do.

We might be able to solve some of this with policy, but it has the potential to be pretty confusing.

The last submitted patch, 21: 2656994-21.patch, failed testing.

xjm’s picture

Issue summary: View changes
StatusFileSize
new1.31 KB
new43.55 KB

Discussed with @webchick and @alexpott. We agreed that the magic would probably get too complicated and confusing, and they proposed using 8.x.x-suffix with the unstable versions. I tested with version_compare() and this guarantees that the experimental module's version is always considered lower than any core release. And, since the normal course will be for a module to be experimental only once in the 8.x life cycle before it becomes stable, the minor version should not matter, and this way we do not need to worry about updating it.

Updated patch reflects that instead. Also updating the screenshot in the summary.

We should double-check in any case that these experimental versions do not do something funky with the version reported with update status. If it works like we expect, they shouldn't, anyway.

xjm’s picture

Oh, right, that issue.

I did confirm that the individual modules' versions do not get picked up or reported by the Update module, so that's enough for this issue, anyway.

xjm’s picture

Oh, and to clarify #29. If Migrate is in RC while the relevant core minor is in beta, then it is still subject to RC rules, because the goal at that point is to stabilize it as quickly as possible. We'd take that into account when we decide to put something into beta or RC.

alexpott’s picture

As much as it was fun writing more magic into the extension system I have to agree removing all the magic and making it simple feels like a big win. And it's nice this doesn't break update status.

This approach has a +1 from me as a framework manager and I would also be happy to commit this to 8.0.x as well as 8.1.x.

Leaving at needs review to get release manager and product manager review.

xjm’s picture

Issue summary: View changes

Updating the summary to reflect that direction.

The last submitted patch, 16: 2656994-16.patch, failed testing.

The last submitted patch, 18: 2656994-17.patch, failed testing.

tim.plunkett’s picture

+++ b/core/modules/inline_form_errors/inline_form_errors.info.yml
@@ -1,6 +1,6 @@
+version: 8.x.x-unstable

Can these all be 8.y.x-whatever instead? the double x is making me twitch :)

xjm’s picture

Issue summary: View changes
StatusFileSize
new1.31 KB
new43.58 KB

xjm agrees because algebra.

xjm’s picture

Issue summary: View changes
xjm’s picture

This approach has a +1 from me as a framework manager and I would also be happy to commit this to 8.0.x as well as 8.1.x.

My concern with that was it would essentially downgrade the version in a patch release, which seemed prone to be disruptive. So I think it should only go into 8.1.x, along with all the other policy and UI changes related to experimental modules.

xjm’s picture

We should probably test this with module dependency checking and potentially add tests for what we expect to happen; see #2641658: Module version dependency in .info.yml is ineffective for patch releases. ModuleHandler::parseDependency() does not use version_compare(), with this inline comment:

          // Drupal considers "2.x" to mean any version that begins with
          // "2" (e.g. 2.0, 2.9 are all "2.x"). PHP's version_compare(),
          // on the other hand, treats "x" as a string; so to
          // version_compare(), "2.x" is considered less than 2.0. This
          // means that >=2.x and <2.x are handled by version_compare()
          // as we need, but > and <= are not.

The last submitted patch, 20: 2656994-20.patch, failed testing.

dries’s picture

I like this proposal but recommend that we drop the -unstable extension. To me, -unstable is ambiguous because -alpha and -beta releases for _experimental_ modules are all "unstable". It will probably not be clear to site builders whether -unstable is more or less stable than -alpha. I recommend we not add experimental modules unless they are at least alpha-quality. This way we can drop the -unstable tag. I believe that will be the easiest and clearest for site builders to understand.

xano’s picture

@alexpott mentioned using -dev in #21. As it's the tag we use everywhere else to indicate a module is unstable and has not entered its release preparation process, it seems fitting we use it here as well.

PS: I read through http://semver.org/ again when reviewing this proposal, and realized that I can only find A normal version number MUST take the form X.Y.Z where X, Y, and Z are non-negative integers with regards to valid characters in version numbers. Seeing as it says ...normal version number..., I would expect there to be another section that explains what a non-normal number may be, but I cannot find any such thing.

xjm’s picture

@alexpott mentioned using -dev in #21. As it's the tag we use everywhere else to indicate a module is unstable and has not entered its release preparation process, it seems fitting we use it here as well.

Thanks @Xano. We can't use -dev, because it is too close to (e.g.) 8.0.5-dev for stable core. We need to be able to make it obvious to site owners that the version is different from core, even in -dev branches of core.

xjm’s picture

Oh, one of the committers should have mentioned this sooner, but we did discuss before Mumbai and everyone agreed that Dries' proposal in #42 would work. So we have the signoffs needed for the attached.

Maybe alpha is a bit of a stretch for inline form errors? :) But it's reasonable.

We also agreed that for modules that were truly unstable that we wanted to have in core experimentally, we could mark them hidden. But we don't have any examples yet that would require that.

This does need tests for dependencies and version comparing since Drupal uses special flower code for it instead of just version_compare(). I'll look into that next using the test modules that have meanwhile been added in other issues.

xjm’s picture

Also made this update to the handbook page:
https://www.drupal.org/node/2657056/revisions/view/9367864/9425708

xjm’s picture

Status: Needs review » Needs work

Correct status given #45.

xano’s picture

Thanks @Xano. We can't use -dev, because it is too close to (e.g.) 8.0.5-dev for stable core. We need to be able to make it obvious to site owners that the version is different from core, even in -dev branches of core.

That makes sense. I missed that. Thanks!

My only concern is SemVer conformity. I do not expect this change has (m)any practical consequences, but it wouldn't be professional to not document this. If you agree, I'd be happy to do the writing. What would be a good place to document this? I couldn't find an existing handbook page yet.

xjm’s picture

My only concern is SemVer conformity. I do not expect this change has (m)any practical consequences, but it wouldn't be professional to not document this. If you agree, I'd be happy to do the writing. What would be a good place to document this? I couldn't find an existing handbook page yet.

The versioning is already documented on the handbook page linked above:
https://www.drupal.org/core/experimental

Did you mean something else? The -alpha, -beta, etc. qualifiers and our use of them is an existing pattern in Drupal, not something introduced in this issue. See:
https://www.drupal.org/documentation/version-info
and its child pages:
https://www.drupal.org/documentation/version-info/numbers
https://www.drupal.org/documentation/version-info/alpha-beta-rc

Edit: Also: https://www.drupal.org/node/1015226

xano’s picture

I see I haven't been clear about this. The SemVer docs say A normal version number MUST take the form X.Y.Z where X, Y, and Z are non-negative integers, while this patch uses letters for Y and Z. Technically, this seems to be an invalid SemVer version number. I understand we do this for a good reason, and my point is that we should document this deviation from SemVer. I was willing to write this, but I hadn't found a good place to do so yet. https://www.drupal.org/documentation/version-info/numbers looks like the right place though. Thanks for digging that up.

xjm’s picture

Edit: Never mind, I get it now. You mean the fact that it is 8.y.x-whatever, or that our development versions are 8.0.x-dev, rather than 8.0.0-whatever etc.

xjm’s picture

Based on @alexpott's feedback in #2625696: Make migrations themselves plugins instead of config entities, he is not comfortable with Migrate being marked beta without that fixed (and I am not comfortable with it being marked beta without the followups for it being fixed along with it). So need to swap that to alpha.

Also, after reading in core/tests/Drupal/Tests/Core/Extension/ModuleHandlerTest.php, it looks like we currently do not support -beta etc. with no integer suffix. It's also inconsistent with the tagging requirements for projects, which according to https://www.drupal.org/node/1015226 must have the integer suffix. So we can call all three things alpha1 for purposes of this issue, and then increment them as we see fit going forward.

xjm’s picture

Also, need to double-check on the changed stability with the subsystem maintainers.

benjy’s picture

+1 for alpha for migrate

alexpott’s picture

Status: Needs work » Needs review
StatusFileSize
new1.32 KB
new1.31 KB

Here's a patch making migrate alpha and adding a number to everything.

xjm’s picture

Status: Needs review » Needs work
Issue tags: -Needs subsystem maintainer review

Thanks @benjy!

Still needs tests.

alexpott’s picture

@xjm - what do we need to test exactly? What is wrong with core/tests/Drupal/Tests/Core/Extension/ModuleHandlerTest.php?

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.0-beta1 was released on March 2, 2016, which means new developments and disruptive changes should now be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

xjm’s picture

@alexpott, nothing is "wrong" with it, but it provides no test coverage for this change in our versioning policy. There are no tests for 8.y.x-anything, with an actual y and x, which has never been an allowed version string before. We also need to test that (e.g.) stable 8.1.0-beta1 is considered later than 8.y.x-rc1, for modules that try to declare dependencies, because (as stated above) we don't actually use version_compare() everywhere, so our earlier tests of the PHP function were irrelevant.

xjm’s picture

Version: 8.2.x-dev » 8.1.x-dev

I think we should still consider this change for 8.1.x up to the RC, since it only impacts experimental modules, and since it has important release management implications.

alexpott’s picture

@xjm we do use version_compare() everywhere to compare versions to each other - we just manipulate the dependency strings in .info.yml files to satisfy our requirements. But this comment suggests we might need to do something for the y as well... so definitely worth testing.

alexpott’s picture

Somewhat annoyingly there is no explicit test of drupal_check_incompatibility()

alexpott’s picture

Well this is a can of worms because core dependencies are different from contrib dependencies. Which is leading me to think that experimental modules should look more like contrib than core - ie. have a version string like 8.x-0.x-alpha1. Then we don't need to change any dependency mangling code because this just works... Also the major version of the project would 0 which is totally compatible with semver notions of BC... ie. anything before 1 can be changed.

alexpott’s picture

The reason for #64 is both ModuleHandler::parseDependency and ModulesListForm and system_requirments all do...

str_replace(\Drupal::CORE_COMPATIBILITY . '-', '', $modules[$dependency]->info['version'])

And we need this too... it strips 8.x- from the front of the version string.

dawehner’s picture

While 8.x-0.x-alpha1 makes a lot of sense especially in the context where we so, its for modules we might remove again, because, well this is one of the experimental side of things, I'm a but confused what this would mean for modules, which want to require a specific version of those modules.

Let's say, they require 8.x-0.x-alpha2, no the core module is no longer experimental, so its version schema changes to 8.2.x. Is this dependency then fullfillled?

alexpott’s picture

Status: Needs work » Needs review
StatusFileSize
new5.2 KB

Here's a patch based on #64 and with a fix to the dependency parsing to support -unstable.

There no interdiff because it is yet another approach.

alexpott’s picture

Let's say, they require 8.x-0.x-alpha2, no the core module is no longer experimental, so its version schema changes to 8.2.x. Is this dependency then fullfillled

No it is not but if they require >=8.x-0.x-alpha2 it is. Which is exactly how it works now.

dawehner’s picture

Oh good point.

alexpott’s picture

Oh I see I've mis-understood... good question @dawehner. I'm not sure. Depending on particular versions of core modules is weird because this is normally handled by the core key in the info.yml file... the whole 8.2.0 is not handled well by ModuleHandlerDependency parser...

alexpott’s picture

StatusFileSize
new2.73 KB
new7.93 KB

@dawehner we're okay it works as expected but only because we also key the module's core key in the info.yml otherwise one could do some really strange things.

The interdiff is the test only patch - I'm submitting a test only patch to show we've changed nothing about the assumptions around version checking that occur when we move a module into core. It should be green too.

alexpott’s picture

Issue summary: View changes
swentel’s picture

+++ b/core/tests/Drupal/KernelTests/Core/Common/DrupalCheckIncompatibilityTest.php
@@ -0,0 +1,60 @@
+    // If the module version starts with 8.x- is it stripped prior to using

is it = it is ?

alexpott’s picture

StatusFileSize
new2.07 KB
new8.16 KB

Let's add some tests for the -unstable identifier and fix #73.

alexpott’s picture

@xjm mentioned a problem with using the contrib numbering... if bigpipe is in contrib with an 8.x-1.x version... and then it becomes core experimental... so 8.x-0.x-alpha1... it is going back in versioning... which is very very weird.

TBH. I think if a contrib module goes into core we should always choose a different name.

alexpott’s picture

Update on the last comment: I think if a contrib module goes into core we should always choose a different name if it is after the X.0.0 release

xjm’s picture

+++ b/core/lib/Drupal/Core/Extension/ModuleHandler.php
@@ -676,7 +676,7 @@ public static function parseDependency($dependency) {
-    $p_minor = '(?<minor>(?:\d+|x)(?:-[A-Za-z]+\d+)?)';
+    $p_minor = '(?<minor>(?:\d+|x)(?:-([A-Za-z]+\d+|unstable))?)';

+++ b/core/modules/system/tests/modules/experimental_module_test/experimental_module_test.info.yml
@@ -2,5 +2,5 @@ name: 'Experimental Test'
-version: 8.y.x-unstable
+version: 8.x-0.x-unstable

+++ b/core/tests/Drupal/Tests/Core/Extension/ModuleHandlerTest.php
@@ -505,6 +505,13 @@ public function dependencyProvider() {
+      array('drupal_migrate_ui(>8.x-0.x-unstable)', array('name' => 'drupal_migrate_ui', 'original_version' => ' (>8.x-0.x-unstable)', 'versions' => array(array('op' => '>', 'version' => '0.x-unstable')))),

Dries stated previously that the unstable was not clear enough, and we agreed to that when we discussed it previously (and as I belatedly documented in #45). I don't think we should add support for it based on the consensus last month being to drop it. (My mistake for adding that pattern to the test module before this issue was resolved; the test module is what needs to be changed here.)

It'd be good to get some wider feedback on this pattern of version string. I can see the advantages but I also am thrown by seeing the contrib pattern for a core module.

xjm’s picture

Update on the last comment: I think if a contrib module goes into core we should always choose a different name if it is after the X.0.0 release

So... do we call it "BiggerPipe"? :P I'm not sure about how feasible this actually is. Of course having the same name also causes hosts of other problems too.

xjm’s picture

+++ b/core/tests/Drupal/KernelTests/Core/Common/DrupalCheckIncompatibilityTest.php
@@ -0,0 +1,60 @@
+class DrupalCheckIncompatibilityTest extends KernelTestBase {

So this is where I was starting to go with #2677532: Move drupal_check_incompatibility() functionality to a new Dependency class and Version component, but this also does have coverage in a very convoluted way in \Drupal\system\Tests\Module\VersionTest with system_test_system_info_alter() etc. Maybe a followup to kill that test (or reduce it to just a single UI test) and move any other coverage that's there, here?

Edit: There are also whole test modules for checking both core and contrib dependencies as well, which is also related coverage.

xjm’s picture

Assigned: xjm » Unassigned

My current work on this issue is now obsolete, so unassigning.

xjm’s picture

Issue tags: +beta target

Kinda a priority.

xjm’s picture

Issue summary: View changes
Status: Needs review » Needs work

For #77, and also we'd need to roll in migrate_drupal_ui now. Still could use more feedback on @alexpott's alternate proposal.

effulgentsia’s picture

if bigpipe is in contrib with an 8.x-1.x version... and then it becomes core experimental... so 8.x-0.x-alpha1... it is going back in versioning... which is very very weird

What if instead, when a contrib module goes into core, we bump its major version? So for example, big_pipe in contrib is 8.x-1.0-rc1, but in core, we want it to be alpha, so what if we make it 8.x-2.0-alpha1? That means early adopters of the contrib module move forward in their version number when updating to what's in core, which I think is reflective of the reality in this case (the core code is a forward movement relative to the contrib code).

This also benefits from the fact that using this version number ModuleHandler::parserDependency() identifies the module's major version as 0. This means we are inline with semver which states the a major version of 0 has no bc promise. Which is the reality we are trying to get across.

Do we need this? Item #9 on http://semver.org/ says "A pre-release version MAY be denoted by appending a hyphen and a series of dot separated identifiers immediately following the patch version... A pre-release version indicates that the version is unstable and might not satisfy the intended compatibility requirements as denoted by its associated normal version." So I'm unclear what the benefit of having 0 for the major version is, in cases where you also have an alpha/beta/rc suffix.

Let's say, they require 8.x-0.x-alpha2, no the core module is no longer experimental, so its version schema changes to 8.2.x. Is this dependency then fullfillled?

If we do my suggestion, then I think we'd need to make sure that if a hypothetical experimental module went into 8.1 as 8.x-3.0-alpha1, and then became not experimental in 8.2, that in fact 8.2.x is greater than 8.x-3.0-alpha1 (I don't know how the 2 and 3 get compared in that case). And also whether 8.2.x is greater than 8.x-9.0-alpha1 (comparison of 8 and 9), though that might be quite the edge case (not many contrib modules get to major versions that high).

effulgentsia’s picture

And also whether 8.2.x is greater than 8.x-9.0-alpha1 (comparison of 8 and 9), though that might be quite the edge case (not many contrib modules get to major versions that high).

Potentially, we might want to exploit this as a feature rather than a bug. For example, suppose a contrib module wants to hack node.module. How can it indicate to UpdateManager that it's the preferred version to what's in core? Well, if core is on 8.1, then the contrib module can version its hack as 8.x-8.2. If our comparison code strips the "8.x" prefix, then the comparison would yield the contrib version (8.2) as higher than core's (8.1) until core moves to a higher number. We'd need to decide what to do in case of equality (should we prefer core's 8.2 or contrib's 8.x-8.2?), but once we decide that, contrib can accommodate either decision.

xjm’s picture

Thanks @effulgentsia!

Since this issue has these issues and may not land before RC (and it's a stretch for the beta), I added a list of what experimental modules have which stability on the handbook page that is linked from the message when you enable experimental modules:
https://www.drupal.org/core/experimental#alpha

alexpott’s picture

@effulgentsia - nice idea. What always complicates this is how our modules are versioned... 8.x-2.x means that the module supports Drupal 8 but its major version is 2... and what we want is a minor version of 0. It seems an excellent idea that when contrib comes into core as experimental module we keep the contrib versioning but bump the modules major version. And it follow ups we could then use this to prefer core over contrib if core has the later major version of the module. What really complicates all of this is that modules don't yet have a version that corresponds to semver. I think the solution outlined in #83 is super.

@effulgentsia++

alexpott’s picture

Status: Needs work » Needs review
StatusFileSize
new8.53 KB
new7.29 KB

Patch attached implements and tests @effulgentsia's suggestion and removes support for the unstable modifier.

wim leers’s picture

  1. +++ b/core/modules/big_pipe/big_pipe.info.yml
    @@ -2,5 +2,5 @@ name: BigPipe
    +version: 8.x-2.0-alpha1
    

    +1 for this. Saying that in my role as one of the BigPipe maintainers.

  2. +++ b/core/modules/inline_form_errors/inline_form_errors.info.yml
    @@ -1,6 +1,6 @@
    +version: 8.x-0.0-alpha1
    
    +++ b/core/modules/migrate/migrate.info.yml
    @@ -2,5 +2,5 @@ name: Migrate
    +version: 8.x-0.0-alpha1
    
    +++ b/core/modules/migrate_drupal/migrate_drupal.info.yml
    @@ -2,7 +2,7 @@ name: Migrate Drupal
    +version: 8.x-0.0-alpha1
    

    0.0-alpha seems a bit strange. Why not 1.0-alpha?

alexpott’s picture

@Wim Leers - 0.0 because there has been no major release of these modules for drupal 8.

wim leers’s picture

Okay. But then why not just start at 1.0? I don't know of contrib modules (or any software ever actually) that have 0.0 as a version number — it'd at least have 0.1.

If we choose to go with 0.0 instead of 1.0 to stress the experimental nature even more, then that's probably fine, though it feels unneeded, almost excessive.

catch’s picture

I could see using 0.0 versioning for modules that are almost entirely prototypes. i.e. when the code itself has a good chance of being completely ripped out and started over.

migrate_drupal is not in that category, i.e. we expect it to go from alpha to beta to rc mostly as a result of bug fixes and clean-up.

inline_form_errors might be though, in that we don't have a clear path to get the current implementation of it working consistently everywhere, so by the time it gets to beta could be unrecognisable.

alexpott’s picture

StatusFileSize
new6.87 KB
new7.81 KB

Well reading http://semver.org/ it says

How should I deal with revisions in the 0.y.z initial development phase?

The simplest thing to do is start your initial development release at 0.1.0 and then increment the minor version for each subsequent release.

So starting at 0.1 sounds entirely reasonable.

alexpott’s picture

I;ve opened #2688369: If core provides a more recent version of a module use it instead of contrib to discuss the preferring contrib over core problem

Status: Needs review » Needs work

The last submitted patch, 92: 2656994-2-91.patch, failed testing.

alexpott’s picture

Status: Needs work » Needs review
Issue tags: -Needs tests
StatusFileSize
new586 bytes
new7.82 KB
new586 bytes

Oopsie... and we have tests...

effulgentsia’s picture

StatusFileSize
new8.45 KB
new1.17 KB

#95 looks great to me. This additionally adds tests for what's discussed in #83 and #84.

effulgentsia’s picture

StatusFileSize
new8.43 KB
new981 bytes

This might be a bit clearer.

xjm’s picture

  1. +++ b/core/modules/big_pipe/big_pipe.info.yml
    @@ -2,5 +2,5 @@ name: BigPipe
    +version: 8.x-2.0-alpha1
    

    What about @effulgentsia's proposal for this it to be (e.g.) 8.x-8.0-alpha1?

  2. +++ b/core/modules/inline_form_errors/inline_form_errors.info.yml
    @@ -1,6 +1,6 @@
    +version: 8.x-0.0-alpha1
    

    Is there a reason this is 0.0 rather than 0.1?

I need to read the test coverage more carefully to check for coverage for all the scenarios; will do so when I can.

alexpott’s picture

#98.2 Nope - it's a leftover from before #92

alexpott’s picture

re #98.1 I think that @effulgentsia was suggesting using that for a hack i.e.

suppose a contrib module wants to hack node.module

.

xjm’s picture

Version: 8.1.x-dev » 8.2.x-dev

Discussed with @alexpott and @effulgentsia. We agreed to move this issue to 8.2.x and try to fix it next time around.

wim leers’s picture

Oh, darn, I thought this already went in.

catch’s picture

Version: 8.2.x-dev » 8.1.x-dev
Issue tags: +rc target

So did I, but someone got caught out by migrate changes and I ended up pointing them here. Tagging again.

xjm’s picture

So the workaround for this for 8.1.x is that they are listed on the handbook page (which is linked from the warning displayed when installing an experimental module):
https://www.drupal.org/core/experimental#versions

Discussed also with @catch that I think this isn't going to be as helpful for developers who don't expect API changes for experimental modules, since core will still be one package. I think what would help developers more with that is the meta part of #2550249: [meta] Document @internal APIs both explicitly in phpdoc and implicitly in d.o documentation for explicitly marking internal APIs (including experimental module APIs) as such.

I'm still hesitant about this as an RC target because I feel there could be unknown repercussions, especially with all the outstanding bugs in this area, so using the 8.2.x cycle to fix this would seem the safest bet to me. To some extent, people need to pay attention to the yellow warning and read the handbook page because this is not a magic bullet for the confusion, just one more incremental improvement.

Mixologic’s picture

One possibility that having the composer façade enables is keeping the experimental modules in the contrib space, and adding them to core via a composer require in core's composer.json and composer.lock.

The advantages would be that the experimental module could maintain its own versioning until such time as it reached a stable level of maturity, and it would be possible to have additional maintainers for that module until it was ready to be fully rolled into core.

A disadvantage would be split issue queues (where does one go to file issues for expermental modules?).

webchick’s picture

No, let's not complicate things. We already give experimental modules their own versions (alpha/beta/rc).

xjm’s picture

Version: 8.1.x-dev » 8.3.x-dev
Issue tags: -beta target, -rc target

This issue accidentally did not get moved to 8.2.x after the 8.1.x beta phase. Moving to 8.3.x at this point.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

tim.plunkett’s picture

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

wim leers’s picture

Status: Needs review » Postponed (maintainer needs more info)

Is this still relevant? I doubt it is.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

xjm’s picture

Status: Postponed (maintainer needs more info) » Needs work

Yes, it's still relevant. We never did make a decision about how to handle this. Having to go to a secret handbook page on d.o to understand what level of support a module has is pretty ridiculous, even if that's what we've been relying on for years. See also: #2943707: Consider renaming "Experimental" core modules to "Beta" (policy, no patch)

"Postponed (maintainer needs more info)" when a release manager filed this release management issue does not seem the right status. :P

xjm’s picture

Also, Field Layout is alpha but ships in tagged releases because it predates the "alphas are not shipped in tagged releases" policy and so rm -rf now would be a very disruptive BC break for sites that do use it.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

quietone’s picture

Status: Needs work » Closed (won't fix)

This issue was discussed by the release managers. We no longer ship alphas in a tagged release which make this unnecessary. Therefor, we agreed that this can be closed as won't fix. I am doing that now.

Cheers