buck icon indicating copy to clipboard operation
buck copied to clipboard

Dependency File Rule Keys don't work for Kotlin

Open IanChilds opened this issue 6 years ago • 5 comments

Right now Dependency File Rule Keys (https://buck.build/concept/rule_keys.html#manifest_based_rule_keys) are turned off for Kotlin.

For Java, we implement this by passing an implementation of FileManagerListener, ClassUsageTracker to the FileManager that we pass into the CompilationStep (see Jsr199JavacInvocation).

In Kotlin, it doesn't look like we pass a FileManager to the compiler. Does anyone know how we could get hold of which files we actually accessed by the compiler?

cc @jkeljo, @kageiit, @tyvsmith, @thalescm in case anyone has ideas

IanChilds avatar Sep 25 '19 22:09 IanChilds

I looked a bit into this and there was no obvious public api at the time that would give us the same level of instrumentation as the Javac file. It didnt help that there was no clear documentation around this either. It could be potentially done as a compiler plugin. Might just need to reach out to jetbrains folks directly

kageiit avatar Sep 25 '19 23:09 kageiit

@kageiit Is there an issue on youtrack tracking this?

tyvsmith avatar Oct 01 '19 22:10 tyvsmith

I've added https://youtrack.jetbrains.com/issue/KT-34253 for this

IanChilds avatar Oct 08 '19 19:10 IanChilds

Why are we closing this one? I don't see progress made on the youtrack yet.

tyvsmith avatar Feb 22 '20 01:02 tyvsmith

Thank you @tyvsmith, that's my fault. Reopened.

v-jizhang avatar Feb 24 '20 17:02 v-jizhang