infer icon indicating copy to clipboard operation
infer copied to clipboard

Support for kotlin

Open Sarthak30 opened this issue 6 years ago • 13 comments

Hi Team,

Thanks for the awesome tool. Can we also have support for Kotlin Language as we are now building new android apps using kotlin.

Thanks in advance.

Sarthak30 avatar Aug 20 '18 05:08 Sarthak30

Hello there, there are no current plans for Kotlin support I'm afraid.

Also see #308

Contributions always welcome 😉

martintrojer avatar Sep 18 '18 07:09 martintrojer

Re-opening and adding wishlist.

martintrojer avatar Sep 18 '18 14:09 martintrojer

Any update?

mnayef95 avatar May 24 '19 20:05 mnayef95

I've tried this one years ago.

I forgot the details, so sorry if I said wrong things.

27748027_10215823291478575_5139055035090812476_o

It started working. But a bunch of future improvement required.

  1. Some temp variable introduced by underlying library was appeared.
  2. In some case false positive appeared which was not seen in Java version.
  3. Code cleanup.

Basically, Kotlin support is implemented based on Java class file, so it's not too-hard compared to build-from-parser approach. But (even) this approach may introduce 1) & 2), so I think more investigation required.

nobuyuki avatar May 25 '19 05:05 nobuyuki

This is a very good tool. Any update on support for kotlin. Thanks

traw avatar Aug 17 '20 04:08 traw

I'd also like to hear from the infer team on official Kotlin's support!

nobuyuki avatar Aug 17 '20 10:08 nobuyuki

I am ready to invest time and energy on this, but I would need some help to get started.

Sarthak30 avatar Aug 17 '20 10:08 Sarthak30

I think the Infer team has the Kotlin support in their in-house version, so I'm happy if they can release it. :-)

nobuyuki avatar Aug 17 '20 13:08 nobuyuki

@nobuyuki Basically it's been one year for their in-house Kotlin version version, just wondering do you have any news?

liweijian avatar Jun 02 '21 02:06 liweijian

We don't have a Kotlin version at Facebook.

jvillard avatar Jun 02 '21 09:06 jvillard

@jvillard That makes me really sad, I wish I could use infer in my Kotlin project.

liweijian avatar Jun 03 '21 08:06 liweijian

just wondering do you have any news?

lUjek-Sh avatar May 05 '22 21:05 lUjek-Sh

There is experimental support for Kotlin, enable with --kotlin-capture.

Edit: on master.

ngorogiannis avatar May 06 '22 09:05 ngorogiannis

just wondering do you have any news?

+1 @ngorogiannis

SolomonSun2010 avatar Aug 18 '23 04:08 SolomonSun2010

How do you invoke kotlin support on a gradle module? Is it like infer run -- ./gradlew BUILDTASK --kotlin-capture?my module is mostly in kotlin with few legacy files in java

lokeshponnada avatar Nov 14 '23 23:11 lokeshponnada

Currently, there is no support for Kotlin capture on Gradle builds, I'm afraid.

There is command line support for invocations like infer -- kotlinc source.kt and also support for buck builds.

ngorogiannis avatar Nov 15 '23 07:11 ngorogiannis