Closed (won't fix)
Project:
Drush
Version:
8.x-6.x-dev
Component:
Make
Priority:
Normal
Category:
Bug report
Assigned:
Issue tags:
Reporter:
Created:
25 Jan 2013 at 17:54 UTC
Updated:
11 Sep 2013 at 05:20 UTC
Jump to comment: Most recent file
Comments
Comment #1
jhedstromThis seems like a limitation of the
.iniformat. It's basically trying to mix strings and arrays, similar logic in php results in garbage:Comment #2
greg.1.anderson commentedHm, yeah, it looks like make is using
_drush_drupal_parse_info_file()to do the work of parsing a makefile, so this would be a little bit inconvenient to fix. Since we already have our own copy of this function, though, it would be possible to fix it if we desired to. We could consider adding a parameter to_drush_drupal_parse_info_file()that indicated the name of the field that overlapping data items would be merged into. See attached patch.Then:
Of course, if we did this, then make files wouldn't really be .info files any longer. On the other hand, one could argue that make files already are not, strictly speaking, info files, since Drush make has already introduced the concept that a given data item might be an array or a simple string.
To continue with this patch, we could either trivially modify
make_parse_info_file(), like so:Or, more robustly, we could use something else, such as '__DRUSH_MAKE_MERGE__' to hold the merged items, and write extra code to map this constant to 'version' when it appears in the correct context, or fail with an error when it does not. It might also be necessary to adjust the code that fills in the default values; I didn't check this.
It'd also be okay to "won't fix" this, if you prefer, although I suspect it would be very helpful to folks if make handled this edge case correctly.
Comment #3
andreiashu commentedThere's also the option for drush to throw an error in this case explaining what is happening. This way people will know what they have to do in order to not get an unexpected behaviour.
Comment #4
greg.1.anderson commentedWithout a change similar to #2, an error would be impossible to detect, as conflicts are silently overwritten by the .info parsing code. #2 could be simplified to detect but not correct conflicts, though.
Comment #5
greg.1.anderson commentedThis issue was marked
closed (won't fix)because Drush has moved to Github.If desired, you may copy this bug to our Github project and then post a link here to the new issue. Please also change the status of this issue to
closed (duplicate).Please ask support questions on Drupal Answers.