facebook / buck

A fast build system that encourages the creation of small, reusable modules over a variety of platforms and languages.
https://buck.build
Apache License 2.0
8.56k stars 1.16k forks source link

Dependency File Rule Keys don't work for Kotlin #2315

Open IanChilds opened 5 years ago

IanChilds commented 5 years ago

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

kageiit commented 5 years ago

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

tyvsmith commented 5 years ago

@kageiit Is there an issue on youtrack tracking this?

IanChilds commented 4 years ago

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

tyvsmith commented 4 years ago

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

v-jizhang commented 4 years ago

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