Closed d3bjorn closed 2 years ago
As far as I can see, this is the only place where we say "unable to resolve" in knopflerfish.org.
OK, but is the underlying problem(s) propagated and logged correctly with this change?
I think so. It looks like BundleImpl calls resolvePackages on BundleGeneration, which calls resolvePackages on BundlePackages, which calls the Resolver, and if there is a failReason returned from Resolver, the "unable to resolve" BundleException is thrown with the failReason in its message.
When I run the tests, the framework_test bundle causes this to be logged a few times, which seems to be expected by those tests.
Maybe we want to include the bundle name in similar BundleException messages? For example, I found it very useful to include it for "start failed" when investigating test bundles failing to start.
Sound like a good idea.
Just a quick note - can we be sure the bundle name / symbolic name is always present if a bundle fails to a) resolve or b) fails to start? Or can it be null in certain cases
It looks like the name can be null, but I think that's a rare case and getting "null" would be ok in those cases. It looks like, in theory, current BundleGeneration could be missing after using the system bundle's BundleImpl constructor, but if that happens BundleImpl would crash very hard before trying to log anything, so I don't think it can actually happen.
Improve framework log message when unable to resolve https://github.com/knopflerfish/knopflerfish.org/issues/42