Skip to content

Commit

Permalink
Make sure to default to K1
Browse files Browse the repository at this point in the history
Summary:
Honestly the `kotlin.use_k2` property is a bit misleading right now, since if you set it to true, then **maybe** you will use k2.

I'm replacing it with something a bit more clear here, which I called `kotlin.language_version`
```
force_k1:
    Use K1 for all targets

force_k2:
    Use K2 for all targets

from_kotlin_version:
    K2 if on Kotlin 2.0+ (default of Kotlin)

defined_by_target (default):
    Current state of things. The target `k2` param defines what frontend compiler to use, where `k2 == true` means to use K2
```

## Kotln 2.0
While Kotlin 2.0 has K2 as the default, this change will keep K1 as the default, which is what we want for now

Reviewed By: pengj

Differential Revision: D56069029

fbshipit-source-id: 0a701ce51899b4abf411aedb7ec3aee6fa820b4b
  • Loading branch information
Nivaldo Bondança authored and facebook-github-bot committed May 18, 2024
1 parent 0d55ff5 commit fae65ca
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions kotlin/kotlincd_jar_creator.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,6 @@ def create_jar_artifact_kotlincd(
jvm_abi_gen = None
should_use_jvm_abi_gen = False

k2 = k2 and kotlin_toolchain.use_k2

def encode_kotlin_extra_params(kotlin_compiler_plugins):
kosabiPluginOptionsMap = {}
if kotlin_toolchain.kosabi_stubs_gen_plugin != None:
Expand Down

0 comments on commit fae65ca

Please sign in to comment.