Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support hotreload? #50

Open
maxandersen opened this issue May 24, 2024 · 4 comments
Open

support hotreload? #50

maxandersen opened this issue May 24, 2024 · 4 comments
Assignees

Comments

@maxandersen
Copy link
Member

would be nice if hitting 's' which is force hot restart would work with quarkus-fx.

for now it seems to get stuck when one use 's' in devmode.

@CodeSimcoe
Copy link
Contributor

Hello Max,
I see 2 issues right now :

  • initiating restart hangs (until stage is closed). I think that could be done/fixed.
  • A JavaFX app cannot be "restarted" : call to start() method must only be done once

Handling hotreload is in my mind since the beginning, but I don't see any good way to do it for now

@CodeSimcoe
Copy link
Contributor

CodeSimcoe commented Jun 9, 2024

@maxandersen you can try latest version on main, it should not hang anymore.
I tried to modify a FX Controller but changes are not hot loaded. I'll try to figure it out... but I could use some help from someone that has knowledge about hot reload

@CodeSimcoe CodeSimcoe self-assigned this Jun 9, 2024
@CodeSimcoe
Copy link
Contributor

CodeSimcoe commented Jul 12, 2024

Hang is fixed in 0.4.2.
For the rest, live reloading FX controllers is tricky because they have references to graphic elements, I'll work on that.

@CodeSimcoe
Copy link
Contributor

CodeSimcoe commented Sep 20, 2024

Some updates.
I've created a PR to have CSS live reload (that's not really Quarkus related, but it's worth integrating in dev mode).

For controllers reload, the issue is that UI actions (live button events or so) are still bound to "old" components.
If you modify a controller then hot reload the app, the action would still land on the old code.
We could update all references to new components (but that seem tricky as we don't really have our hands on FXMLLoader) or do something somewhat degraded but better than nothing : update old components' injection points with new references (so that if you update your service, the action would land on the newly updated code) but that still requires some low level processings.

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

No branches or pull requests

2 participants