-
Notifications
You must be signed in to change notification settings - Fork 411
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
Kotlin/JS 1.9.0 and multi modules: Failed build: java.lang.UnsupportedOperationException: Empty collection can't be reduced. #3063
Comments
We're aware of the issue (duplicate: #3038), but there was a change in behaviour upstream (KGP), and I'm afraid we can't do anything about it from Dokka's side. The cause of the build failure is likely that you have a multiplatform project with a single target, and such projects aren't officially supported by Kotlin (see KT-52664). Adding a phantom target should help as it would trigger a change of behaviour in KGP, and Dokka would be able to proceed without errors. I'll try to get someone from the multiplatform team to provide more details. In the future, we'll try to warn users about this proactively (#3059) instead of letting it fail with obscure errors. |
Hm, yeah, of course we use the multiplatform plugin with a single js platform, because the js plugin is deprecated since 1.9.0. |
Could you please expand on this? The exception is thrown from Dokka's gradle plugin, so at first glance it's hard to get why the plugin cannot get that list/info in a different way that doesn't crash in this case. |
Can you clarify if this is something we can do in our own projects? |
We found a workaround in Dokka for this particular issue, and the fix will be released in Dokka 1.9.0, which should hopefully happen next week. I've provided more details on single-target multiplatform project support in general and on this particular issue in #3122. To reduce the spread of information and keep the discussion in a single place, I'll close this issue in favour of #3122 - let's continue there if anyone has anything to add.
Yep. I've added an example to #3122 - please, have a look :) |
Describe the bug
Update Kotlin from 1.8.22 to 1.9.0:
Expected behaviour
Successful build
Build scan
https://scans.gradle.com/s/4zn2v2imwg7m4/failure?expanded-stacktrace=WyIwLTEiLCIwIl0#1
To Reproduce
sqldelight/sqldelight#4338
Dokka configuration
Installation
Additional context
n/A
Are you willing to provide a PR?
No
The text was updated successfully, but these errors were encountered: