Bundle Management API Usability Improvement
- Dominant language
- C
- Stars
- 193
- Forks
- 99
- Avg merge
- 1m
- Merged PRs (30d)
- 1
Description
Our current API relies on bundle ID, which servers as a safe handle to dynamic bundle objects.
Though the usage of bundle ID provides safety, it also brings inconvenience to our users.
They have to traverse the list of installed bundles to find out ID of the bundle they want to manipulate using location or symbolic name.
Another usability issue I found is that we don't support bundles with the same symbolic name but of different versions:
```C
/*
* NOTE only allowing a single bundle with a symbolic name.
* OSGi spec allows same symbolic name and different versions, but this is risky with
* the behaviour of dlopen when opening shared libraries with the same SONAME.
*/
bool alreadyInstalled = celix_framework_isBundleAlreadyInstalled(bundle->framework, symName);
if (alreadyInstalled) {
status = CELIX_BUNDLE_EXCEPTION;
fw_logCode(bundle->framework->logger, CELIX_LOG_LEVEL_ERROR, status, "Cannot create module, bundle with symbolic name '%s' already installed.", symName);
}
```
Suppose I want to programmatically install a bundle of the same symbolic name as of an installed bundle but of a different version and it failed, what can I do?
I have no idea of the conflicting symbolic name, since I can not have a look at the logging messaging to find out what's wrong.
Neither can I find it out from a bundle not installed yet.
Without the conflicting symbolic name, I don't know which bundle to uninstall first before installing the new one.
IIRC, `dlopen` can open libraries of the same soname but of different paths on Linux.
I can't see why we don't support it at the first place. Maybe it will cause trouble on macOS?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.