YCloudYUSA / y_lb

Layout Builder for YMCA Website Services distribution

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Correct project names in module dependencies

andriokha opened this issue · comments

I recently went through an upgrade and noticed that node revision delete wasn't enabled despite being a dependency. Tbh I don't know that this is the culprit, but I noticed that the dependencies aren't right in the .info.yml - they all have the project name as drupal. (I do it all the time myself, it's so hard when in composer it's drupal/node_revision_delete!)

y_lb/y_lb.info.yml

Lines 7 to 15 in 93c25fa

- drupal:layout_builder
- drupal:node_revision_delete
- drupal:breakpoint
- drupal:bootstrap_styles
- drupal:bootstrap_layout_builder
- drupal:layout_builder_blocks
- drupal:layout_builder_restrictions
- drupal:lb_claro
- drupal:scheduler

Thanks!

It's all correct @andriokha
See https://ds-docs.y.org/docs/wiki/dependencies-in-drupal-info.yml/

Let us know what issue you faced with?

Thanks for your time @podarok!

It's all correct @andriokha
See https://ds-docs.y.org/docs/wiki/dependencies-in-drupal-info.yml/

Ah, that goes against my understanding of the .info.yml file dependencies. To quote d.o.:

Dependencies on Drupal core or contrib modules should be namespaced in the format {project}:{module}, where {project} is the project name as it appears in the Drupal.org URL (e.g. drupal.org/project/paragraphs) and {module} is the module's machine name.

And the example they give

dependencies:
 - drupal:link
 - drupal:views
 - paragraphs:paragraphs
 - webform:webform (>=6.1.0)

https://www.drupal.org/docs/develop/creating-modules/let-drupal-know-about-your-module-with-an-infoyml-file#s-complete-example

Let us know what issue you faced with?

The original issue that made me look was that node_revision_delete wasn't enabling, but that's fixed by #60 as far as I can tell.

Thanks again!

Thanks for your time @podarok!

It's all correct @andriokha
See https://ds-docs.y.org/docs/wiki/dependencies-in-drupal-info.yml/

Ah, that goes against my understanding of the .info.yml file dependencies. To quote d.o.:

Dependencies on Drupal core or contrib modules should be namespaced in the format {project}:{module}, where {project} is the project name as it appears in the Drupal.org URL (e.g. drupal.org/project/paragraphs) and {module} is the module's machine name.

And the example they give

dependencies:
 - drupal:link
 - drupal:views
 - paragraphs:paragraphs
 - webform:webform (>=6.1.0)

https://www.drupal.org/docs/develop/creating-modules/let-drupal-know-about-your-module-with-an-infoyml-file#s-complete-example

Let us know what issue you faced with?

The original issue that made me look was that node_revision_delete wasn't enabling, but that's fixed by #60 as far as I can tell.

Thanks again!

On drupal.org also people ;)
People make mistakes ;)

Thank YOU

@podarok I'm not sure I'm clear on the resolution here. Can #57 be closed or should the conflicts be resolved and it be updated?

Yes, this is incorrect

I'm not sure it matters, but I can't find any corroboration that the first string should always be drupal (for one thing, it seems a bit redundant). As well as the quoted docs, if you look at eg. \Drupal\Core\Extension\Dependency::createFromString() which parses a dependency string, it extracts the first part as the project. In a unit test it has an example using paragraphs as the project name. You can also see there are many more examples in the wild of paragraphs:paragraphs than drupal:paragraphs (with at least 8 of the latter come from YMCA-WS). As I say I'm not sure where it might cause actual problems, but it does seem that the issue is valid 🤷 :)

@froboy as a resolution, just to ensure no confusion

#56 (comment)
Since I put this https://ds-docs.y.org/docs/wiki/dependencies-in-drupal-info.yml/ doc nothing really changed in composer repo on drupal.org

So following this document is a preferable way for us