Skip to content

Add filter to allow disabling an OSGi capability requirement - #1073

Merged
laeubi merged 1 commit into
eclipse-equinox:masterfrom
laeubi:disbale_req
Aug 9, 2026
Merged

Add filter to allow disabling an OSGi capability requirement#1073
laeubi merged 1 commit into
eclipse-equinox:masterfrom
laeubi:disbale_req

Conversation

@laeubi

@laeubi laeubi commented May 18, 2026

Copy link
Copy Markdown
Member

This allows to use generic require capability in builds that otherwise would create a cyclic dependency issue.

This is similar to what SWT does here:

https://github.com/eclipse-platform/eclipse.platform.swt/blob/7f9089ed7daaf630970fea7fa5bdb18cfba5cdcb/bundles/org.eclipse.swt/META-INF/p2.inf

  1. It create a requirement to its fragment
  2. The fragment has a requirement to the host
  3. To break the cycle there is a !(org.eclipse.swt.buildtime=true) filter property that we then set here https://github.com/eclipse-platform/eclipse.platform.swt/blob/7f9089ed7daaf630970fea7fa5bdb18cfba5cdcb/bundles/org.eclipse.swt/pom.xml#L39-L41 to disable this only for building the host.

This change has to actually happen at Tycho (where we should have a integration test), but for consistency and to gather some agreement first I opened it here.

@laeubi
laeubi requested a review from merks May 18, 2026 05:21

@merks merks left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like a good idea. Some tiny little suggestions.

@github-actions

github-actions Bot commented May 18, 2026

Copy link
Copy Markdown

Test Results

   18 files  ± 0     18 suites  ±0   29m 45s ⏱️ + 2m 10s
2 200 tests + 8  2 197 ✅ + 8  3 💤 ±0  0 ❌ ±0 
5 254 runs  +24  5 245 ✅ +24  9 💤 ±0  0 ❌ ±0 

Results for commit fd70359. ± Comparison against base commit a09757e.

♻️ This comment has been updated with latest results.

@laeubi
laeubi force-pushed the disbale_req branch 2 times, most recently from 4a0085d to 727af86 Compare June 10, 2026 06:11
@laeubi
laeubi requested a review from merks June 10, 2026 06:11

@merks merks left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine in general.

It would be nice if somewhere in all this is show an example of what's generated in the serialized p2 metadata for this.

@merks merks left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable.

@laeubi

laeubi commented Aug 6, 2026

Copy link
Copy Markdown
Member Author

I need to check why this breaks the build but have in the meanwhile prepared a symmetric change on the Tycho side as well:

Co-authored-by: Ed Merks <Ed.Merks@gmail.com>
@laeubi

laeubi commented Aug 9, 2026

Copy link
Copy Markdown
Member Author

Build is now green, I'm not sure if we should merge this right now or wait for the next release before M2. @merks (or others) WDYT?

@merks

merks commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

@laeubi

I think it's find to merge this for this cycle. We've done similar types of changes in the past without a single complaint as a result.

@laeubi
laeubi merged commit 529df3a into eclipse-equinox:master Aug 9, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants