question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Code autoreload not working for me

See original GitHub issue

Ktor Version

1.1.3

Ktor Engine Used(client or server and name)

EngineMain I guess?

JVM Version, Operating System and Relevant Context

JDK 1.8. Windows 10

Feedback

Okay I have a new project generated using the Ktor IDEA plugin. I’m just trying to make autoreload work (which should by default?). I have only one Kotlin file in src/Application.kt. My application.conf looks like this:

ktor {
    deployment {
        port = 8080
        port = ${?PORT}
        autoreload = true
        watch = [ MyProjectFolder ]
    }
    application {
        modules = [ com.company.ApplicationKt.module ]
    }
}

The issue is, when I change Application.kt the project doesn’t reload and the changes are not reflected in the browser. I see this in the run output:

2019-02-25 11:01:46.894 [main] DEBUG Application - Watching F:\Projects\MyProjectFolder\out\production\classes for changes.
2019-02-25 11:01:46.895 [main] DEBUG Application - Watching F:\Projects\MyProjectFolder\out\production\classes\com for changes.
...

I also tried com.company instead of MyProjectFolder in the watch list but that one is even worse. The run output shows autoreload is disabled.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:14 (1 by maintainers)

github_iconTop GitHub Comments

17reactions
AdityaAnand1commented, Feb 2, 2020

@cy6erGn0m @orangy @e5l This should be super high priority. Since autoreload never works, it really worsens the development experience 😿

7reactions
Aberrantfoxcommented, Apr 28, 2019

Same here, I’d also say the documentation on this is just very not clear unfortunately, so it’s very hard to know where to go with it… especially on maven - I had to swap to gradle to get it working at all but now it seems to have just stopped working altogether

Read more comments on GitHub >

github_iconTop Results From Across the Web

ipython autoreload doesn't work - Stack Overflow
I tried everything. I added the autoreload magic inside code, inside config file, everywhere. I also added the folder of the module to...
Read more >
autoreload magic doesn't reload objects · Issue #11588 - GitHub
I tried the git master ipython and went all the way back to ipython-6.0.0 - the problem is the same. And yes, I...
Read more >
Code autoreload not working for me : KTOR-664
The issue is, when I change Application.kt the project doesn't reload and the changes are not reflected in the browser. I see this...
Read more >
Using autoreload to speed up IPython and Jupyter work
I try to do all of my interactive Python development with either Jupyter notebooks or an IPython session. One of the main reasons...
Read more >
#23621 (Module autoreloading doesn't work due to some ...
The problem is - when reloading a module - it has absolutely the same path and it cannot be changed to prevent a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found