[FEA] Support Eclipse Features on -buildpath and container paths - #7339
Open
peterkir wants to merge 4 commits into
Open
[FEA] Support Eclipse Features on -buildpath and container paths#7339peterkir wants to merge 4 commits into
peterkir wants to merge 4 commits into
Conversation
chrisrueger
reviewed
Jul 27, 2026
peterkir
force-pushed
the
ecl-fea-buildpath
branch
2 times, most recently
from
August 4, 2026 07:51
caa5d30 to
fc6c3ec
Compare
peterkir
added a commit
that referenced
this pull request
Aug 28, 2026
Container previously had an Eclipse-specific TYPE.ECLIPSE_FEATURE value with expansion logic (feature.xml relation parsing, os/ws/arch platform filtering, version fallback) hardcoded in Project. Per discussion on #7339, delegate typed-resource expansion to the repository that recognizes the identity type instead of baking any one vendor's semantics into core bnd. - Container.TYPE.ECLIPSE_FEATURE -> TYPED_RESOURCE, vendor-neutral javadoc; Project.toContainer() now flags any identity with a type attribute as TYPED_RESOURCE, not just org.eclipse.update.feature - New RepositoryPlugin#getTypedResourceMembers(Container, Set<String>) default method; repositories that don't recognize the type return null so others get a chance to expand it - Project.getTypedResourceMembers() replaces the old Eclipse-specific getFeatureMembers()/getFeatureMember()/findFeatureResource() and simply loops repositories and delegates, keeping only generic cycle detection - Move all Eclipse feature.xml specifics out of bndlib into the p2 provider: P2Repository now implements getTypedResourceMembers(); EclipsePlatform and the RELATION_*/TYPE constants move to aQute.p2.provider.Feature and aQute.bnd.repository.p2.provider - Container.getMembers(Set<String>) made public so repository implementations can recurse while sharing the cycle guard - Bump aQute.bnd.service.repository and aQute.bnd.repository.p2.provider package versions for the new default method (MINOR baseline change) - Update bndtools.core call sites to the relocated Feature.TYPE constant; fix a duplicate convertRepoFeature() and a stray ECLIPSE_FEATURE switch case in SubsystemExporter left over from rebasing onto master - Rewrite FeatureBuildpathTest to use a made-up type/relation vocabulary with its own RepositoryPlugin test double, proving Container/Project no longer know anything Eclipse-specific - Fix RepoBundleSelectionWizardPage's "Available Bundles" search filter, which never matched RepositoryFeature/FeatureVersionNode entries so features were never filtered out Signed-off-by: peterkir <peter@klib.io>
Features are now first-class citizens on -buildpath, -testpath, -runpath and
-runbundles. The canonical syntax is:
-buildpath: org.eclipse.e4.rcp;version='4.40.0';type=org.eclipse.update.feature
A feature expands to its member bundles: <plugin> references and <includes>
recursively, with platform filtering and exact→highest version fallback.
Core changes (biz.aQute.bndlib):
- Container.TYPE.FEATURE with member expansion via Project.getFeatureMembers()
- Type-aware version lookup via Repository.findProviders (not RepositoryPlugin.versions)
- EclipsePlatform matcher for os/ws/arch platform filters
- Project.getBundles() flattens features for all consumers (classpath, launcher, IDE)
Index changes (biz.aQute.repository):
- Feature.toResource() enrichment with bnd.relation/id/version/type/os/ws/arch attributes
- P2Indexer self-healing reindex for stale caches + .feature.jar cache-link suffix
UI changes (bndtools.core):
- RepositoryBundleSelectionPart: canonical clause on DND and wizard add
- SelectionDragAdapter: text drag produces canonical clause
- VersionedClauseLabelProvider: feature icon in buildpath list
- RepoBundleSelectionWizardPage: type-aware selection keying
SWTBot infrastructure (bndtools.core.test):
- launch.rendered.bnd: RenderedLauncher for real Eclipse widgets
- swtbot.tests.bnd: SWTBot test bundle with fixture workspace
- FeatureBuildPathWizardSwtbotTest: Add Bundle dialog feature selection
- FeatureBuildPathDndSwtbotTest: Repositories view drag→Build Path
Tests:
- FeatureBuildpathTest (6 cases: nested, platform filter, cycles, fallback, optional, error)
- FeatureParserTest.testMemberRelationAttributes (enrichment contract)
- SWTBot UI tests (green on win32)
API changes:
- aQute.bnd.build 4.7.1 → 4.8.0 (Container.TYPE.FEATURE)
- aQute.bnd.osgi.resource 5.1.0 → 5.2.0 (TYPE_ECLIPSE_FEATURE, FEATURE_RELATION_*)
- aQute.p2.provider 1.0.0 → 1.1.0 (relation attributes)
All changes additive; full backward compatibility.
Signed-off-by: Peter Kirschner <peter@klib.io>
Container previously had an Eclipse-specific TYPE.ECLIPSE_FEATURE value with expansion logic (feature.xml relation parsing, os/ws/arch platform filtering, version fallback) hardcoded in Project. Per discussion on #7339, delegate typed-resource expansion to the repository that recognizes the identity type instead of baking any one vendor's semantics into core bnd. - Container.TYPE.ECLIPSE_FEATURE -> TYPED_RESOURCE, vendor-neutral javadoc; Project.toContainer() now flags any identity with a type attribute as TYPED_RESOURCE, not just org.eclipse.update.feature - New RepositoryPlugin#getTypedResourceMembers(Container, Set<String>) default method; repositories that don't recognize the type return null so others get a chance to expand it - Project.getTypedResourceMembers() replaces the old Eclipse-specific getFeatureMembers()/getFeatureMember()/findFeatureResource() and simply loops repositories and delegates, keeping only generic cycle detection - Move all Eclipse feature.xml specifics out of bndlib into the p2 provider: P2Repository now implements getTypedResourceMembers(); EclipsePlatform and the RELATION_*/TYPE constants move to aQute.p2.provider.Feature and aQute.bnd.repository.p2.provider - Container.getMembers(Set<String>) made public so repository implementations can recurse while sharing the cycle guard - Bump aQute.bnd.service.repository and aQute.bnd.repository.p2.provider package versions for the new default method (MINOR baseline change) - Update bndtools.core call sites to the relocated Feature.TYPE constant; fix a duplicate convertRepoFeature() and a stray ECLIPSE_FEATURE switch case in SubsystemExporter left over from rebasing onto master - Rewrite FeatureBuildpathTest to use a made-up type/relation vocabulary with its own RepositoryPlugin test double, proving Container/Project no longer know anything Eclipse-specific - Fix RepoBundleSelectionWizardPage's "Available Bundles" search filter, which never matched RepositoryFeature/FeatureVersionNode entries so features were never filtered out Signed-off-by: peterkir <peter@klib.io>
peterkir
force-pushed
the
ecl-fea-buildpath
branch
from
August 28, 2026 10:19
3746589 to
cdb48c7
Compare
chrisrueger
reviewed
Aug 28, 2026
Signed-off-by: Christoph Rueger <chrisrueger@gmail.com>
Signed-off-by: Christoph Rueger <chrisrueger@gmail.com>
synesty-cr
approved these changes
Aug 31, 2026
synesty-cr
left a comment
There was a problem hiding this comment.
Looks good and compiles. I think the feature is in a good shape with minimal impact and minimal api extensions and allows to use it in other (potentially future) repositories.
Contributor
|
@sad-poet Review from your end would be great |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #7322
Features are now first-class citizens on -buildpath, -testpath, -runpath and -runbundles. The canonical syntax is:
A feature expands to its member bundles: references and
recursively, with platform filtering and exact→highest version fallback.
Core changes (biz.aQute.bndlib):
Index changes (biz.aQute.repository):
UI changes (bndtools.core):
SWTBot infrastructure (bndtools.core.test):
Tests:
API changes:
All changes additive; full backward compatibility.