Skip to content

Fix Javadoc 17 parsing#5127

Merged
neilcsmith-net merged 3 commits intoapache:masterfrom
neilcsmith-net:javadoc17-parsing
Jan 3, 2023
Merged

Fix Javadoc 17 parsing#5127
neilcsmith-net merged 3 commits intoapache:masterfrom
neilcsmith-net:javadoc17-parsing

Conversation

@neilcsmith-net
Copy link
Member

Attempt to fix parsing of Javadoc HTML generated by Java 17, which uses <section> tags, so that documentation shows up in code completion if no source available.

Second commit fixes external link format when linking to a constructor or method with multiple parameters.

@neilcsmith-net neilcsmith-net added Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form) JavaDoc [ci] enable java/javadoc tests and build-javadoc target labels Dec 20, 2022
@neilcsmith-net neilcsmith-net added this to the NB17 milestone Dec 20, 2022
@mbien

This comment was marked as resolved.

@neilcsmith-net
Copy link
Member Author

Thanks @mbien Yes, aware the tests were disabled. Have added an extra commit to enable with two exclusions. FastIndexTest is failing to access JDK sources. MarkupTagProcessorTest doesn't seem like it ever could have worked - failing equality test on a class that doesn't implement equals(). 🤷

@mbien
Copy link
Member

mbien commented Dec 21, 2022

this PR triggered a bug in CI. If a job times out it counts as cancelled, which makes it think that the user cancelled the workflow and the cleanup job will run which means that we can't restart the timed out job since the workspace artifact is already gone. Sorry about that.

Copy link
Contributor

@matthiasblaesing matthiasblaesing left a comment

Choose a reason for hiding this comment

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

Looks good to me. I did not totally follow the changes in JavadocHelper, but the new tests look sane and I verified, that the problem exists and is fixed by this change. Thank you.

@neilcsmith-net
Copy link
Member Author

Thanks for the reviews - merging.

I did not totally follow the changes in JavadocHelper

Yes, at some point we could probably do with not parsing HTML5 with an HTML 3.2 parser! 😄

@neilcsmith-net neilcsmith-net merged commit f1569af into apache:master Jan 3, 2023
@neilcsmith-net neilcsmith-net deleted the javadoc17-parsing branch January 16, 2024 09:46
@t-gergely
Copy link

Yes, at some point we could probably do with not parsing HTML5 with an HTML 3.2 parser! 😄

That would be great. The current HTMLJavadocParser.parseMember method doesn't work for a lot of methods of OpenJDK 21 that don't have “a” tags in their sections. I can't follow the quirks of the current state machine (eg. hrpos and A_OPEN/A_CLOSE), so I can't produce a reliable patch./PR Should I open an issue about it? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form) JavaDoc [ci] enable java/javadoc tests and build-javadoc target

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants