elastic / docs-tools

A place to put documentation tooling
4 stars 13 forks source link

Update plugin doc generation tooling beyond Java 8 #64

Closed karenzone closed 2 years ago

karenzone commented 2 years ago

Recent docgen jobs are failing with this error:

> Task :logstash-core:compileJava FAILED
/var/lib/jenkins/workspace/elastic+docs-tools+logstash-plugin-docs/logstash/logstash-core/src/main/java/org/logstash/ackedqueue/io/ByteBufferCleanerImpl.java:5: warning: sun.misc.Unsafe is internal proprietary API and may be removed in a future release
import sun.misc.Unsafe;

Here's the console output: https://logstash-ci.elastic.co/view/Docs/job/elastic+docs-tools+logstash-plugin-docs/331/console

Thoughts from @andsel:

... also related to the fact that Jenkins job is run with JDK 8 runbld>>> Adding /usr/lib/jvm/java-8-openjdk-amd64/bin to the path

That code before was compiled at LS runtime, while, with the drop of JDK 8 we moved to compile time, and this warning comes from the JDK 8 compiler, while for the JDK 11 we "opened" a module that exposes Unsafe maybe we could configure Gradle compiler plugin to be more permissive

karenzone commented 2 years ago

@andsel, thank you for validating my initial suspicions and providing more detail. @robbavey, thank you for signing on to take a look.

karenzone commented 2 years ago

Thanks for putting your attention on this issue and resolving it so quickly, @robbavey . You have doc generation for stack versions working like a champ!