Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generated Kotlin code triggers compile warnings #207

Open
larryng opened this issue Sep 11, 2020 · 0 comments
Open

Generated Kotlin code triggers compile warnings #207

larryng opened this issue Sep 11, 2020 · 0 comments

Comments

@larryng
Copy link
Contributor

larryng commented Sep 11, 2020

This makes using Kotlin code generation mode impossible when allWarningsAsErrors is enabled. See #205. This time it's because the generated method signature doesn't match for binds factory methods.

A few requests to address this:

  1. Fix or suppress the warning in generated code (similar to PR above).
  2. Enable allWarningsAsErrors in Kotlin codegen test suite.
  3. Add a note in https://github.com/uber/motif/wiki#code-generation-mode for Gradle/Kotlin users (looking up how to set this was a bit painful):
    kapt {
        arguments {
            arg("motif.mode", "java")
        }
    }
    

Library version:
0.3.4

Repro steps or stacktrace:
Add a binds factory method:

@Expose
fun foo(fooImpl: FooImpl): Foo

Compile warning:

w: <redacted>: The corresponding parameter in the supertype 'Objects' is named 'fooImpl'. This may cause problems when calling this function with named arguments.
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

No branches or pull requests

1 participant