Rhino8 reinstalls dependencies with each new component instance

Hello!

I’m confronted with an issue I haven’t experienced before with our GH plugin bluejay.
Our components all have #r: compas>=2.8.1 in their header which used to work great. Our library and other dependencies would get installed on the first ever time any of them is added to the doc.

Today I noticed that Rhino attempts to re-install the dependencies for every new instance of any of our components.

So everything is installed once I drag an instance of e.g. the Info component even if I’ve already used the component previously. When I drag another instance of the Info component, however, Rhino attempts again to re-install all the dependencies. This time it actually fails since we have some compiled binaries as dependencies and these are already loaded/locked by the process.

here’s a gif showing the issue:
gh_bug

My Rhino is build 8.17.25066.7001
running on Windows 10

Any idea what may be causing this?

Thanks!
Chen

Is the first installation failing? Maybe if something’s changed with the latest version of a dependency?
It takes a while to go through the deps for me too in v8.18, on the second component, just pasting

#r: compas>=2.8.1
print('Done')

into CPython components. But on second thoughts I don’t know if that’s re-install, or pip verifiying what’s already installed versus what’s needed, to make sure no dependencies are missing.

Hey @James_Parrott,

thanks for trying it out. mmh I’m pretty convinced it’s a re-install.
as you can see here with the python console open, the installation is successful.

When opening another script component and pasting the header, it’s nevertheless installed again:

One observation though is that when not specifying a version constraint, behavior is as expected (no re-installation):

Chen

Thanks for the thorough investigation Chen.

If you install everything in a # venv: shared between the two components, does it still install it all twice?

Looking into this right now…Stay tuned :radio:

Update: I can replicate this and will push a fix for this ASAP. There is a bug in compas>=2.8.1 version comparison. You should be able to use compas==2.10.0 or compas>=2.10.0 (that’s what actually gets installed) as a quick workaround

RH-86793 Compas version comparison keeps reinstalling package

2 Likes

thanks @eirannejad! appreciate it.

Chen

1 Like

@Chen_Kasirer I can DM you a test build if you want to test.

Sure, that’d be awesome.

RH-86793 is fixed in Rhino 8 Service Release 19 Release Candidate

1 Like

@eirannejad @brian thanks for the awesome work and responsiveness!

1 Like

@Chen_Kasirer Anytime! Thanks for the feedback and being patient :smiley: