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

Update plugin-publish plugin #121

Merged
merged 3 commits into from
Nov 14, 2021
Merged

Update plugin-publish plugin #121

merged 3 commits into from
Nov 14, 2021

Conversation

turansky
Copy link
Contributor

@turansky turansky commented Nov 6, 2021

No description provided.

@szpak
Copy link
Contributor

szpak commented Nov 7, 2021

Thanks @turansky.

@marcphilipp It failed in a strange way, but it is not related to this change. I triggered CI for the latest version and it also fails with:

Caused by: java.lang.ClassNotFoundException: kotlin.jvm.JvmInline

You are closer to Kotlin and Dokka, so maybe you have an idea why?

Btw, it went under the radar as our cron job calls "just" e2e-tests which don't generate docs in the main project.

@turansky
Copy link
Contributor Author

turansky commented Nov 7, 2021

Looks like higher Gradle (with more higher Kotlin) required for plugin

@szpak
Copy link
Contributor

szpak commented Nov 7, 2021

Looks like higher Gradle (with more higher Kotlin) required for plugin

Might be, however, I would expect to see the pipeline failing after that change. Here, "something" changed over time outside the project (minor version of JDK?) which is not expected.

@marcphilipp
Copy link
Member

I tried with 11.0.10-11.0.13 and it fails with all of them. Not sure why/how this ever worked.

@marcphilipp
Copy link
Member

#124 will remove Dokka from the build and should solve this issue.

@vlsi
Copy link
Contributor

vlsi commented Nov 13, 2021

The error is

Caused by: java.lang.NoClassDefFoundError: kotlin/jvm/JvmInline
	at com.fasterxml.jackson.module.kotlin.ExtensionsKt.isUnboxableValueClass(Extensions.kt:122)
	at com.fasterxml.jackson.module.kotlin.KotlinSerializers.findSerializer(KotlinSerializers.kt:69)
	at com.fasterxml.jackson.databind.ser.BeanSerializerFactory._createSerializer2(BeanSerializerFactory.java:215)
	at com.fasterxml.jackson.databind.ser.BeanSerializerFactory.createSerializer(BeanSerializerFactory.java:173)
	at com.fasterxml.jackson.databind.SerializerProvider._createUntypedSerializer(SerializerProvider.java:1495)
	at com.fasterxml.jackson.databind.SerializerProvider._createAndCacheUntypedSerializer(SerializerProvider.java:1443)
	at com.fasterxml.jackson.databind.SerializerProvider.findValueSerializer(SerializerProvider.java:544)
	at com.fasterxml.jackson.databind.SerializerProvider.findTypedValueSerializer(SerializerProvider.java:822)
	at com.fasterxml.jackson.databind.ser.DefaultSerializerProvider.serializeValue(DefaultSerializerProvider.java:308)
	at com.fasterxml.jackson.databind.ObjectMapper._writeValueAndClose(ObjectMapper.java:4569)
	at com.fasterxml.jackson.databind.ObjectMapper.writeValueAsString(ObjectMapper.java:3822)
	at org.jetbrains.dokka.utilities.JsonKt.toJsonString(json.kt:32)
	at org.jetbrains.dokka.ConfigurationKt.toJsonString(configuration.kt:88)

It means that jackson.module.kotlin.ExtensionsKt.isUnboxableValueClass(Extensions.kt:122) attemps access JvmInline annotation (it was introduced in Kotlin 1.5), and Gradle does not allow to reliably upgrade kotlin-stdlib in the buildscript classpath.

That boils down to two solutions:
a) Rely only on plugins that target Kotlin 1.4 (e.g. older versions of Dokka)
b) Add try-catch to jackson.module so it ignores the missing JvmInline feature
c) Try shuffling the order of plugins
d) Allow kotlin-stdlib upgrades in Gradle

@vlsi
Copy link
Contributor

vlsi commented Nov 13, 2021

By the way, I wonder what triggered jackson.module upgrade.
It would be not really fun if com.gradle.plugin-publish triggers jackson upgrade which effectively breaks builds since the new jackson requires Kotlin 1.5, and Gradle can't deliver it in Gradle 6.9

@vlsi
Copy link
Contributor

vlsi commented Nov 13, 2021

The offending plugin is

+--- org.ajoberstar.stutter:org.ajoberstar.stutter.gradle.plugin:0.6.0
|    \--- org.ajoberstar:gradle-stutter:0.6.0
|         \--- com.fasterxml.jackson.core:jackson-databind:latest.release -> 2.13.0 (*)

So you basically should ask gradle-stutter to refrain from upgrading to jackson versions that require Kotlin 1.5, or you should refrain from depending on newer stutter versions

@vlsi
Copy link
Contributor

vlsi commented Nov 13, 2021

The problematic JvmInline PR was introduced in 2.13.0: FasterXML/jackson-module-kotlin#468

@marcphilipp
Copy link
Member

@vlsi Thanks for the root cause analyis! 👍

@turansky Please rebase this PR on the lastest master since #124 has now been merged.

@marcphilipp marcphilipp changed the title com.gradle.plugin-publish - 0.15.0 -> 0.17.0 Update plugin-publish plugin Nov 14, 2021
@marcphilipp marcphilipp merged commit dcb811a into gradle-nexus:master Nov 14, 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

Successfully merging this pull request may close these issues.

4 participants