imports (coming from exports) should not be added if the export does not specify a version, because it would lead to imports without a version-range. this could cause resolver problems because the resolver then has no version constrains and too many wiring options.
to add version to the exports to make it still pass.
because if versions are on the exports directly (not derived from the bundle version) then those versions are added to the imports as a range and the test passes as before.
Additionally I have added another test which basically is like testNoImportForUsedExport_971 before this PR, but this testcase now shows that the imports are not added when the exports don't have a version.
Closes #6267
imports (coming from exports) should not be added if the export does not specify a version, because it would lead to imports without a version-range. this could cause resolver problems because the resolver then has no version constrains and too many wiring options.
Testcases
The existing testcase
BuilderTest#testNoImportForUsedExport_971
needed adjustment. According to https://github.com/bndtools/bnd/issues/6267#issuecomment-2351036049 it does also not comply with the spec in its previous form.Here is what has changed:
BEFORE this PR
testNoImportForUsedExport_971
AFTER this PR
testNoImportForUsedExport_971 was adjusted
Additionally I have added another test which basically is like
testNoImportForUsedExport_971
before this PR, but this testcase now shows that the imports are not added when the exports don't have a version.testEnsureNoImportForUsedExport_971_WithMissingExportVersion