Skip to content

fix: add -XstartOnFirstThread to UI launch configs for macOS#1283

Draft
joaodinissf wants to merge 7 commits intodsldevkit:masterfrom
joaodinissf:fix/start-on-first-thread
Draft

fix: add -XstartOnFirstThread to UI launch configs for macOS#1283
joaodinissf wants to merge 7 commits intodsldevkit:masterfrom
joaodinissf:fix/start-on-first-thread

Conversation

@joaodinissf
Copy link
Copy Markdown
Collaborator

Summary

  • Adds -XstartOnFirstThread VM argument to all RuntimeWorkbench and SWTBot launch configurations
  • Required on macOS (Cocoa) where SWT needs the Display created on the main thread
  • Without this, all UI launch configs fail with SWTException: Invalid thread access

Affected files (7)

  • ddk-configuration/launches/devkit-run.launch
  • com.avaloq.tools.ddk.sample.helloworld/.launch/Launch Runtime Eclipse.launch
  • com.avaloq.tools.ddk.check.ui.test/CheckUiTestSuite.launch
  • com.avaloq.tools.ddk.checkcfg.ui.test/CheckCfgUiTestSuite.launch
  • com.avaloq.tools.ddk.test.ui.test/AllTests.launch
  • com.avaloq.tools.ddk.xtext.test/AllTests DDK.launch
  • com.avaloq.tools.ddk.xtext.ui.test/XtextUiTestSuite.launch

Test plan

  • Verified devkit-run launches successfully on macOS with this change
  • CI is unaffected (runs on Ubuntu with xvfb-run)

🤖 Generated with Claude Code

joaodinissf and others added 3 commits March 7, 2026 09:20
On macOS (Cocoa), SWT requires the Display to be created on the main
thread. Without -XstartOnFirstThread, all RuntimeWorkbench and SWTBot
launch configs fail with "Invalid thread access".

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
SunOS/Solaris is no longer a relevant target platform.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add a macosx profile activated on family=mac that sets OSGI properties
(macosx/cocoa/aarch64) and appends -XstartOnFirstThread to test JVM
options, fixing SWTException: Invalid thread access on macOS.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@joaodinissf joaodinissf marked this pull request as draft March 7, 2026 12:10
joaodinissf and others added 4 commits March 7, 2026 13:51
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The maven-clean-plugin deletes everything under xtend-gen/ including
the .gitignore placeholder files that keep these directories tracked
by git. Exclude .gitignore from the clean fileset so that running
mvn clean no longer causes dirty working tree status.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
On macOS, SWT Cocoa's modal event loop inside WizardDialog.open() blocks
Display.sleep() on NSRunLoop.runMode(distantFuture). SWTBot's syncExec-based
polling cannot reliably wake this up without OS focus. This is consistent
with Eclipse Foundation practice: SWTBot wizard tests run on Linux CI
(with xvfb), not on macOS.

Revert SwtWizardBot to the original simple implementation and add
@DisabledOnOs(OS.MAC) to CheckProjectWizardTest and CheckCatalogWizardTest.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
These .tycho-consumer-pom.xml files are generated during mvn builds
and should not be tracked.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@joaodinissf joaodinissf force-pushed the fix/start-on-first-thread branch from faa451c to 7bce3ca Compare March 7, 2026 12:51
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.

1 participant