Grasshopper attempts to load multiple plugin versions

Hi McNeel team / @will / @DavidRutten
We are distributing a plugin that contains a .rhp and two associated .gha files.
Updating from an old to a new version works as expected with the Rhino plugin component (.rhp), but when loading the Grasshopper plugin the user is presented with a conflict.

In the following image, only the left version with the higher version number should be attempting to load.

image

In %AppData%\McNeel\Rhinoceros\packages\8.0\<my-package>:

  • manifest.txt shows the correct version
  • both folders exist as expected.

Uninstalling the package, restarting rhino and installing works as expected but this is not something we expect users to do.


It looks like this might have been fixed some time ago for Rhino packages but perhaps associated Grasshopper packages slipped through:

This is currently blocking us from moving from .rhi and .macrhi to the package manager.

Problem could be with either @will’s or my code as you pointed out. Either Yak is returning the old version folder as something GH should be looking at for loading plugins, or GH is deciding on its own to go for it.

I’ll try and come up with a little script which lists all folders GH is looking in for plugins along with the reason why it’s included.

folders.gh (14.0 KB)

This file has a VB script component with a slightly modified version of the code which finds plugins. It should output a list of strings with “reason → folder uri” formatting. I’d like to see that list for a machine which shows this loading conflict.

It’s not entirely correct, the real code also removes some folders from this list, but I think for this issue that would only muddy the waters.

Thanks @David
The erroneous load is coming from a Rhino Plugin Folder:

Core Plugin Folder ->    C:\Program Files\Rhino 8\Plug-ins\Grasshopper\Components\
Default Plugin Folder -> C:\Users\<me>\AppData\Roaming\Grasshopper\Libraries\
Rhino 6 Only Folder ->   C:\Users\<me>\AppData\Roaming\Grasshopper\6\Libraries\
User Plugin Folders ->   C:\Users\<me>\Documents\GH_Timeline\Plugin\bin\
User Plugin Folders ->   C:\Users\<me>\Documents\HotComponent\Plugin\bin\
Rhino Plugin Folder ->   C:\Users\<me>\AppData\Roaming\McNeel\Rhinoceros\packages\8.0\<my-package>\2024.1.100
Rhino Plugin Folder ->   C:\Users\<me>\AppData\Roaming\McNeel\Rhinoceros\packages\8.0\<my-package>\2024.1.99
Rhino Plugin Folder ->   C:\Program Files\Rhino 8\Plug-ins\Grasshopper\Components

Here’s a simple repro just using the VS wizard, yak spec and yak build.

  1. Drag and drop the following packages. Observe both load correctly. Observe correct folder structure and manifest.txt in %AppData%\McNeel\Rhinoceros\packages\8.0\MyRhinoAssembly
  2. (Optional) Restart Rhino
  3. Open Grasshopper. Observe file conflict.

myrhinoassembly-1.0.0-rh8_0-any.yak (31.0 KB)
myrhinoassembly-2.0.0-rh8_0-any.yak (31.0 KB)

Anything else I can do to help here?

Related issue: If a plugin is installed via both Yak and a .rhi, a load conflict occurs regardless of version numbers. This makes updating from the now-deprecated .rhi to Yak difficult en-masse.

Gentle prod :point_right: @DavidRutten @will :slight_smile:

Bump… We’d really like to be able to switch to the package manager…

:slightly_frowning_face:

Anything I can do here or is this a #wontfix ?