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

Kotlin 1.7 Support #775

Open
chenxiangcxc opened this issue Aug 31, 2022 · 10 comments
Open

Kotlin 1.7 Support #775

chenxiangcxc opened this issue Aug 31, 2022 · 10 comments

Comments

@chenxiangcxc
Copy link

chenxiangcxc commented Aug 31, 2022

We are trying to upgrade project code to Kotlin 1.7 however PermissionsDispatcher blocks us as it only supports Kotlin 1.5.
Is there any plan to support Kotlin 1.7? Below is the error:

Caused by: java.lang.IllegalArgumentException: Modifiers [PRIVATE] are not allowed on Kotlin parameters. Allowed modifiers: [VARARG, NOINLINE, CROSSINLINE]
	at com.squareup.kotlinpoet.ParameterSpec.<init>(ParameterSpec.kt:41)
	at com.squareup.kotlinpoet.ParameterSpec.<init>(ParameterSpec.kt:29)
	at com.squareup.kotlinpoet.ParameterSpec$Builder.build(ParameterSpec.kt:157)
	at com.squareup.kotlinpoet.FunSpec$Builder.addParameter(FunSpec.kt:500)
	at permissions.dispatcher.processor.impl.kotlin.KotlinBaseProcessorUnit.createPermissionRequestClass(KotlinBaseProcessorUnit.kt:452)
	at permissions.dispatcher.processor.impl.kotlin.KotlinBaseProcessorUnit.createPermissionRequestClasses(KotlinBaseProcessorUnit.kt:415)
	at permissions.dispatcher.processor.impl.kotlin.KotlinBaseProcessorUnit.createFile(KotlinBaseProcessorUnit.kt:43)
	at permissions.dispatcher.processor.impl.kotlin.KotlinBaseProcessorUnit.createFile(KotlinBaseProcessorUnit.kt:17)
	at permissions.dispatcher.processor.PermissionsProcessor.processKotlin(PermissionsProcessor.kt:68)
	at permissions.dispatcher.processor.PermissionsProcessor.process(PermissionsProcessor.kt:58)
	at org.jetbrains.kotlin.kapt3.base.incremental.IncrementalProcessor.process(incrementalProcessors.kt:90)
	at org.jetbrains.kotlin.kapt3.base.ProcessorWrapper.process(annotationProcessing.kt:197)
	at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:980)

@tommyjackson
Copy link

We're using Kotlin 1.7.10 with version 4.9.2 of this library and haven't ran into any issues.

@carterhudson
Copy link

But the latest version is 4.8.0... Are you using a snapshot or something?

@tommyjackson
Copy link

tommyjackson commented Sep 20, 2022

@carterhudson the Github Releases look like they just haven't been updated. The installation section of the readme says

${latest.version} is maven central 4.9.2

with a link to the releases on maven central

@carterhudson
Copy link

carterhudson commented Sep 20, 2022

Gotcha. It doesn't resolve for me, for some reason.

Edit: ah, package changed.

@carterhudson
Copy link

carterhudson commented Sep 21, 2022

I'm still having the issue when using 4.9.2. It seems like it's due to KModifier.PRIVATE being used here? It's strange, though. It only happens when I try to depend on a certain different dependency.

@carterhudson
Copy link

Looks like using Showkase forces the dependency to 1.12.0 where this lib uses 1.[0]3.0?

@ubarua123
Copy link

Any updates on this? i am kinda stuck at this point here and 4.9.2 doesn't seem to solve it

@carterhudson
Copy link

carterhudson commented Nov 19, 2022 via email

@ubarua123
Copy link

@carterhudson can you paste the link of your fork? I'll download it, Yeah it looks like this library is unmaintained.

@ubarua123
Copy link

Well, the best alternative is, use the com.github.permissions-dispatcher:permissionsdispatcher-ktx version of the library. Works perfect and without the need of annotations.

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 a pull request may close this issue.

4 participants