DependencyResolver lost dependent info after plugin stop
See original GitHub issueHave two plugins A and B, B depends on A.
Step to reproduce:
- Resolve and start A/B
- Stop A, A/B will be both
STOPPED, which is expected. - Start A.
- Start B,
- Stop A again, A is
STOPPEDbut B remainsSTARTED, which expected to be bothSTOPPED.
Possible cause
in AbstractPluginManager.stopPlugin(plugin, stopDependents) methods, the following line
String dependent = dependents.remove(0);
also change the dependencyResolver, the dependent info is dropped with plugin stopping, unless we resolve everything again.
a reproducible repo should be found here. The pf4j version it’s using is v3.1.0, and same behavior under v3.4.1
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Developers - DependencyResolver lost dependent info after plugin ...
Have two plugins A and B, B depends on A. Step to reproduce: Resolve and start A/B; Stop A, A/B will be both...
Read more >pf4j/CHANGELOG.md at master - GitHub
Plugin Framework for Java (PF4J). Contribute to pf4j/pf4j ... 3.6.0 - 2021-01-16. Fixed. #394: DependencyResolver lost dependent info after plugin stop ...
Read more >Lost scope using DependencyResolver in another class ...
I can see several problems with the code above: 1) You are registering IStrategy,MyStrategy with a per WcfOperation lifestyle.
Read more >Much needed dependency management between jobs
So far as I can tell there is no way to prevent dependent projects from building when their upstreams are broken - via...
Read more >Announcing Poetry 1.2.0 | Blog
Since there are many changes in Poetry 1.2.0, this post details the ... plugin support and alternative install methods, Poetry lost the ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

The fix is available in version 3.6.0 (released today).
Hi @hank-cp and @decebals Thank you both for your involvement in this issue resolution. As for me, this issue is resolved (I tested it with locally built pf4j and sbp for the moment, but the plugins activation/deactivation is ok now)