rules_kotlin icon indicating copy to clipboard operation
rules_kotlin copied to clipboard

[Feature Request] apoption support for KSP plugins

Open xinzhengzhang opened this issue 1 year ago • 5 comments

In some ksp usage scenarios, you need to pass in apoption. But now rules does not implement this function. I tried to implement it with a options params. https://github.com/bazelbuild/rules_kotlin/pull/1103 Here's how it's used.

kt_ksp_plugin(
    name = "kotlin-native-coroutine-ksp",
    processor_class = "",
    deps = [
        "@maven//:com_rickclephas_kmp_kmp_nativecoroutines_ksp",
        "@maven//:com_rickclephas_kmp_kmp_nativecoroutines_annotations_jvm",
        "@maven//:com_rickclephas_kmp_kmp_nativecoroutines_core_jvm"
    ],
    options = {
        "nativeCoroutines.suffix" : "Native",
        "nativeCoroutines.flowValueSuffix": "Value",
        "nativeCoroutines.flowReplayCacheSuffix": "ReplayCache",
        "nativeCoroutines.stateSuffix": "Value",
        "nativeCoroutines.stateFlowSuffix": "Flow",
    },
    visibility = ["//visibility:public"],
)

xinzhengzhang avatar Jan 20 '24 16:01 xinzhengzhang

See #1036 , it was never merged, we use it internally with no issues.

idanakav avatar Feb 21 '24 21:02 idanakav

We use #1036 internally as well.

Bencodes avatar Feb 21 '24 22:02 Bencodes

I would like to ask if #1036 will be merged? It seems that the last update of this was last October

xinzhengzhang avatar Feb 27 '24 04:02 xinzhengzhang

We would also be very interested in a release with #1036 merged.

pswaminathan avatar Feb 29 '24 14:02 pswaminathan