pulumi / pulumi-java

Java support for Pulumi
Apache License 2.0
69 stars 21 forks source link

v0.11.0 generates invalid javadoc for Azure Native #1363

Closed thomas11 closed 2 months ago

thomas11 commented 4 months ago

The latest az-native release fails reproducibly for the Java publishing step. There are two errors:

/home/runner/work/pulumi-azure-native/pulumi-azure-native/sdk/java/src/main/java/com/pulumi/azurenative/media/StreamingPolicy.java:258: error: unterminated inline tag
 * {@code

/home/runner/work/pulumi-azure-native/pulumi-azure-native/sdk/java/src/main/java/com/pulumi/azurenative/media/StreamingPolicy.java:257: error: element not closed: pre
 * <pre>

This blocks Azure Native releases for Java.

Can be reproduced locally in a pulumi-azure-native checkout via:

$ make generate_java

$ cd sdk/java && gradle javadoc

If .pulumi-java-gen.version is v0.10.0, gradle succeeds; if it's v0.11.0, it fails.

justinvp commented 2 months ago

Do we know the root cause of the regression?

thomas11 commented 2 months ago

Do we know the root cause of the regression?

Pretty sure it's #1356 but haven't dug deeper.

lunaris commented 2 months ago

It is #1356, yes. In that we move to using {@code ...}. This provides a lot of flexibility we didn't have before, but it requires that braces inside it be balanced so that Javadoc can work out when to terminate the code block. The offending resource that triggers this bug has a snippet with an unclosed brace, which causes an error. I'm working on a fix presently.