Skip to content

Bazel 8 Migration - Replace Dagger Extension for K2#208

Open
edwin-grabtaxi wants to merge 1 commit intomigration/bazel_8_main_branchfrom
migration/bazel_8_dagger_k2
Open

Bazel 8 Migration - Replace Dagger Extension for K2#208
edwin-grabtaxi wants to merge 1 commit intomigration/bazel_8_main_branchfrom
migration/bazel_8_dagger_k2

Conversation

@edwin-grabtaxi
Copy link
Collaborator

@edwin-grabtaxi edwin-grabtaxi commented Feb 22, 2026

We upgraded Dagger version from 2.46.1 to 2.59.1 (latest) to support K2 compatibility. In the process, we found errors specifically mentioning that extension function is not supported anymore for @Binds and @Provides.

error: /tmp/pwd5833260430952015930/_kotlinc/tools_aapt_lite_src_main_java_com_grab_aapt_databinding_binding-binding_jvm/temp/stubs/com/grab/aapt/databinding/binding/BindingClassModule.java:9: error: @Binds methods can not be an extension function
    public abstract com.grab.aapt.databinding.binding.generator.BindingClassGenerator bindingClassGenerator(@org.jetbrains.annotations.NotNull()

Turns out, it's not supported since Dagger 2.48, see the release notes here.

With this PR, we changed all the extension function found on @Binds to the normal-style function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant