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

"Unresolved reference: KotlinLogging" after upgrading from 1.12.0 to 1.12.1 #170

Closed
breun opened this issue Mar 5, 2021 · 7 comments
Closed

Comments

@breun
Copy link

breun commented Mar 5, 2021

After upgrading kotlin-logging from 1.12.0 to 1.12.1 compilation fails, because mu.KotlinLogging can no longer be resolved.

https://github.com/breun/kotlin-logging-1.12.1-import-issue works ok with kotlin-logging 1.12.0 when I run ./mvnw clean compile. However, when I upgrade kotlin-logging to 1.12.1 in pom.xml and run ./mvnw clean compile again, I get this error:

[INFO] --- kotlin-maven-plugin:1.4.31:compile (compile) @ kotlin-tryout ---
[ERROR] /Users/breun/Projects/kotlin-tryout/src/main/kotlin/nl/breun/Tryout.kt: (3, 11) Unresolved reference: KotlinLogging
[ERROR] /Users/breun/Projects/kotlin-tryout/src/main/kotlin/nl/breun/Tryout.kt: (5, 22) Unresolved reference: KotlinLogging
@jwesselink
Copy link

I've got the same error, build is failing after upgrading from 1.12.0 to 1.12.1

@oshai
Copy link
Owner

oshai commented Mar 7, 2021

Thanks for reporting, I am checking it.

@oshai
Copy link
Owner

oshai commented Mar 7, 2021

Looks like it was caused by upgrading kotlin version from 1.4.10->1.4.31.
I reverted it, and it is fixed in version 1.12.5.

@breun
Copy link
Author

breun commented Mar 7, 2021

How exactly did a Kotlin upgrade break the ability to import kotlin-logging classes?

I also thought kotlin-logging 2.x was the version that required Kotlin 1.4. Is kotlin-logging 1.12.x still compatible with Kotlin 1.3?

@oshai
Copy link
Owner

oshai commented Mar 7, 2021

Is kotlin-logging 1.12.x still compatible with Kotlin 1.3?

Yes. 1.x supports Kotlin version >= 1.2.
It is compiled with Kotlin 1.4 but has:

kotlinOptions {
                apiVersion = "1.2"
                languageVersion = "1.2"
 }

I don't know the exact issue, but since we are using multiplatform features and this is in alpha state, it is breaking stuff even in minor versions change of Kotlin. Version 2.x changed the build to be more standard for that reason.

@oshai
Copy link
Owner

oshai commented Mar 8, 2021

@breun can you verify that the issue was resolved?

@breun
Copy link
Author

breun commented Mar 10, 2021

@oshai Yes, with 1.12.5 it works again.

@oshai oshai closed this as completed Mar 11, 2021
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

3 participants