Skip to content

Conversation

jonahgraham
Copy link
Contributor

A number of places in the GTK4 API there is the possibility of passing in arrays of Strings, i.e. Java String[] -> char ** as input argument to C side.

This change adds better support to the JNI generator for this use case by converting the jobjectArray (String[]) to char ** on the C side.

Part of #2126
Split out of #2538

Copy link
Contributor

github-actions bot commented Sep 24, 2025

Test Results

   88 files   - 30     88 suites   - 30   6m 25s ⏱️ - 4m 40s
4 536 tests  - 37  4 516 ✅  - 35  15 💤  - 2  5 ❌ ±0 
  237 runs   - 61    229 ✅  - 60   3 💤  - 1  5 ❌ ±0 

For more details on these failures, see this check.

Results for commit 45f54ec. ± Comparison against base commit f38e115.

This pull request removes 37 tests.
AllGTKTests Test_GtkConverter ‑ test_HeuristicASCII_dollarSign
AllGTKTests Test_GtkConverter ‑ test_HeuristicASCII_emptyString
AllGTKTests Test_GtkConverter ‑ test_HeuristicASCII_letterA
AllGTKTests Test_GtkConverter ‑ test_HeuristicASCII_letters
AllGTKTests Test_GtkConverter ‑ test_HeuristicUTF16LE_null
AllGTKTests Test_GtkConverter ‑ test_HeuristicUTF16_AsciiLetters
AllGTKTests Test_GtkConverter ‑ test_HeuristicUTF16_Asciiletter
AllGTKTests Test_GtkConverter ‑ test_HeuristicUTF16_LotsOfLetters
AllGTKTests Test_GtkConverter ‑ test_HeuristicUTF16_letter
AllGTKTests Test_GtkConverter ‑ test_HeuristicUTF16_letters
…

♻️ This comment has been updated with latest results.

@iloveeclipse
Copy link
Member

Why are .so files changed? Shouldn't the binaries be rebuilt by the SWT build job?

@jonahgraham
Copy link
Contributor Author

The 5 test failures here all seem to be what is being investigated in #2532 and not caused by this PR.

@jonahgraham jonahgraham added the gtk4 GTK4 issues label Sep 24, 2025
@jonahgraham jonahgraham self-assigned this Sep 24, 2025
@jonahgraham jonahgraham moved this to In progress in GTK4 Full Support Sep 24, 2025
@jonahgraham
Copy link
Contributor Author

Why are .so files changed? Shouldn't the binaries be rebuilt by the SWT build job?

I don't know - they are changed in my workspace so I included them in the commit. I can exclude these change from this (and similar PRs) but how do tests work? Does the PR do the SWT build job? Actually I don't know what the SWT build job is, but I assumed it was something on Jenkins that runs on main branch?

@iloveeclipse
Copy link
Member

@HannesWell could explain it better, I believe you don't need to checkin any binaries in a PR, if native code is changed, Jenkins job will build everything needed and test with the updated binaries, and if merged, a job will be scheduled to push updated libraries to. I believe you should be able to see this in the git history.

@jonahgraham
Copy link
Contributor Author

OK - I will look around and update this soon.

@HannesWell
Copy link
Member

could explain it better, I believe you don't need to checkin any binaries in a PR, if native code is changed, Jenkins job will build everything needed and test with the updated binaries, and if merged, a job will be scheduled to push updated libraries to. I believe you should be able to see this in the git history.

Nope, cannot explain it better, that's exactly how it is. :)
I can only add that also the GH actions rebuild the binaries for the platform they are running on.
In general we try to avoid to have binaries contributed as they are very difficult to review.

@jonahgraham
Copy link
Contributor Author

Thanks @HannesWell - I have moved follow up questions on this to #2544

@eclipse-platform-bot
Copy link
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.tools/META-INF/MANIFEST.MF
features/org.eclipse.swt.tools.feature/feature.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 e1baf9aef5704fedfa6bb624d48e93b60593fb86 Mon Sep 17 00:00:00 2001
From: Eclipse Platform Bot <[email protected]>
Date: Thu, 25 Sep 2025 14:45:01 +0000
Subject: [PATCH] Version bump(s) for 4.38 stream


diff --git a/bundles/org.eclipse.swt.tools/META-INF/MANIFEST.MF b/bundles/org.eclipse.swt.tools/META-INF/MANIFEST.MF
index 8e889fffa5..7798f42e14 100644
--- a/bundles/org.eclipse.swt.tools/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.swt.tools/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-Name: %pluginName
 Bundle-Vendor: %providerName
 Bundle-SymbolicName: org.eclipse.swt.tools; singleton:=true
-Bundle-Version: 3.110.800.qualifier
+Bundle-Version: 3.110.900.qualifier
 Bundle-ManifestVersion: 2
 Export-Package: org.eclipse.swt.tools.internal; x-internal:=true
 Bundle-ActivationPolicy: lazy
diff --git a/features/org.eclipse.swt.tools.feature/feature.xml b/features/org.eclipse.swt.tools.feature/feature.xml
index 145eb4e15b..06a466f73a 100644
--- a/features/org.eclipse.swt.tools.feature/feature.xml
+++ b/features/org.eclipse.swt.tools.feature/feature.xml
@@ -2,7 +2,7 @@
 <feature
       id="org.eclipse.swt.tools.feature"
       label="%featureName"
-      version="3.109.800.qualifier"
+      version="3.109.900.qualifier"
       provider-name="%providerName"
       license-feature="org.eclipse.license"
       license-feature-version="0.0.0">
-- 
2.51.0

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

A number of places in the GTK4 API there is the possibility of passing
in arrays of Strings, i.e. Java String[] -> char ** as input argument
to C side.

This change adds better support to the JNI generator for this use case
by converting the jobjectArray (String[]) to char ** on the C side.

Part of #2126
Split out of #2538
@jonahgraham
Copy link
Contributor Author

The only failing tests are the Windows KeyEvent ones tracked in #2156.

This is ready to merge. As a few other people have had a look in here I will wait a bit for last minute comments before merging myself

@akurtakov akurtakov removed the gtk4 GTK4 issues label Sep 25, 2025
Copy link
Member

@akurtakov akurtakov left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@akurtakov
Copy link
Member

Test failures are keyevent on windows and generally crashing tests on gtk4.
@jonahgraham Please don't add gtk4 label for such changes as we want to have them tested with gtk3 .

@akurtakov akurtakov merged commit 52c9fff into eclipse-platform:master Sep 25, 2025
14 of 17 checks passed
@github-project-automation github-project-automation bot moved this from In progress to Done in GTK4 Full Support Sep 25, 2025
@jonahgraham
Copy link
Contributor Author

Please don't add gtk4 label for such changes as we want to have them tested with gtk3 .

OK - I didn't realize that gtk4 label changed the tests. I see it now in

SWT_GTK4: "${{ contains(github.event.pull_request.labels.*.name, 'gtk4') && '1' || '0' }}"

@jonahgraham jonahgraham deleted the jni-generator branch September 25, 2025 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants