native
native copied to clipboard
[jnigen] null pointer at com.github.dart_lang.jnigen.apisummarizer.Main.main(Main.java:132)
I suspect that the `test_jnigen` failures are unrelated to my changes since the same tests pass on macOS and Windows:
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
Note: javadoc: Loading source file example/in_app_java/android/app/src/main/java/com/example/in_app_java/AndroidUtils.java...
Note: javadoc: Loading source file /home/runner/.gradle/caches/modules-2/files-2.1/androidx.emoji2/emoji2/1.3.0/788179fcab96cd6ec9a3e284e2a509545dc0fb8d/emoji2-1.3.0-sources.jar/androidx/emoji2/text/EmojiCompat.java...
Note: javadoc: Loading source file /home/runner/.gradle/caches/modules-2/files-2.1/androidx.emoji2/emoji2/1.3.0/788179fcab96cd6ec9a3e284e2a509545dc0fb8d/emoji2-1.3.0-sources.jar/androidx/emoji2/text/DefaultEmojiCompatConfig.java...
/home/runner/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-coroutines-android/1.7.1/d43e33a7c7ee4bdb6fb3210bfdffee23f275e3dc/kotlinx-coroutines-android-1.7.1-sources.jar(/module-info.java):5: error: module not found: kotlin.stdlib
requires kotlin.stdlib;
^
/home/runner/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-coroutines-android/1.7.1/d43e33a7c7ee4bdb6fb3210bfdffee23f275e3dc/kotlinx-coroutines-android-1.7.1-sources.jar(/module-info.java):6: error: module not found: kotlinx.coroutines.core
requires kotlinx.coroutines.core;
^
error: cannot access kotlinx.coroutines.android.module-info
cannot resolve modules
Note: javadoc: 3 errors
Exception in thread "main" java.lang.NullPointerException
at java.base/java.util.HashMap.putMapEntries(HashMap.java:497)
at java.base/java.util.HashMap.putAll(HashMap.java:781)
at com.github.dart_lang.jnigen.apisummarizer.Main.main(Main.java:132)
Fatal: Cannot generate summary: FormatException: Unexpected end of input (at character 1)
^
Error: Process completed with exit code 1.
Originally posted by @brianquinlan in https://github.com/dart-lang/native/issues/1426#issuecomment-2287120416
edit: nvm, this is a different error.
This error arises from the fact that a certain version of androidx.emoji2 (that gets picked up only on the CI linux machine for some reason) depends on a Kotlin dependency. Our doclet backend that parses Java sources fails because doclet has this limitation that it needs all the sources to be available for it to work and Kotlin dependencies don't have Java sources.
As I plan to remove the Java source parser (doclet) in favor of javadocs html parser anyways, I will remove the add_gradle_sources from the failing example to make CI green.