Closed (won't fix)
Project:
Navbar
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
11 Apr 2013 at 23:11 UTC
Updated:
26 Jul 2014 at 02:36 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
theohawse commentedLooks like I missed these:
http://drupal.org/project/backbone
http://drupal.org/project/underscore
... Perhaps this issue should be with those modules separately?
-edit- turns out the modules dont get used in navbar, just the 2 js files.
Comment #2
saltednutAs this is part of the spark project, the necessary libraries are downloaded by the drupal-org.make that comes with that distribution.
If the module also includes its own makefile, then the libraries will unnecessarily be downloaded twice.
So if this is added, the Spark team should remove these libraries from the Spark drupal-org.make and allow Navbar to maintain its own dependencies.
Comment #3
theohawse commentedYes, I include my own makefile as well in a custom distro, but it would be easier if modules maintained the library versions rather than distributions. Geshi Filter and Chosen already use this method.
Comment #4
saltednut@theohawse I disagree - it seems cumbersome dealing with these makefiles in multiple places and its terrible not having control over whats being downloaded. Panopoly does this too and its maddening that I have to patch the makefile inside panopoly_widgets just to use the latest Media module. That is not easier.
The most widely used distributions (Commerce Kickstart, Drupal Commons) manage all module dependencies in the drupal-org.make.
Comment #5
theohawse commentedI know what you mean by having to patch panopoly... here's an issue about the navbar in panopoly_admin: http://drupal.org/node/1971292
Panopoly should really move its makefiles back into drupal-org.make or stub makefiles.
Perhaps then only modules which make exclusive use of a library (superfish, geshi filter) should contain make files for their respective libraries. This I guess is not the case with navbar.
Comment #6
polHere's the patch
Comment #7
polComment #8
polI will redo a patch using git repositories instead of a single file. So the navbar_requirements() hook will be ok.
Comment #9
polHere it is !
Comment #10
saltednutReally hope this doesn't go in. Seems like an anti-pattern. See #4
Comment #11
jessebeach commentedI have to agree with brantwynn on the point that when including this module in a larger build, its included libraries might be in conflict with those of the larger project.
Pol, is there any way to check if the dependencies are met and load them only if they're not? Maybe on
hook_enable? Or inhook_requirements? Maybe something in the make flow can handle this? I undertand the frustration of needing to get these libraries into your build if you're just using the module and not a distro. On the other hand, Backbone and Underscore can be very common and might be present already. We wen through pains to make sure we're using the Libraries architecture so that we play nice in a larger setup.Comment #12
polAs you wish then ! Thanks for your point of view!
Comment #13
pol*double clicked, sorry*
Comment #14
saltednutThe only workaround I know is... say you wanted to use a different version of the libraries:
Since make files build from the bottom up, if you include this module at the bottom of your makefile and then reference the libraries earlier on, it will get you what you need. But at the cost of some sanity.
Basically, it would download the libs first using the make provided by the module (in this case a navbar.make). Then it would recusively override and download them again (or alternate versions) from your drupal-org.make provided by the profile.
Not ideal and slows down your build process on wasted cycles. Therefore, yet another reason why I think its more sane to just include the libs yourself.
Comment #15
adamdicarlo commentedA good compromise is to name the file MODULE_NAME.make.example.
That way drush make won't recurse into an abyss, and people know where to quickly copy-paste from.
Comment #16
Chris CharltonThere's a Drush Make flag to help with this: https://github.com/drush-ops/drush/issues/15
With that we should really consider adding a make file for the many devs that rely on Drush Make to do the repetitive grunt work.
Comment #17
btopro commentedMODULE_NAME.make.example is pretty standard way of avoiding this obnoxious issue (auto recursion)