Skip to content

Add required OSGi capability to wire o.e.swt to its native fragments - #3561

Draft
HannesWell wants to merge 1 commit into
eclipse-platform:masterfrom
HannesWell:add-implementation-capability
Draft

Add required OSGi capability to wire o.e.swt to its native fragments#3561
HannesWell wants to merge 1 commit into
eclipse-platform:masterfrom
HannesWell:add-implementation-capability

Conversation

@HannesWell

Copy link
Copy Markdown
Member

This ensures that the org.eclipse.swt bundle can only resolve if a the native fragment of the current platform is available in the OSGi runtime. This also has the effect that for launches, where dependencies are added automatically, the native fragment of the current platform is always added without anything external that enforces its presence (like a feature).

Consequently this also allows to remove the p2 instructions doing the same at p2 level.

Fixes #490

This becomes possible by leveraging

to break the dependency cycle between the o.e.swt host bundle and it's native fragments during the reactor resolution at build time.

This is currently a draft since, we should introduce some mechanism to ensure the capability/requirement versions stay in sync with the o.e.swt host bundle version.
Probably we can do something similar to the javadoc-basher.

This ensures that the org.eclipse.swt bundle can only resolve if a the
native fragment of the current platform is available in the OSGi
runtime. This also has the effect that for launches, where dependencies
are added automatically, the native fragment of the current platform is
always added without anything external that enforces its presence (like
a feature).

Consequently this also allows to remove the p2 instructions doing the
same at p2 level.

Fixes eclipse-platform#490
@eclipse-platform-bot

Copy link
Copy Markdown
Contributor

This pull request changes some projects for the first time in this development cycle.
Therefore the following files need a version increment:

bundles/org.eclipse.swt.svg/META-INF/MANIFEST.MF
bundles/org.eclipse.swt.svg/pom.xml
examples/org.eclipse.swt.examples.ole.win32/META-INF/MANIFEST.MF
examples/org.eclipse.swt.examples.ole.win32/pom.xml

An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch.

Git patch
From 7c69028523367fef33d01537902d5a8595a5636a Mon Sep 17 00:00:00 2001
From: Eclipse Platform Bot <platform-bot@eclipse.org>
Date: Wed, 2 Sep 2026 18:19:52 +0000
Subject: [PATCH] Version bump(s) for 4.42 stream


diff --git a/bundles/org.eclipse.swt.svg/META-INF/MANIFEST.MF b/bundles/org.eclipse.swt.svg/META-INF/MANIFEST.MF
index 5091cce568..e9033ea311 100644
--- a/bundles/org.eclipse.swt.svg/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.swt.svg/META-INF/MANIFEST.MF
@@ -1,7 +1,7 @@
 Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-SymbolicName: org.eclipse.swt.svg
-Bundle-Version: 3.133.100.qualifier
+Bundle-Version: 3.133.200.qualifier
 Automatic-Module-Name: org.eclipse.swt.svg
 Bundle-Name: %fragmentName
 Bundle-Vendor: %providerName
diff --git a/bundles/org.eclipse.swt.svg/pom.xml b/bundles/org.eclipse.swt.svg/pom.xml
index 19bc72ffa7..d52e487d3f 100644
--- a/bundles/org.eclipse.swt.svg/pom.xml
+++ b/bundles/org.eclipse.swt.svg/pom.xml
@@ -19,7 +19,7 @@
 		<relativePath>../../</relativePath>
 	</parent>
 	<artifactId>org.eclipse.swt.svg</artifactId>
-	<version>3.133.100-SNAPSHOT</version>
+	<version>3.133.200-SNAPSHOT</version>
 	<packaging>eclipse-plugin</packaging>
 	<properties>
 		<tycho.extraClasspathJars>IGNORE</tycho.extraClasspathJars>
diff --git a/examples/org.eclipse.swt.examples.ole.win32/META-INF/MANIFEST.MF b/examples/org.eclipse.swt.examples.ole.win32/META-INF/MANIFEST.MF
index 46c733572b..4aa2a5f02e 100644
--- a/examples/org.eclipse.swt.examples.ole.win32/META-INF/MANIFEST.MF
+++ b/examples/org.eclipse.swt.examples.ole.win32/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %plugin.SWTOLEExample.name
 Bundle-SymbolicName: org.eclipse.swt.examples.ole.win32; singleton:=true
-Bundle-Version: 3.110.100.qualifier
+Bundle-Version: 3.110.200.qualifier
 Bundle-Activator: org.eclipse.swt.examples.ole.win32.OlePlugin
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/examples/org.eclipse.swt.examples.ole.win32/pom.xml b/examples/org.eclipse.swt.examples.ole.win32/pom.xml
index 855c91dabe..23de8e179b 100644
--- a/examples/org.eclipse.swt.examples.ole.win32/pom.xml
+++ b/examples/org.eclipse.swt.examples.ole.win32/pom.xml
@@ -20,7 +20,7 @@
     <relativePath>../../</relativePath>
   </parent>
   <artifactId>org.eclipse.swt.examples.ole.win32</artifactId>
-  <version>3.110.100-SNAPSHOT</version>
+  <version>3.110.200-SNAPSHOT</version>
   <packaging>eclipse-plugin</packaging>
 
   <build>
-- 
2.55.0

Further information are available in Common Build Issues - Missing version increments.

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Test Results

196 files   -    16  196 suites   - 16   19s ⏱️ - 26m 4s
304 tests  - 4 629  303 ✅  - 4 604  0 💤  -  26  0 ❌ ±0  1 🔥 +1 
604 runs   - 6 517  603 ✅  - 6 338  0 💤  - 180  0 ❌ ±0  1 🔥 +1 

For more details on these errors, see this check.

Results for commit 7b06197. ± Comparison against base commit 38d2d76.

This pull request removes 4629 tests.
org.eclipse.swt.graphics.ImageWin32Tests ‑ testDisposeDrawnImageBeforeRequestingTargetForOtherZoom
org.eclipse.swt.graphics.ImageWin32Tests ‑ testDrawImageAtDifferentZooms(boolean)[1] true
org.eclipse.swt.graphics.ImageWin32Tests ‑ testDrawImageAtDifferentZooms(boolean)[2] false
org.eclipse.swt.graphics.ImageWin32Tests ‑ testImageDataForDifferentFractionalZoomsShouldBeDifferent
org.eclipse.swt.graphics.ImageWin32Tests ‑ testImageShouldHaveDimesionAsPerZoomLevel
org.eclipse.swt.graphics.ImageWin32Tests ‑ testRetrieveImageDataAtDifferentZooms(boolean)[1] true
org.eclipse.swt.graphics.ImageWin32Tests ‑ testRetrieveImageDataAtDifferentZooms(boolean)[2] false
org.eclipse.swt.graphics.ImageWin32Tests ‑ test_getImageData_fromCopiedImage
org.eclipse.swt.graphics.ImageWin32Tests ‑ test_getImageData_fromImageForImageDataFromImage
org.eclipse.swt.tests.gtk.Test_GtkConverter ‑ test_HeuristicASCII_dollarSign
…

@laeubi

laeubi commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

This is currently a draft since, we should introduce some mechanism to ensure the capability/requirement versions stay in sync with the o.e.swt host bundle version

From maven point of view one could use a property but this does not work well for IDE... in general it would be good if we could maybe have some kind of general placeholder (like $bundle-version$ / $host-version$) given that SWT is a singleton bundle - what then requires some extension in Equinox (during dev) and Tycho (during build).

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.

Introduce OSGi capability to wire o.e.swt to its native fragments

3 participants