https://kotlinlang.org logo
#dokka
Title
# dokka
z

Zac Sweers

09/19/2023, 4:31 PM
Running into an interesting error on our CI with dokka coming from Trove, and curious before I file an issue if this is something wrong on our end first. I can't reproduce it locally, and the error is pretty non-descript
Copy code
Execution failed for task ':libraries:model:dokkaHtmlPartial'.
> Equal objects must have equal hashcodes. During rehashing, Trove discovered that the following two objects claim to be equal (as in java.lang.Object.equals() or TObjectHashingStrategy.equals()) but their hashCodes (or those calculated by your TObjectHashingStrategy) are not equal.This violates the general contract of java.lang.Object.hashCode().  See bullet point two in that method's documentation. object #1 =slack.featureflag.legacy (class org.jetbrains.kotlin.name.FqName), hashCode=-2006810893; object #2 =slack.featureflag.legacy (class org.jetbrains.kotlin.name.FqName), hashCode=-2006810893
In this case, I found a java file javadoc that appeared to refer to a now-nonexistent enum member in that package and removing that resolved it. After that though, I encountered a similar but different error on
java.util.String
Copy code
Execution failed for task ':services:mock-testing:dokkaHtmlPartial'.
> Equal objects must have equal hashcodes. During rehashing, Trove discovered that the following two objects claim to be equal (as in java.lang.Object.equals() or TObjectHashingStrategy.equals()) but their hashCodes (or those calculated by your TObjectHashingStrategy) are not equal.This violates the general contract of java.lang.Object.hashCode().  See bullet point two in that method's documentation. object #1 = (class java.lang.String), hashCode=0; object #2 = (class java.lang.String), hashCode=0
And don't see any similar or blatantly obvious issues with the java source files in the project 🤔
1
v

Vadim Mishenev

09/19/2023, 5:04 PM
What version of Dokka do you use? 1.9.0? Unfortunately, in 1.9.0 the fix for https://github.com/Kotlin/dokka/issues/1599 was broken. This is a concurrency issue so you can't reproduce it locally. It will be fixed in Dokka 1.9.10 (the corresponding PR)
z

Zac Sweers

09/19/2023, 5:05 PM
this is in 1.9.0 yeah. So could I confirm with 1.8.20 if it works?
v

Vadim Mishenev

09/19/2023, 5:06 PM
In 1.8.20 this issue is fixed.
z

Zac Sweers

09/19/2023, 5:07 PM
let me try
a

Andrea Falcone

09/19/2023, 5:57 PM
Wasn’t it fixed and then broken and then fixed again @Ignat Beresnev
z

Zac Sweers

09/19/2023, 6:15 PM
so fun update - different error on 1.8.20 🙂
v

Vadim Mishenev

09/19/2023, 6:28 PM
so fun update - different error on 1.8.20 🙂
This is a completely different issue. So I can give you a development build of Dokka 1.9.10 with the fixed concurrency issue. The needed version is
1.9.10-dev-234
(changes) But you need to add the repository maven.pkg.jetbrains.space/kotlin/p/dokka/dev
z

Zac Sweers

09/19/2023, 7:15 PM
nice, I can try that out!
looks like that works!
7 Views