-
Notifications
You must be signed in to change notification settings - Fork 176
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
Component create location do not change after hotswapping for static components #20928
Comments
That happens because static components are not supported. Try to open your application with a second tab / browser / user and you are going to see why 😉 |
I know that singleton scoped and static components are not supported but the location should be updated when class is reloaded. Copilot could not find the location where component is created so it creates a false exception |
Why you need this component to be declared as |
No, there is no requirement. I realized the component location does not change while trying to reproduce a bug. We can close this as singleton/ session scoped beans are not supported, but component location should change in my opinion even though it is not supported. |
Thanks! I'd keep this in the backlog for future, but would threat this as an enhancement for |
Description of the bug
When you have a component defined as static, changing the statement line does not have any effect on
ComponentTracker.Location
Expected behavior
Component create location should return the line of the new position.
Minimal reproducible example
Create a sample view with the following code
ComponentTracker returns the correct line at first, then after moving textField definition to the below constructor it still returns the same line
Logs :
Versions
Hilla: 24.7.0.alpha9
Flow: 24.7.0.alpha8
Vaadin: 24.7.0.alpha6
Copilot: 24.7-SNAPSHOT
Frontend Hotswap: Enabled, using Vite
OS: aarch64 Mac OS X 14.7.1
Java: JetBrains s.r.o. 21.0.5
Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Java Hotswap: Java Hotswap is enabled
IDE Plugin: 1.4.6 IntelliJ
The text was updated successfully, but these errors were encountered: