Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When reviewing the logs for #2400705-22: Outdated version of dependencies are installed on the test-infrastructure, I noticed that distributions and core never have dependencies that can be calculated.
I think dependencies should only be attempted for releases with a project node type in 'project_module', 'project_theme', 'project_theme_engine'
.
Comment | File | Size | Author |
---|---|---|---|
#10 | check_project_type-2651854-10.patch | 2.48 KB | trobey |
#9 | Screenshot from 2016-01-19 09:09:53.png | 69.09 KB | trobey |
Comments
Comment #2
trobey CreditAttribution: trobey commentedproject_core is needed. For instance, Views has been moved into core and if a dependency is specified without the project namespace then releases of Drupal core will not be found and an old release of Views will be found instead.
Theme and profiles (distributions) are excluded. But the existing code is a bit shaky:
It scans for files with a theme or profile extension. But there are projects such as the Date project that have a date.theme file. It might be cleaner to check the project type as you suggest. In that case it would only process projects with project_core or project_module. I would need to check older projects to see if this works for older versions of Drupal. Should I pursue this change?
Comment #3
drummWhat I'm seeing is the “Dependency update failed.” message on core release pages, which happens when a project has no components stored, correct? Should core have components stored in the DB, or some other way of noting that dependencies have been looked at and don't need to be tried again?
Comment #4
trobey CreditAttribution: trobey commentedCore should have it's components stored in the database. If you look at Drupal 7.41 the components are listed. It looks like Drupal 8 releases ae all missing the components. I am not sure whether this is a problem in Project Dependency or that Project Dependency is not getting called.
Comment #5
trobey CreditAttribution: trobey commentedHere is the relevant code from Project Dependency
Comment #6
drummLooks like that code is decently deep in the process. I can confirm there isn't a problem with the Git clone of core, when running drush pdpp via Jenkins. Seem like there is a bug with the 8.x core component discovery.
I can't see a downside to replacing the code from #2. The project's node type will work the same for any version of Drupal.
Comment #7
drummAnd replacing the logic in #2 could unstick core too. Core has added some files that have not made it into
project_dependency_filename_type_exceptions
Comment #8
trobey CreditAttribution: trobey commentedYes, that is what my investigation is showing. I just need to do some testing to make sure I am not breaking anything. I have never liked this code because it is failure prone. So if I can replace it with something that is simpler and works all the time that would be a big step forward.
Comment #9
trobey CreditAttribution: trobey commentedI am checking the Drupal 8.0.1 release. It looks like it is now working but there is something interesting that shows up. There is the Link project with a link module that is getting picked up. This is because Project Dependency gives preference to projects of the same name as the module. I do not think this actually hurts anything (processing of dependencies with Drupal core is suppressed) but I think a patch to Drupal core to add the project namespace (drupal:link) will clear this up and probably should be done throughout core to avoid similar problems in the future.
Comment #10
trobey CreditAttribution: trobey commentedI am attaching a patch for review. I have checked it against Drupal core 6, 7, and 8 and similarly for a contributed project. Drupal core has a bunch of modules that are only used for testing so I tried to strip them out. I also remove any contributed modules that are under a "tests" or Tests" directory. I think this is safe and gets rid of most of the cruft.
Comment #11
drummLooks good to me from reading the code.
Comment #13
trobey CreditAttribution: trobey commentedChange committed and included in release 7.x-1.0-beta10.
Comment #14
trobey CreditAttribution: trobey commented