korlibs / korge

KorGE Game Engine. Multiplatform Kotlin Game Engine
https://korge.org/
Other
2.48k stars 122 forks source link

Auto reload not working for multi module project #964

Closed Kietyo closed 1 year ago

Kietyo commented 2 years ago

Here's the project: https://github.com/Kietyo/KorgeboardDDR/tree/autoreload_no_work

soywiz commented 2 years ago

Are you saving each file before waiting for changes? Are the changes part of a scene? Can you share a video showing the problem?

Kietyo commented 2 years ago

Are you saving each file before waiting for changes?

Yes

Are the changes part of a scene?

Yes

Can you share a video showing the problem?

https://youtu.be/4lNynKYeew8

Note: Feel free to clone the repo above yourself and play around with it.

Logs

2:44:30 PM: Executing 'runJvmAutoreload'...

> Configure project :Common
Kotlin Multiplatform Projects are an Alpha feature. See: https://kotlinlang.org/docs/reference/evolution/components-stability.html. To hide this message, add 'kotlin.mpp.stability.nowarn=true' to the Gradle properties.

> Task :wrapper

BUILD SUCCESSFUL in 1s
1 actionable task: 1 executed

> Configure project :Common
Kotlin Multiplatform Projects are an Alpha feature. See: https://kotlinlang.org/docs/reference/evolution/components-stability.html. To hide this message, add 'kotlin.mpp.stability.nowarn=true' to the Gradle properties.

> Task :Common:compileKotlinJvm UP-TO-DATE
> Task :Common:compileJava NO-SOURCE
> Task :Common:jvmProcessResources NO-SOURCE
> Task :Common:jvmMainClasses UP-TO-DATE
> Task :Common:jvmJar UP-TO-DATE
> Task :KorgeClient:jvmProcessResources UP-TO-DATE
> Task :KorgeClient:compileKotlinJvm

> Task :KorgeClient:korgeProcessedResourcesJvmMain
Execution optimizations have been disabled for task ':KorgeClient:korgeProcessedResourcesJvmMain' to ensure correctness due to the following reasons:
  - Gradle detected a problem with the following location: 'C:\Users\kietm\GitHub\KorgeboardDDR\KorgeClient\build\korgeProcessedResources\jvm\main'. Reason: Task ':KorgeClient:jvmProcessResources' uses this output of task ':KorgeClient:korgeProcessedResourcesJvmMain' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.5/userguide/validation_problems.html#implicit_dependency for more details about this problem.

> Task :KorgeClient:jvmMainClasses

> Task :KorgeClient:runJvmAutoreload
Execution optimizations have been disabled for task ':KorgeClient:runJvmAutoreload' to ensure correctness due to the following reasons:
  - Gradle detected a problem with the following location: 'C:\Users\kietm\GitHub\KorgeboardDDR\KorgeClient\build\korgeProcessedResources\jvm\main'. Reason: Task ':KorgeClient:runJvmAutoreload' uses this output of task ':KorgeClient:korgeProcessedResourcesJvmMain' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.5/userguide/validation_problems.html#implicit_dependency for more details about this problem.
runJvmAutoreload:outputJars=[C:\Users\kietm\.gradle\caches\modules-2\files-2.1\com.soywiz.korlibs.korge.reloadagent\korge-reload-agent\3.0.0\98dfa9e6cae2fba8079d46007fd30b6e388d781c\korge-reload-agent-3.0.0.jar, C:\Users\kietm\.gradle\caches\modules-2\files-2.1\org.jetbrains.kotlin\kotlin-stdlib-jdk8\1.7.20-Beta\1d1ea85848e0d4e6349aac11e4d36e36871a278d\kotlin-stdlib-jdk8-1.7.20-Beta.jar, C:\Users\kietm\.gradle\caches\modules-2\files-2.1\org.jetbrains.kotlin\kotlin-stdlib-jdk7\1.7.20-Beta\bfd83a795c85e5ee6acd213c84672058126922bd\kotlin-stdlib-jdk7-1.7.20-Beta.jar, C:\Users\kietm\.gradle\caches\modules-2\files-2.1\org.jetbrains.kotlin\kotlin-stdlib\1.7.20-Beta\5ca54c5ff9f784807564c3f15615607cb5876f81\kotlin-stdlib-1.7.20-Beta.jar, C:\Users\kietm\.gradle\caches\modules-2\files-2.1\org.jetbrains.kotlin\kotlin-stdlib-common\1.7.20-Beta\7dc8e0a9a7295cf0dd3787c75a62ecfd8e64ad3e\kotlin-stdlib-common-1.7.20-Beta.jar, C:\Users\kietm\.m2\repository\org\jetbrains\annotations\13.0\annotations-13.0.jar]
[KorgeReloadAgent] In premain method
[KorgeReloadAgent] - httpPort=22011
[KorgeReloadAgent] - continuousCommand=-classpath C:\Users\kietm\GitHub\KorgeboardDDR/gradle/wrapper/gradle-wrapper.jar org.gradle.wrapper.GradleWrapperMain --no-daemon --warn --project-dir=C:\Users\kietm\GitHub\KorgeboardDDR --configuration-cache -t :KorgeClient:compileKotlinJvmAndNotify
[KorgeReloadAgent] - rootFolders=[C:\Users\kietm\GitHub\KorgeboardDDR\KorgeClient\build\classes\kotlin\jvm\main, C:\Users\kietm\GitHub\KorgeboardDDR\KorgeClient\build\kotlin\compileKotlinJvm\cacheable]
[KorgeReloadAgent] - Running -classpath C:\Users\kietm\GitHub\KorgeboardDDR/gradle/wrapper/gradle-wrapper.jar org.gradle.wrapper.GradleWrapperMain --no-daemon --warn --project-dir=C:\Users\kietm\GitHub\KorgeboardDDR --configuration-cache -t :KorgeClient:compileKotlinJvmAndNotify
NOT Using DisplayLink
running: Thread[DefaultDispatcher-worker-1,5,main]
#31: COMPUTED REFRESH RATE for D3DGraphicsDevice[screen=0] (120)
wglCreateContextAttribsARB.error: 0
#42: hWnd: native@0xd7101e, hDC: native@0xffffffffb7013f00, hRC: native@0x20000, component: com.soywiz.korgw.awt.AwtGameWindow$frame$1[frame0,133,2,1014x757,layout=java.awt.BorderLayout,title=Game,resizable,normal,defaultCloseOperation=HIDE_ON_CLOSE,rootPane=javax.swing.JRootPane[,7,30,1000x720,layout=javax.swing.JRootPane$RootLayout,alignmentX=0.0,alignmentY=0.0,border=,flags=16777673,maximumSize=,minimumSize=,preferredSize=],rootPaneCheckingEnabled=true]
#42: GL_VERSION: 3.3.14802 Core Profile Context 21.40.18.15 30.0.14018.15002, GL_VENDOR: ATI Technologies Inc.
#42: requestCoreProfile=true, isCore=true, extensions=305
wglCreateContextAttribsARB.error: 0
#42: hWnd: native@0xd7101e, hDC: native@0xffffffffb7013f00, hRC: native@0x10001, component: com.soywiz.korgw.awt.AwtGameWindow$frame$1[frame0,133,2,1014x757,layout=java.awt.BorderLayout,title=Game,resizable,normal,defaultCloseOperation=HIDE_ON_CLOSE,rootPane=javax.swing.JRootPane[,7,30,1000x720,layout=javax.swing.JRootPane$RootLayout,alignmentX=0.0,alignmentY=0.0,border=,flags=16777673,maximumSize=,minimumSize=,preferredSize=],rootPaneCheckingEnabled=true]
#42: GL_VERSION: 3.3.14802 Core Profile Context 21.40.18.15 30.0.14018.15002, GL_VENDOR: ATI Technologies Inc.
#42: requestCoreProfile=true, isCore=true, extensions=305
wglCreateContextAttribsARB.error: 0
#42: hWnd: native@0xd7101e, hDC: native@0xffffffffb7013f00, hRC: native@0x10002, component: com.soywiz.korgw.awt.AwtGameWindow$frame$1[frame0,133,2,1014x757,layout=java.awt.BorderLayout,title=Game,resizable,normal,defaultCloseOperation=HIDE_ON_CLOSE,rootPane=javax.swing.JRootPane[,7,30,1000x720,layout=javax.swing.JRootPane$RootLayout,alignmentX=0.0,alignmentY=0.0,border=,flags=16777673,maximumSize=,minimumSize=,preferredSize=],rootPaneCheckingEnabled=true]
#42: GL_VERSION: 3.3.14802 Core Profile Context 21.40.18.15 30.0.14018.15002, GL_VENDOR: ATI Technologies Inc.
#42: requestCoreProfile=true, isCore=true, extensions=305
swapIntervalEXT: Proxy interface to native function@0x7ffea8072680 (com.soywiz.korgw.win32.Win32OpenglContext$SwapIntervalCallback)
#42: Korgw.GameWindow.TooManyCallbacks, Too many callbacks to handle in this frame elapsedTime=34ms, availableTime=4ms pending timedTasks=0, tasks=0, processedTimedTasks=0, processedTasks=2
Preparing main module
com.soywiz.korge.view.Views@24937177
Changing scene to... class com.xenotactic.korge.scenes.RootScene (Kotlin reflection is not available) ... com.xenotactic.korge.scenes.RootScene@73555607
#42: Korgw.GameWindow.TooManyCallbacks, Too many callbacks to handle in this frame elapsedTime=62ms, availableTime=4ms pending timedTasks=1, tasks=1, processedTimedTasks=0, processedTasks=1
Changing scene to... class com.xenotactic.korge.scenes.MainScene (Kotlin reflection is not available) ... com.xenotactic.korge.scenes.MainScene@2151c30e
#42: Korgw.GameWindow.TooManyCallbacks, Too many callbacks to handle in this frame elapsedTime=117ms, availableTime=4ms pending timedTasks=1, tasks=1, processedTimedTasks=0, processedTasks=1
#42: Korgw.GameWindow.TooManyCallbacks, Too many callbacks to handle in this frame elapsedTime=5ms, availableTime=4ms pending timedTasks=1, tasks=2, processedTimedTasks=1, processedTasks=3
#42: RootScene, sceneDestroy called
#42: RootScene, sceneAfterDestroy called
#42: Korgw.GameWindow.TooManyCallbacks, Too many callbacks to handle in this frame elapsedTime=4ms, availableTime=4ms pending timedTasks=2, tasks=2, processedTimedTasks=0, processedTasks=8
[KorgeReloadAgent] - Exited continuous command with 1 code

> Task :KorgeClient:runJvmAutoreload FAILED

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.5/userguide/command_line_interface.html#sec:command_line_warnings

Execution optimizations have been disabled for 2 invalid unit(s) of work during this build to ensure correctness.
Please consult deprecation warnings for more details.
6 actionable tasks: 3 executed, 3 up-to-date

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':KorgeClient:runJvmAutoreload'.
> Build cancelled while executing task ':KorgeClient:runJvmAutoreload'

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 2m 8s
2:46:40 PM: Execution finished 'runJvmAutoreload'.
rafi0 commented 1 year ago

Hi, i think it doesn't work for all projects, not only multimodule ones. Im on windows 7, korge 3.1.0. Running a basic app right after creating a new korge project. I start the "runJvmAutoreload". I make a change in the scene, i press Ctrl+S and nothing happens. I also get this in console: [KorgeReloadAgent] - Exited continuous command with 1 code