- Issue created by @pameeela
- πΊπΈUnited States phenaproxima Massachusetts
This is coming squarely from Package Manager: https://git.drupalcode.org/project/drupal/-/blob/11.x/core/modules/packa...
When this validator was written, we had no concept of recipes or recipe unpacking. This is a clear bug where Package Manager needs to be altered. A few ideas:
- Remove the validator entirely
- Convert the error to a warning
- Don't do the validation for packages that are recipes, since we know they could be unpacked
In the meantime, Drupal CMS's helper module can and should work around it by disabling the validator (and, for that matter, by also implementing the wait_timeout workaround).
- Merge request !606Add workaround to Drupal CMS Helper for Package Manager bugs β (Merged) created by phenaproxima
- πΊπΈUnited States phenaproxima Massachusetts
There is one thing I'm wondering as I look at this -- I wonder why adding a module somehow decided to bring in all of those recipes, which are clearly unpacked (and that's why they're not Composer-managed). But why would they get added anew?
Can you provide exact steps to reproduce this locally? After setting up Drupal CMS, what module did you try to add and how did you go about it?
- π¦πΊAustralia pameeela
Just got the same on HostGator.
Steps:
- Go to Project Browser
- Try to install Views Bulk Operations (one of the first modules that isn't already installed)
Have not tried locally.
- π¦πΊAustralia pameeela
Uploaded composer.json and composer.lock from HostGator.
- πΊπΈUnited States phenaproxima Massachusetts
With Pam's help I managed to trace this. We has found the problem and they is us.
The problem is that Drupal CMS 1.x still requires the
drupal/drupal_cms_analytics
metapackage, which is a metapackage and therefore untouched by the recipe unpacker. The problem with that, is that this metapackage...requires recipes! So this ends up reintroducing in the sandbox what the recipe unpacker has already removed from the live code base, triggering the Package Manager validator -- which is absolutely doing the right thing here.The correct solution, in this case, is to get rid of
drupal/drupal_cms_analytics
. For context, this package was created before 1.0, when it became apparent that we wanted to scope the analytics recipe more tightly to just Google Analytics. Due to a timing snafu, it was released with this wrong, generalized name (and might have even gone to beta with that name -- I don't recall exactly). We couldn't rename it, having already published it, so we did the next best thing, which is publish thedrupal/drupal_cms_google_analytics
recipe alongside it, and makedrupal/drupal_cms_analytics
a metapackage containing it and, presumably at the time, any future analytics recipes.Welp, I think it's clear now that the existence of that package was a blunder on our part. Would probably have been better for
drupal/drupal_cms_google_analytics
to replacedrupal/drupal_cms_analytics
(using thereplace
key in composer.json), but you know what they say about hindsight.So, my plan: in another issue:
- Remove drupal/drupal_cms_analytics from our subtree split and from the project template's composer.json, replacing it with
drupal/drupal_cms_google_analytics
. This will happen in both the 2.x and 1.2.x branches. - Alter
drupal_cms_analytics
to allow any version ofdrupal_cms_google_analytics
. - Mark the drupal/drupal_cms_analytics project as obsolete. It will never receive another release.
- Roll a new release of
drupal_cms_analytics
anddrupal/cms
which contains this change.
Here's what I think the effect will be:
- New sites: they'll never know that
drupal_cms_analytics
ever existed. They'll get drupal_cms_google_analytics and unpack it happily. - Existing sites: although the continued presence of the metapackage is not harmful to the operation of the Drupal site, it could cause trouble for Composer (as we've seen in this issue). We will have a change record which recommends unpacking all recipes (if it hasn't been done already) and removing the metapackage, with instructions on how to do that.
- Remove drupal/drupal_cms_analytics from our subtree split and from the project template's composer.json, replacing it with
-
phenaproxima β
committed bd9718d4 on 2.x
[#3545047] feat: Adjust the database timeout before running Composer...
-
phenaproxima β
committed bd9718d4 on 2.x
-
phenaproxima β
committed 567abe14 on 1.2.x
[#3545047] feat: Adjust the database timeout before running Composer...
-
phenaproxima β
committed 567abe14 on 1.2.x
- πΊπΈUnited States phenaproxima Massachusetts
Merged into 2.x and cherry-picked to 1.2.x.
Now that this issue is closed, please review the contribution record.
As a contributor, attribute any organization helped you, or if you volunteered your own time.
Maintainers, please credit people who helped resolve this issue.