urbanairship / react-native-airship

Airship React Native module
Other
88 stars 62 forks source link

[Android] AirshipModule.kt failing due to type errors #530

Closed ds8k closed 1 year ago

ds8k commented 1 year ago

What Airship dependencies are you using?

@ua/react-native-airship: 16.1.0

What are the versions of any relevant development tools you are using?

React Native 66.5

Report

What unexpected behavior are you seeing?

Android app fails to compile

What is the expected behavior?

App compiles

What are the steps to reproduce the unexpected behavior?

Attempt to compile Android on UA 16.1.0

Do you have logging for the issue?

e: /Users/cameronbates/Developer/axios-app/node_modules/@ua/react-native-airship/android/src/main/java/com/urbanairship/reactnative/AirshipModule.kt: (164, 5): 'channelEditTags' overrides nothing
e: /Users/cameronbates/Developer/axios-app/node_modules/@ua/react-native-airship/android/src/main/java/com/urbanairship/reactnative/AirshipModule.kt: (637, 17): Not enough information to infer type variable T
e: /Users/cameronbates/Developer/axios-app/node_modules/@ua/react-native-airship/android/src/main/java/com/urbanairship/reactnative/AirshipModule.kt: (637, 35): Cannot infer a type for this parameter. Please specify it explicitly.

The first error I can resolve locally, but the others I'm unsure of how to fix. They're referring to this line here:

    override fun featureFlagManagerFlag(flagName: String?, promise: Promise) {
        promise.resolveDeferred { callback -> // <--- 637
            scope.launch {
                try {
rlepinski commented 1 year ago

I think its this issue fixed here - https://github.com/urbanairship/react-native-airship/pull/529, but the infer type issue might be different. Could you try that branch ?

rlepinski commented 1 year ago

Should be fixed in 16.1.1

ds8k commented 1 year ago

The other errors were related to using kotlin 1.6.10. Bumped to 1.7.0 and I'm good

rlepinski commented 1 year ago

Good to know, sometimes I get unrelated parse errors if it fails to build so wasn't sure if anything else was needed.