vaadin / flow

Vaadin Flow is a Java framework binding Vaadin web components to Java. This is part of Vaadin 10+.
Apache License 2.0
609 stars 167 forks source link

Hotswapper is unaware of stored sessions #19973

Closed Artur- closed 1 week ago

Artur- commented 1 week ago

Description of the bug

When you start a new project as "Debug using Hotswap Agent" in IntelliJ, hotswapping works and the open view is updated. However, if you stop the server and start it again, then the view is never updated anymore after a change. A manual refresh updates the view.

The cause seems to be that Hotswapper relies on SessionInitEvent events to track open sessions but no such event is fired for the session that already exists in the server / was persisted during restart.

Expected behavior

It always works

Minimal reproducible example

  1. New project
  2. "Debug using Hotswap Agent" in IntelliJ
  3. Edit code
  4. Stop the server
  5. "Debug using Hotswap Agent" in IntelliJ
  6. Edit code

Versions

Hilla: 24.5-SNAPSHOT Flow: 24.5-SNAPSHOT Vaadin: 24.5-SNAPSHOT Copilot: 24.5-SNAPSHOT Frontend Hotswap: Disabled, using pre-built bundle OS: aarch64 Mac OS X 14.6.1 Java: JetBrains s.r.o. 21.0.3 Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36 Java Hotswap: false IDE Plugin: ☑ 1.0.0.eap42

vaadin-bot commented 3 days ago

This ticket/PR has been released with Vaadin 24.5.0.beta2 and is also targeting the upcoming stable 24.5.0 version.