Skip to content

Fix Graal initialization - #21444

Draft
Nadahar wants to merge 1 commit into
openhab:mainfrom
Nadahar:graal-sync
Draft

Fix Graal initialization#21444
Nadahar wants to merge 1 commit into
openhab:mainfrom
Nadahar:graal-sync

Conversation

@Nadahar

@Nadahar Nadahar commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

This is a companion PR of openhab/openhab-core#5787. The build will fail because the changes from openhab/openhab-core#5787 aren't in core.

I've done multiple things to make Graal initialization work. I'm hopeful that this will also make it possible to install and uninstall Graal based add-ons without restarting.

The steps are:

  • Swapping the classloader while creating the engine
  • Using the core GraalUtil for thread-safe language resolution
  • Implementing isReady() to indicate when initialization is complete
  • Breaking the cyclic dependency caused by the dependency trackers

Together these things make this seem dead stable to me. I can't say for sure that every measure is required; I've just worked to solve the problems I've met along the way. Maybe some aren't ultimately necessary, but I've included it all. Some things might be "better" even if they weren't the direct cause of the initialization problems.

I'm creating this as a draft, because both this and the core PR need further evaluation/discussion/testing.

The fix consists of swapping the classloader while creating the engine, using the core GraalUtil for language resolution, implementing `isReady()` to indicate when initialization is complete, and breaking the cyclic dependency caused by the dependency trackers. In addition, the features have been modified to rely on the core defined Graal features.

Signed-off-by: Ravi Nadahar <nadahar@rediffmail.com>
@Nadahar

Nadahar commented Aug 20, 2026

Copy link
Copy Markdown
Contributor Author

@florian-h05 @HolgerHees FYI.

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