Skip to content

Conversation

@LiangliangSui
Copy link
Contributor

What does this PR do?

Add a script to automatically generate doc, Implement the first stage goals mentioned in #1647.

Related issues

#1647

Does this PR introduce any user-facing change?

  • Does this PR introduce any public API change?
  • Does this PR introduce any binary protocol compatibility change?

Benchmark

Signed-off-by: LiangliangSui <coolsui.coding@gmail.com>
@chaokunyang
Copy link
Collaborator

Could we use parse javadoc html instead?

@LiangliangSui
Copy link
Contributor Author

Could we use parse javadoc html instead?

Good suggestion!

It can be implemented by parsing javadoc html. Even if it is implemented by parsing html, we need to clearly point out which config fields are in the comments.

In addition, we need to clearly point out the defaultValue in the comments of each filed, because it will not be included in javadoc. The true default value of the field (for example, false in boolean enable = false will not appear in the javadoc html)

Our config field comments can be designed in the following format?

/**
 * xxxxxxxxxxxxx
 *
 * @defaultValue: xxxx
 */

@LiangliangSui
Copy link
Contributor Author

Do you have any other suggestions for generating Tables based on Fields and writing them to java_serialization_guide.md? @chaokunyang

Signed-off-by: LiangliangSui <coolsui.coding@gmail.com>
Signed-off-by: LiangliangSui <coolsui.coding@gmail.com>
Signed-off-by: LiangliangSui <coolsui.coding@gmail.com>
@LiangliangSui
Copy link
Contributor Author

Demo

image

@LiangliangSui
Copy link
Contributor Author

Hi @chaokunyang , I implemented this function based on parsing javadoc. Could you help review this?

Signed-off-by: LiangliangSui <coolsui.coding@gmail.com>
</li>
</ul>
"""
tag_labels = field.xpath('li/dl/dt/span[@class="simpleTagLabel"]/text()')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems coupled with javadoc structure. WIll javadoc generated html change between JDK vendor and different JDK versions?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we may be able to automatically install the fixed version and vendor in the script before generating javadoc.

Or do you have any other good ideas?

@LiangliangSui LiangliangSui closed this by deleting the head repository Apr 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants