hechoendrupal / drupal-console-extend-plugin

Drupal Console Extend Composer Plugin
131 stars 31 forks source link

Only look for plugins within the actual package being installed #7

Closed mike-potter closed 7 years ago

mike-potter commented 7 years ago

This is fixing Issue #6. The important stuff is at the beginning, the rest is just white-space issues because of the indention of the block.

Sorry for the formatting but my IDE is set up for Drupal coding standards, so it didn't match the extra spaces and stuff here.

This patch hugely improved performance on my site with node_modules and bower_components within my project theme.

However, I'm not sure if this function is doing what was originally intended. Now it is just looking for Console plugins within the package being installed. If somehow this was still supposed to search in the entire project folder then the whole logic of this module needs to be revisited, because searching the entire docroot for every package install/update is a project breaker here. So hopefully I got the intent correct.

jmolivas commented 7 years ago

@mike-potter Thanks for the PR and sorry for the delay I will review this this week before DrupalCon.

Did you see the PR #3 ?

mike-potter commented 7 years ago

Yes, I saw #3 and it wasn't clear that it was solving the same problem. In #3 there is no call at all to processProjectPackages() and yet the PR doesn't remove that function which seems to no longer be used. Also, it still seems to loop through all packages each time a package is installed.

Again, perhaps I don't understand the real purpose of this package since there isn't any docs for it. So it's your call as to which needs to be done. But it seems like the main processPackages() event handler should only be processing the individual package that is being installed/uninstalled/updated rather than looping through all packages from the composer.

mike-potter commented 7 years ago

PR #3 fixed the issue better than this. I didn't fully understand what this package was doing when I wrote this PR, so I'm closing it.