Permissionsdispatcher: kt generation files with package name `in` Don't automatically add tilda and hence compilation fails

Created on 28 Sep 2017  ·  10Comments  ·  Source: permissions-dispatcher/PermissionsDispatcher

Overview

  • If we have a package name with in build fails

Expected

  • Generated files should automatically have Tilda appended

Actual

  • The package name doesn't have Tilda appended so that builds don't fail

Environment

-- v 3.0.1 on Kotlin file(MainActivity.kt)

bug

Most helpful comment

Raised for discussion over at https://github.com/square/kotlinpoet/issues/247

All 10 comments

Good catch! Thanks for bringing that up. We might forward this to the kotlinpoet team, however, instead of handling the reserved keywords ourselves.

Looks cool :+1:

@LadwaAditya Thank you!

Raised for discussion over at https://github.com/square/kotlinpoet/issues/247

👍 👍 👍

Quick update: This has been fixed in kotlinpoet and will be available in their next release (and in consequence, our next version as well)!

So quick work!!!

Cool.

On 29-Sep-2017 10:39 AM, "Shintaro Katafuchi" notifications@github.com
wrote:

So quick work!!!


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/permissions-dispatcher/PermissionsDispatcher/issues/389#issuecomment-333032137,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AEva6EOO1YH41K-vnKHpj__809Z4RLuDks5snHtygaJpZM4Pm4SC
.

In the meantime, and if you don't mind the extra ceremony, you can make this work right now by using the latest SNAPSHOTs of PermissionsDispatcher and kotlinpoet directly:

repositories {
    // TODO Remove after release of PermissionsDispatcher 3.1.0 Stable: https://github.com/permissions-dispatcher/PermissionsDispatcher/issues/389
    maven { url "https://oss.jfrog.org/oss-snapshot-local" } // PermissionsDispatcher Snapshot
    maven { url "https://oss.sonatype.org/content/repositories/snapshots" } // kotlinpoet Snapshot
}

dependencies {
    // TODO Move to stable version after kotlinpoet update: https://github.com/permissions-dispatcher/PermissionsDispatcher/issues/389
    implementation "com.github.hotchemi:permissionsdispatcher:3.1.0-SNAPSHOT"
    kapt "com.github.hotchemi:permissionsdispatcher-processor:3.1.0-SNAPSHOT"
    kapt "com.squareup:kotlinpoet:0.6.0-SNAPSHOT" // Remove this after release of PermissionsDispatcher 3.1.0 Stable
}

KotlinPoet 0.6.0 has been released with the expected fix to this issue. @hotchemi we can now move forward with a new release ourselves & close this afterwards!

Was this page helpful?
0 / 5 - 0 ratings