Hi i am developing a preview system (some kind of ...
# compiler
t
Hi i am developing a preview system (some kind of live coding tool) and i want to recompile only files that changed. I am using the embedded K2JVMCompiler for this. Everything works fine so far but i do have one problem with function that are declared as 'inline' when i give the compiler all source files than it compiles fine. But when i give the compiler only one file that changed the compiler complains about the internal functions.
Copy code
welcome_config.kt:270:21: error: cannot access 'fun ButtonConfiguration(...'
Is it possible to disable this check for internal functions or is there an other parameter that i can specify which classes belongs to the module?
d
You can pass path to compiled .class files with
-Xfriend-paths
argument In this case compiler will consider as "friends" of the source set which is being compiled, which allows to access the
internal
declaration from them
t
@dmitriy.novozhilov Thank you very much for the answer. Yes it is working i just use my destination folder also as friend-paths than it works. Really great
I had also the problem that i did used the class path of the parent application which also included the same class files. Then it is not working. So i had to exclude from the class path the parent application classpath
But now everything looks really promising
👍 1