Opened 6 years ago
Closed 6 years ago
#3025 closed defect (fixed)
Installing bundle doesn't add its providers
| Reported by: | Eric Pettersen | Owned by: | Conrad Huang |
|---|---|---|---|
| Priority: | moderate | Milestone: | 1.0 |
| Component: | Tool Shed | Version: | |
| Keywords: | Cc: | ||
| Blocked By: | Blocking: | ||
| Notify when closed: | Platform: | all | |
| Project: | ChimeraX |
Description
So when checking my updates to the developer tutorials, I noted that installing the "read-a-file" bundle did not add its provider. Restarting ChimeraX caused the provider to show up. Methinks the provider should be added when the bundle gets installed, or are we anticipating always having to restart bundles after installation if they participate in any manager/provider protocols? With open2/save2, bundles adding providers is going to be a lot more widespread...
Just FYI, you can try it out yourself with:
devel build your-chimerax-parent/chimerax/src/examples/tutorials/tut_read
devel install your-chimerax-parent/chimerax/src/examples/tutorials/tut_read
The add_provider is in open_command/src/manager.py
Change History (9)
comment:1 by , 6 years ago
follow-up: 2 comment:2 by , 6 years ago
I think so. "devel install" just installs the wheel from file, while "toolshed install" uses pip. There is code in install_bundle() to run _init_bundle_manager() unless in safe mode. Maybe we should look at changing "devel install" to "devel build" followed by "toolshed install". On 4/9/2020 9:36 AM, ChimeraX wrote:
comment:3 by , 6 years ago
I don't see anything in install_bundle() that makes the bundle's providers available to the relevant managers.
follow-up: 4 comment:4 by , 6 years ago
You're right. That's the complement to the case that is handled, where the new bundle's manager gets its providers from relevant bundles. There needs to be another section in install_bundle() to propagate the new providers out. On 4/9/2020 2:08 PM, ChimeraX wrote:
comment:5 by , 6 years ago
So....
Are you going to do this? If you're overwhelmed I could take a stab at it, with an extreme amount of trepidation...
follow-up: 6 comment:6 by , 6 years ago
I probably can't get to it for a couple days, so feel free to take a swing at it. Conrad On 4/10/2020 3:36 PM, ChimeraX wrote:
comment:7 by , 6 years ago
So I looked into this (getting newly installed bundles to notify managers about providers) and the main stumbling block is that the toolshed does not retain any list of the managers it initializes, so it's impossible to notify the manager later about new providers. Is there any reason I shouldn't remember initialized manager instances?
If there isn't, I can run with that...
follow-up: 8 comment:8 by , 6 years ago
I think the original reasoning was that the bundles are responsible for registering their managers in the current session, back when managers were much more limited. So there was going to be a way to get all the managers from the session. Now that managers that do not need to be saved in sessions no longer need to be registered, I think having the toolshed keep track of a complete list is quite reasonable. Might want to use weak references, although that may not make any difference. On 4/22/2020 3:42 PM, ChimeraX wrote:
comment:9 by , 6 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
Is this because I'm using "devel install"? Would(/should) "toolshed install" run the provider?