GH Compiled to GH Plugin, containing another GH plugin issue

Hi Guys,

I’m working on a client’s project where we are taking existing GH scripts, adding a UI, and compiling them into a YAK plugin.

The current architecture of the client’s codebase is built around master GH scripts that call HOPS-based GH “Helper Components”.

I’ve been working on migrating these Helper Components from HOPS into a custom GH plugin, which has actually been relatively straightforward because the Helper Components already have properly configured Context Inputs and Outputs.

However, I’ve hit an unexpected issue once the new custom plugin is compiled and installed.

One or more of these scripts references a component from Pufferfish version 3.0.0.0. I have the correct version installed locally, but now every time I open Grasshopper I get:

“Plugin not found - please download Pufferfish 3.0.0.0”

even though it is already installed and working.

My assumption is that the new custom plugin is being loaded before Pufferfish, and Grasshopper is validating dependencies too early during startup.

Has anyone run into this before?

Would it make sense for Grasshopper to “look ahead” in the load sequence and defer missing-plugin warnings until all plugins have completed loading, rather than immediately triggering the Package Manager lookup?

Or alternatively, is there a recommended way to delay dependency resolution / component registration inside a compiled GH assembly?

Cheers

DK

OK, I’ve created a rhproj/yak that shows the issue - please see ZIP file below.

It contains a really simple GH file using the Pufferfish Round to Decimal component:

I then compiled this into a new GH Plugin, once this new plugin is installed via YAK drag and drop every time I open GH this comes up:

Of course I already have the correct version of Pufferfish installed, as that is how I created the new plugin. If I cancel out of the dialogue everything works fine.

@eirannejad would this be in your playground?

Cheers

DK

GH plugin from GH file with GH plugin issue.zip (60.9 KB)

SO, the above plugin I created is named:

aa_plugin_with_plugin

To check if perhaps GH is loading plugins in alphabetical order, I made a new plugin (new GUID) called:

zz_plugin_with_plugin

I uninstalled the AA version and installed the ZZ version AND - the problem disappeared.

If Pufferfish loads before my plugin that contains Pufferfish, all is good, but this is not a solution - could someone have a look at the dependency resolution / component registration on GH start up?

Cheers

DK

I just want to chip in here as well: serious issue in an amazing feature. Hope this is addressed soon.

Just bumping this back up hoping someone from McNeel can advise?

Cheers

DK

Looking at this right now. @kiteboardshaper Thanks a bunch for the example plugin.

Update: I can replicate this and pushing a fix for it.

RH-95862 Published plugin asks for already installed plugin on load

@eirannejad thanks mate!

For how long this has been available in the Script Editor work flow I’m surprised I’m the first to see this issue!

Cheers

DK

You are not alone.
I had the same problem : a new GH component type HOPS compiled with Script Editor that contains a non-native GH component (elefront for example) will cause the missing plug-in error.

Pushing a fix in the next 8 SR release.

  • GH1 no longer complains about missing plugins when loading script-editor-published plugins
  • When dropping a new published component on the canvas, GH will complain about missing plugins, if any. When plugins are installed it continues to run normally.
  • Published component with missing plugins will show error message with plugin info:
  • The fix is applied to Rhino so no need to re-publish your plugins

@eirannejad

Thank you mate! Amazing work, I look forward to testing/confirming the fix.

Cheers

DK

@eirannejad

:raising_hands:
Any chance that this fix solves or brings us any closer to the solution for the lack of control over plugin load order in general?

reference:
What dictates the load order for Grasshopper Plugins? - #28 by s_oosterhof

It has caused quite a bit of headaches here. In my team we have some internal (standard C# SDK) plugins that depend on each other and having to deal with them loading and initializing out of order adds uneccessary level of complexity.

Not really. This is only changing how published plugins deserialize the embedded gh definitions at the moment :smiley: