Plugin command list not refreshing when reinstalling same beta version

I have a Python plugin that I rebuild and reinstall frequently during development.

My workflow has been:

  1. Keep the package version the same, for example 0.0.2-beta.
  2. Add or modify commands in the project.
  3. Build the Yak package.
  4. Uninstall the old plugin.
  5. Install the newly built package with the same version.
  6. Start Rhino and test.

This has worked for weeks. New and modified commands showed up as expected after uninstalling/reinstalling the same beta version.

Today I added a new command, rebuilt the package, uninstalled the old package, installed the new one, and restarted Rhino. The new command did not appear in plugin command list and could not be run from the Rhino command line.

I spent 30 minutes checking the project file, generated command source, installed package contents, and the .rhp. Everything seemed to contain the new command.

Eventually I changed only the package/plugin version from 0.0.2-beta to 0.0.3-beta, rebuilt, uninstalled, reinstalled, and restarted Rhino. After that, the new command appeared and worked.

Any idea abuot what happened?

I don’t know if Yak caches the previous package under that version number, but I remember finding something in the component build process can be picky about versions. Unfortunately I think this should be added to the workflow:

2.5 Bump the version number.

To quickly make and test changes made to a pure Python library, can you find where the package is installed, open that folder (e.g. in VS Code) edit the source code and restart Rhino (or clear the package’s modules from sys.modules and call importlib.reload).

Betas shouldn’t require bumping the version…

Since that episode I added a print(something) at the start of the command I’m testing, to make sure I’m looking at the right version. And it has not happened again.

Oh, well…

Personally, I couldn’t agree more. I want minimum hassle and fast iteration.

But it seems those behind either the .Net or Yak build chain took a different view