Dependency modules not auto-reloading
- Dominant language
- Kotlin
- Stars
- 14.5k
- Forks
- 1.3k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 49
Description
**Ktor Version and Engine Used (client or server and name)**
1.2.2, server, Kotlin 1.3.41
**Describe the bug**
Auto-reload works for the primary module with ktor in it, but won't work for dependency modules, even though I've included the paths to those modules in the watch paths.
**To Reproduce**
I have 5 server modules:
```
/root
/server
/edge - module with ktor and the JVM main. Depends on controller and model directly
/controller - depends on data and model module directly
/data - depends on persist and model module directly
/persist
/model
```
The `:server:edge` module has the gradle `application` plugin attached, and I'm setting the working directory for it to root.
```
tasks.getByName("run") {
workingDir = rootDir
}
```
The server is set to watch the paths of all 5 server modules. When the server is running and I do a build for the `edge` module, changes for the `edge` module are updated without an application restart. Changes for other modules are not updated. I have to stop the server, and run it again to get changes in other modules.
**Expected behavior**
When a dependency is updated - auto reload would work for that module as well if it's path is set in the `watchPaths` list.
**This is for a private project. I can invite someone to the private project if need be.**
Contributor guide
Research direction
Start with the server's watchPaths configuration and the :server:edge Gradle run task, then reproduce the five-module setup by changing edge and a dependency module. Trace why a rebuild updates edge without restarting for dependency changes. Done means changes in every watched module are applied without stopping and restarting the server.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- backend, devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100