Anyone else having issues with incremental compila...
# javascript
r
Anyone else having issues with incremental compilation on 1.8.0-RC?
t
IR?
r
yes
it's hard to reproduce. There are runtime errors about some mangled names inside library code. They are gone after clean and full rebuild.
t
I also have problems with mangling from time to time
r
The problem appears more often when my library is also incrementally compiled.
But I'm afraid it will come out with the final release, when more people start using 1.8.
c
you could try to create a youtrack issue where you also add an archive of your build directory
r
I'll try when I hit the issue again
s
What version did you use before 1.8.0-RC? In 1.7.20 there was a bunch of bugs in incremental compilation which lead broken references between different modules and all (at least known) were fixed in 1.8.0. One more thing, after switching between 1.7.0, 1.7.20, 1.8.0-RC1, 1.8.0-RC2, or 1.8.0 it worths to do clean build, because after switching the incremental cache data may be corrupted, it also may lead the broken references between modules. (However this issue has been fixed in coming 1.8.20)
r
I've used 1.7.21 without issues. I'm on 1.8.0-RC2 now and haven't experienced the problem for last two days.
I've located the problematic code.
It's fairly easy to describe but hard to create a reproducible example
1. Inside a library I have an interface with a
var
variable and
get()
+
set()
accessors.
2. Inside the same library I have two classes implementing this interface, which both override the variable using
super.*
calls:
Copy code
override var validatorError: String?
        get() = super.validatorError
        set(value) {
            super.validatorError = value
            // some additional action
        }
3. Inside the application using the library I have some code which uses the first class. I compile the code, run the app. I can modify the code and incremental compilation and hot reload works fine.
4. Now I add some code which uses the second class. The incremental compilation fails with an runtime error like this:
FormControl.prototype.get_validatorError_og9qg1_k$ is undefined
5. Clean build and full compilation works fine.
Is it enough to fill an issue?
In fact it's easy to reproduce with KVision 6.0.0 template project. Just add
numeric()
to the code, run compilation, add
range()
and the error is always there.
t
👍