-
Notifications
You must be signed in to change notification settings - Fork 8
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
Compilation error only happening during Dokka build #170
Comments
Thanks for the report! As we discussed I think this related to #165. I'm not sure though, so it needs some investigation. |
Thanks for the reproducer, I got the same problem. I added a workaround for #165, and tested your project with Dokkatoo 2.2.0-SNAPSHOT, and it solved the issue and Dokkatoo generation succeeded. I had to do some other fiddling around though, because the version of Dokkatoo was set in the remote convention plugins. Can you double check that 2.2.0-SNAPSHOT fixes the issue? |
In which repository can I find 2.2.0-SNAPSHOT? My project isn't finding it. The same problem has appeared in another of my projects, but this time it's complaining about Arrow, not the standard library; reproducer:
Yeah, the best way to test other versions is to |
Maven Central snapshots // settings.gradle.kts
pluginManagement {
repositories {
mavenCentral()
gradlePluginPortal()
// add Maven Central snapshot repository
maven("https://s01.oss.sonatype.org/content/repositories/snapshots/") {
name = "MavenCentralSnapshots"
mavenContent { snapshotsOnly() }
}
}
} |
It doesn't look like 2.2.0-SNAPSHOT fixes the problem for Pedestal :/ I need to make reproduction easier though, I had to add the repository in a bunch of places. |
After updating to Reproduction:
Note that To switch the Dokkatoo version:
|
It's now propagating to all my projects one-by-one 😅 It's now visible on https://gitlab.com/opensavvy/ui/compose-material3-tailwind.git by merging |
Thanks! I really appreciate you digging into it. I can reproduce it but I have no idea where to start with debugging it :( It also looks like #173 didn't help with #165. The only idea I have is to majorly refactor how Dokkatoo works, which is something I had in mind anyway. Currently in multi-subproject builds, Dokkatoo generates the 'partial' modules in each subproject using the Gradle Worker API. I think this is less performant, because each 'generateModule' task only sends one task to the Worker API, so it's missing out on parallelising work. Instead, Dokkatoo could gather the components needed to build a module, send them to the aggregating project, which would then be able to use a single Task to generate all modules with the Worker API. This approach would also help with sharing the Dokka parameters. Modules would be able to 'inherit' parameters defined in the aggregating project #111. Unfortunately, sharing files between subprojects in Gradle is such a phenomenal ball ache, it's is easier said than done. There's just so many bugs, poorly designed and documented APIs, and mysterious behaviour. Gradle is absolutely infuriating. I experimented with it, but it's so overwhelming I gave up. |
Ahah, yeah, I discovered that when working on this. I'm glad the final result is relatively simple, it took so long to understand :/ Do you have an idea what causes the bug? From your comment, I mostly understand your goal is performance. |
Ah right, yeah, I missed the context. So... Dokka Generator modesThere are basically three modes Dokka Generator works in:
So, if you have a typical multi-module Gradle project, each subproject will generate a single 'partial' module, and then the aggregating project will combine all of those into a single rendered publication. Aggregation Requirement:
|
Thanks for the very detailed explanation! To clarify, It does sound like Configurations are the right tool for the job, but it seems really strange that they would cause this problem. I'm glad I haven't found some problems in my own plugins 🥲. |
Correct! (The terminology is very confusing.) There's more info about Dokka Plugins here: https://kotlin.github.io/dokka/1.9.20/developer_guide/plugin-development/introduction/
Again, correct ✅ |
Whenever you create the PR for the fixes you mentioned, don't hesitate to ping me. I doubt I'll be of much help, but now I'm curious :) |
Another question, do you know how to reproduce the bug on purpose in a simple project? If I could reproduce it in my canary build (https://gitlab.com/opensavvy/automation/gradle-conventions/-/tree/main/examples/kotlin?ref_type=heads), it would make it much easier for me to wait for the proper fix as I could catch it before it randomly appears in real projects 😅 |
@martinbonnin made a smaller reproducer, but I haven't retested it with 2.2.0 |
hey @CLOVIS-AI, would you mind checking if Dokkatoo v2.3.0-SNAPSHOT makes any difference, when you have a chance? I'm wondering if #204 might help. |
Hey! Sorry, I completely missed your message :/ I just saw 2.3.0 was released, I'm starting the migration on my side. If it all goes well, I should get back to you in less than a week :) PS. I saw you featured Prepared in the "favorite showcases" on the new website <3 |
No problem! I've done some experimenting of my own, and I don't think 2.3.0 helps unfortunately.
Nice! Yeah, I liked how your Dokka sites were laid out and fully documented, they look good! |
Still broken with 2.3.0, indeed. Logs • Build scan |
Don't ask me how, but Kotlin 2.0.0-RC1 seems to have fixed the Pedestal repository. It's still running under Dokkatoo 2.3.0, though I'm in the process of upgrading to 2.3.1. |
Great news! Thanks for the update. Perhaps it was a problem with KGP. |
Are you going to try RC2 as well @CLOVIS-AI? |
That's unclear at the moment, I'm affected by https://youtrack.jetbrains.com/issue/KT-67636. Maybe I'll have to wait for RC3. |
Nope, just a fluke :/ it's back in https://gitlab.com/opensavvy/groundwork/pedestal/-/merge_requests/120 |
I am facing a compilation error when generating the Dokka output. However, the problem does not appear when compiling the project normally (
./gradlew check
).It seems Dokka cannot find the standard library, and complains about many symbols from it:
Reproduction:
a5dede751c40d143b671b12e33df2ac769e3fdfd
./gradlew check
← passes./gradlew :dokkatooGeneratePublicationHtml
← fails with compilation errorThe full output of the failed execution is available here.
The text was updated successfully, but these errors were encountered: