As #947158: Recursive makefiles can cause conflicts was duped...

Attached patch attempts to deal with recursive makefiles specifying different versions of the same module.

CommentFileSizeAuthor
recursive-versions.patch4.02 KBXen
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Xen’s picture

Status: Active » Needs review
helmo’s picture

Project: Drush Make » Drush
Version: 6.x-2.0-beta10 »
Component: Code » Make

[ Powered by #1115636: Issue Macros and Templates - Drush Make]

Drush make is being merged into drush core (discussed in issue:#1310130: Put drush make in drush core)
This means that the issue queue is also moving. The drush queue has a component 'Make' especially for drush_make.

More information will be posted on the drush_make and drush project pages.

jhedstrom’s picture

Status: Needs review » Needs work

This needs a re-roll.

Xen’s picture

First we need to figure out the right behavior.

When would two versions be considered equal?

helmo’s picture

When would two versions be considered equal?

Hardly ever.... and maybe that's not relevant from Make's perspective.

Maybe we could specify this somewhat broader.

Use-case:
Profile A & B contain module X, profile C does NOT.

Module X could be the same version in both profile A&B but not necessarily.

I haven't tested this recently...

Xen’s picture

Well, rather often.

When 2 makefiles both ask for views in the same version, or pull the same tag or branch from the same repository.

The interesting cases are when one asks for views 1.2 and the other just for views. Then 1.2 would satisfy both. And patches? The same version, but one make file applies a patch. Are they still equal.

moshe weitzman’s picture

pm normalizes definitions like views to views-6.x-3.0 (for example), after consulting the updatexml for a given project. so it should be easy to avoid downloading dupes.

Xen’s picture

The dupe issue has been fixed, but this is before pm kicks in. The latest make uses a static class getter method to ensure each project is only build once. This issue is about detecting that an recursive makefile wants another version of a project and error out.

jhedstrom’s picture

The way this works now, it will pull whatever project version is specified in the local make file. If a recursive make file declares a different version, I think throwing an error would be frustrating, since the person trying to build the project may not be able to change that remote make file to update, for example, an older version of Views. Perhaps throwing a warning would be sufficient?

Xen’s picture

A warning at minimum.

But when the version checking code is implemented, it's not too much trouble making a switch that decides the behaviour.

greg.1.anderson’s picture

Version: » 8.x-6.x-dev
Status: Needs work » Closed (won't fix)
Issue tags: +Needs migration

This issue was marked closed (won't fix) because Drush has moved to Github.

If this feature is still desired, you may copy it to our Github project. For best results, create a Pull Request that has been updated for the master branch. Post a link here to the PR, and please also change the status of this issue to closed (duplicate).

Please ask support questions on Drupal Answers.