vertx-codegen icon indicating copy to clipboard operation
vertx-codegen copied to clipboard

Generated class-level javascript comments truncate if javadoc comments include @link text

Open chefhoobajoob opened this issue 8 years ago • 3 comments

A javadoc comment that contains a link to any other @VertxGen interface or @DataObject class has the effect of truncating the corresponding comments in the generated Javascript code after the last line that does not contain any links.

For example, this class comment in Java:

/**
 * This thing does a thing or two
 * <p>
 * Here is a link to an interface:
 * Some preface text {@link org.github.hoobajoob.vertx.api.MyInterface} some post text
 *
 * <p>
 * Here is a link to a DataObject:
 * Some preface text {@link org.github.hoobajoob.vertx.api.MyDataObject} some post text
 *
 */

...produces this module comment in Javascript:

/**
 This thing does a thing or two
 <p>
 Here is a link to an interface:
 @class
*/

This makes inline code comments and JSDoc-generated api documentation practically unusable for Javascript users of codegen-generated libraries.

Is this a known defect? Is there a workaround?

chefhoobajoob avatar Jun 19 '17 14:06 chefhoobajoob

it is an unknown deffect, can you provide a project that reproduces it to help fixing it ?

vietj avatar Jun 19 '17 15:06 vietj

I can create a reproducer, but you can also see the effects in the public vertx API documentation, so there should be lots of examples in the existing code base. Let me know if a reproducer is required.

For example, take a look at the Java-language ServiceDiscovery class-level comments, and compare it with the corresponding generated JSDoc results on the public vertx.io site.

The JSDoc results are truncated after line 40 of the Javadoc comments.

chefhoobajoob avatar Jun 19 '17 17:06 chefhoobajoob

Looking a little closer, it seems that the problem exhibits on class-level javadoc comments, but not on method-level comments.

For example, for the getRecord comments, everything except for {@link Function} seems to be there.

chefhoobajoob avatar Jun 19 '17 17:06 chefhoobajoob