https://kotlinlang.org logo
Title
s

suresh

04/11/2023, 11:33 PM
Hi, new kobweb user here. First of all, thanks for creating this framework, really awesome work 👏👏. I was looking for something based on compose + dom with batteries included. I have a few questions. • Are there any plans to publish the dependencies to maven central? The current repos won’t work in corporate envs. • Usually how long would it take for live reloading. I know it depends on the app size and size of change we are making… The thing is, I am seeing more than 30 sec for a simple composable. Most if the time is taking on these gradle tasks
> Task :site:compileKotlinJs
> Task :site:jsMainClasses
> Task :site:compileDevelopmentExecutableKotlinJs
> Task :site:jsDevelopmentExecutableValidateGeneratedByCompilerTypeScript
> Task :site:jsDevelopmentExecutableCompileSync
> Task :site:jsBrowserDevelopmentWebpack
Is incremental compilation enabled for kobweb?
d

David Herman

04/11/2023, 11:41 PM
Welcome and thanks for trying out Kobweb! Yes it's absolutely my intention to publish to maven / gradle repositories. I haven't set it up yet because maven adds significant time to releasing (more often than not I've found sonatype to be down or really slow), so for the sake of speed and control I've been postponing. But 1.0 will be released in all the normal places.
30 seconds is nuts, I usually get about 7-8 seconds (which is still too slow...)
I did not enable incremental compilation by default because it kept causing problems
But I think you can enable it yourself
Are you running on a laptop?
s

suresh

04/11/2023, 11:44 PM
Yes on M1, openjdk 17
Doc days
Incremental compilation is enabled by default
https://kotlinlang.org/docs/js-ir-compiler.html#incremental-compilation-for-development-binaries - How are you disabling it, in the plugin ?
<http://kotlin.incremental.js.ir|kotlin.incremental.js.ir>=true
- is this enough to enable the incr compilaion?
d

David Herman

04/11/2023, 11:48 PM
Check the gradle.properties file I created in your project?
Oh looks like I'm not
s

suresh

04/11/2023, 11:49 PM
kotlin.code.style=official
d

David Herman

04/11/2023, 11:49 PM
So maybe it is on?
s

suresh

04/11/2023, 11:49 PM
yeah i think so
d

David Herman

04/11/2023, 11:50 PM
Cool, what I'm thinking about goes back at least half a year or more, maybe that changed at some point when I wasn't paying attention?
But then, the 30 second delay you're describing sounds awful, I would expect better on an m1
If you want, you can try doing a
./gradle kobwebStart -t
Which should be the same thing mostly
Might even be able to do a build scan?
s

suresh

04/11/2023, 11:52 PM
yeah let me play with it more and will report if i see any improvements.
d

David Herman

04/11/2023, 11:52 PM
Thanks
Note that you have to run
./gradlew kobwebStop
in that case or your server will keep running