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.
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
dmitriy.novozhilov
12/05/2024, 2:24 PM
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
Timo Drick
12/05/2024, 10:34 PM
@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
Timo Drick
12/05/2024, 10:36 PM
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