HAHA! Bet that no one ever saw that ! From what I see, devel_generate has no reason to require devel. Or maybe I'm mistaking?

Edit: point made grep -R -e 'devel_[^g]' devel_generate

Files: 
CommentFileSizeAuthor
#10 1965606-10.patch1.84 KBSebCorbin
PASSED: [[SimpleTest]]: [MySQL] 36 pass(es).
[ View ]
#1 1965606.patch456 bytesSebCorbin
PASSED: [[SimpleTest]]: [MySQL] 36 pass(es).
[ View ]

Comments

SebCorbin’s picture

Status:Active» Needs review
StatusFileSize
new456 bytes
PASSED: [[SimpleTest]]: [MySQL] 36 pass(es).
[ View ]

Patch provided

SebCorbin’s picture

Issue summary:View changes

Updated issue summary.

RobLoach’s picture

Noticed this a couple years ago, but didn't pay any attention to it haha. Assumed there was some Devel Black Magic going on in the background. I've seen some loose-bindings to Drush, but no hard-dependency on either Drush or Devel. Haven't tested fully, but I'd say it's pretty Devel-free.

SebCorbin’s picture

opi suggested that it could even be removed from devel and maintained as its own project, as devel_themer once did.

pcambra’s picture

Assigned:Unassigned» moshe weitzman

opi suggested that it could even be removed from devel and maintained as its own project, as devel_themer once did.

Yeah, most of the discussed here has been discussed before many times :). Moshe is not in favor of releasing devel generate out there and after seeing what's happening with devel_themer, it's probably the right thing to (not) do.

About removing the dependency... I'm not particularly fond of doing it but I'm assigning this to Moshe for the final call.

moshe weitzman’s picture

Status:Needs review» Reviewed & tested by the community

I'm fine with removing that dependency if the its not needed. pcambra or others can commit this when they are comfortable that no dependency exists ... Lets keep devel_generate where it is for now.

@Rob - what is a loose binding? Of course drush integratio will call into the same code that the UI code calls into. Did you mean something more?

RobLoach’s picture

@Moshe I just mean this kind of thing:

<?php
function devel_generate_fields(&$object, $obj_type, $bundle) {
 
$field_types = field_info_field_types();
 
$instances = field_info_instances($obj_type, $bundle);
 
$skips = function_exists('drush_get_option') ? drush_get_option('skip-fields', '') : @$_REQUEST['skip-fields'];
  foreach (
explode(',', $skips) as $skip) {
    unset(
$instances[$skip]);
  }
?>

We don't depend on Drush, but if it's there, we use it.

moshe weitzman’s picture

That's gross. Hope I didn't write that :). We should ideally add a param to the function signature adding a ternary in the function.

SebCorbin’s picture

Yeah, most of the discussed here has been discussed before many times :). Moshe is not in favor of releasing devel generate out there and after seeing what's happening with devel_themer, it's probably the right thing to (not) do.

If devel generate would one day come out of devel, I'd enjoy to co-maintain it :)

pcambra’s picture

Status:Reviewed & tested by the community» Fixed

Tested and fixed in D7 and D8, thanks.

Opened #1968576: Fix "loose bindings" to Drush in Devel generate for fixing the drush "loose binding" thing

SebCorbin’s picture

Status:Fixed» Active
StatusFileSize
new1.84 KB
PASSED: [[SimpleTest]]: [MySQL] 36 pass(es).
[ View ]

When drush cache is cleared (thing that I didn't check), I get

No hook functions were found for generate-terms. The primary hook function is drush_devel_generate_generate_terms(). Please [error]
implement this function. Run with --show-invoke to see all available hooks.

Attached is a fix.

rodrigoaguilera’s picture

@SebCorbin I noticed that while working on this issue
http://drupal.org/node/1397582
but in my patch I changed the function names

rodrigoaguilera’s picture

I tested the patch on #10 and It works and think that is a better aproach than mine

pcambra’s picture

Status:Active» Needs review
pcambra’s picture

Status:Needs review» Fixed

Ooops, thanks for the fix @SebCorbin

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary:View changes

Updated issue summary.