vaadin / flow

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

feat: add a common API to integrate with hotswap tools #19603

Closed mcollovati closed 3 days ago

mcollovati commented 1 week ago

Description

Adds API to integrate with hotswap agents and to allow plugging class change reload plugins.

Part of #19261 Part of #19262

Type of change

Checklist

Additional for Feature type of change

github-actions[bot] commented 1 week ago

Test Results

1 127 files  + 2  1 127 suites  +2   1h 26m 14s :stopwatch: + 2m 48s 7 298 tests +31  7 248 :white_check_mark: +30  50 :zzz: +1  0 :x: ±0  7 635 runs  +87  7 575 :white_check_mark: +84  60 :zzz: +3  0 :x: ±0 

Results for commit 993884f1. ± Comparison against base commit 0f04327c.

:recycle: This comment has been updated with latest results.

mcollovati commented 1 week ago

I did get class reloads to work quite ok and the route change did update the available route, but only as long as I have visited the route at least once.

I noticed the same when the hotswap plugin is not initialized before the RouteRegistryInitializer is executed. Otherwise, changes to routes are applied even if not visited. But probably there are other situations that prevent the plugin being notified about the changes. Sometimes, I also noticed that even if I update and recompile a class, IDEA says: "0 classes to reload" (or something similar)

mshabarov commented 3 days ago

Tested in conjunction with Vaadin HotSwapAgent plugin enhancement and the live reload worked for me very well, without any class loader exceptions and with stable UI updates.

Let me now review the code.

sonarcloud[bot] commented 3 days ago

Quality Gate Passed Quality Gate passed

Issues
4 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud