You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This annotation is used to embed Kotlin bytecode or something like.
Every single byte of Kotlin source code change will generate different @SourceDebugExtension
When enable quarkus.live-reload.instrumentation, it will check the class structure is same or not before reload.
This check always fail and fallback to application restart.
Expected behavior
When quarkus.live-reload.instrumentation enabled only affected classes be replaced when Kotlin source code changes
Should provide a mechanism to exclude unrelated annotation value comparison in dev mode.
disable @SourceDebugExtension via Kotlin compiler option -Xno-source-debug-extension in KotlinCompilationProvider
Kotlin compiler arguments defined in Maven/Gradle settings also need to be configured
because the initial compiled class is usually generated by Maven/Gradle plugin, and the live reload is another process, they don't share the same configuration
I don't think this is a good solution, since it need extra documentation and may have some side effect
Solution 2
another solution is to modify ClassComparisonUtil, ignore unrelated annotation values during live reload
I would modify ClassComparisonUtil to specifically ignore @SourceDebugExtension - we could have some list of annotations that are ignored which for now would contain only @SourceDebugExtension
Describe the bug
Kotlin 1.8+ introduce @SourceDebugExtension
This annotation is used to embed Kotlin bytecode or something like.
Every single byte of Kotlin source code change will generate different
@SourceDebugExtension
When enable
quarkus.live-reload.instrumentation
, it will check the class structure is same or not before reload.This check always fail and fallback to application restart.
Expected behavior
When
quarkus.live-reload.instrumentation
enabled only affected classes be replaced when Kotlin source code changesShould provide a mechanism to exclude unrelated annotation value comparison in dev mode.
Actual behavior
Kotlin source code change trigger application restart
How to Reproduce?
No response
Output of
uname -a
orver
Darwin Juns-MBP.local 24.0.0 Darwin Kernel Version 24.0.0: Sat Jul 13 00:58:03 PDT 2024; root:xnu-11215.0.165.0.4~50/RELEASE_X86_64 x86_64
Output of
java -version
java version "21.0.2" 2024-01-16 LTS
Quarkus version or git rev
3.13.0
Build tool (ie. output of
mvnw --version
orgradlew --version
)Gradle 8.9
Additional information
Kotlin version: 2.0.20-RC
The text was updated successfully, but these errors were encountered: