Hi, can someone please explain to me how auto-relo...
# ktor
j
Hi, can someone please explain to me how auto-reload works? I have development mode enabled, I tried both embeddedServer and EngineMain, I tried changing watch paths, but auto-reload works only after the first change - subsequent changes are completely ignored. I would expect that if I recompile the project, it produces new files in build/classes - watcher detects that and triggers the reload, so this log message should appear with every change/rebuild. Instead nothing happens... Ktor 3.5.0, nothing special, just a few routes with kotlinx-html responses
a
So the application is reloaded during the auto-reloading; however, only once?
j
yes, exactly. I only see this log message once - during the first change. It's as if the watcher stops after that first reload.
a
Can you please share your server code to reproduce the issue?
j
I'll try to create some minimal example of it on github
new info: ktor version 3.4.0 works as expected
So it looks like a regression in 3.5.0. Why is the reload triggered with a next incoming request though? Is there a reason to not reload it right away after recompilation?
a
Thank you for the sample project. Unfortunately, it's a bug, so I've filed an issue (youtrack.jetbrains.com/issue/KTOR-9677). As a workaround, you can use Ktor 3.4.3.
👍 1