How does FIR work when importing files? Does it ha...
# compiler
j
How does FIR work when importing files? Does it have some kind of engine to recheck if the file content is changing to automatically trigger the checkers/codegen? This question is related to how Kotlin Dataframe
@Import
annotation works as it does codegen based on which file is provided to the
@Import
annotation.
d
What do you mean? Is it about incremental compilation?
j
You add the code and it codegen some classes. The CSV file is changed to add a new column. After you write anything in the IDE, it recheck that the CSV has a new column? What about writing anything in a different file that does not contain the annotation but it is using the property with the data?
d
cc @Nikita Klimenko [JB]
n
Hi. Right now it's not smart at all and does IO all the time, so it's better not to "import" big files or links. The idea for improvement is to maybe only check file content only when compile task in gradle is executed. It works like this for readJson already, but there are some drawbacks with this approach too
j
The idea for improvement is to maybe only check file content only when compile task in Gradle is executed.
This would break the IDE integration, no?
n
Well, yeah, readJson for example still works in IDE in not-optimal way unless you run assemble. After schema for specific path argument is "cached" and plugin doesn't perform any heavy io anymore
👍 1
thank you color 1