Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors and warnings in javadoc during verification build #1109

Closed
merks opened this issue Sep 13, 2023 · 15 comments · Fixed by #1516
Closed

Errors and warnings in javadoc during verification build #1109

merks opened this issue Sep 13, 2023 · 15 comments · Fixed by #1516

Comments

@merks
Copy link
Contributor

merks commented Sep 13, 2023

When building #1108 the following errors and warnings are reported:

11:24:15.294 [ERROR] MavenReportException: Error while generating Javadoc: 
Exit code: 1 - /home/jenkins/agent/workspace/eclipse.platform.ui_PR-1108/bundles/org.eclipse.jface/src/org/eclipse/jface/widgets/AbstractControlFactory.java:55: error: bad HTML entity
	 * The mnemonic indicator (character '&') is not displayed in a tool tip. To
	                                      ^
/home/jenkins/agent/workspace/eclipse.platform.ui_PR-1108/bundles/org.eclipse.jface/src/org/eclipse/jface/widgets/AbstractControlFactory.java:56: error: bad HTML entity
	 * display a single '&' in the tool tip, the character '&' can be escaped by
	                     ^
/home/jenkins/agent/workspace/eclipse.platform.ui_PR-1108/bundles/org.eclipse.jface/src/org/eclipse/jface/widgets/AbstractControlFactory.java:56: error: bad HTML entity
	 * display a single '&' in the tool tip, the character '&' can be escaped by
	                                                        ^
/home/jenkins/agent/workspace/eclipse.platform.ui_PR-1108/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/internal/ExpandableNode.java:95: warning: {@return} not at beginning of description
	 * {@return current offset in the original list of elements}
	   ^
/home/jenkins/agent/workspace/eclipse.platform.ui_PR-1108/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/internal/ExpandableNode.java:112: warning: {@return} not at beginning of description
	 * {@return all remaining elements from original array starting with the element
	   ^
/home/jenkins/agent/workspace/eclipse.platform.ui_PR-1108/bundles/org.eclipse.jface/src/org/eclipse/jface/widgets/TableColumnFactory.java:122: error: bad HTML entity
	 * The mnemonic indicator (character '&') is not displayed in a tool tip. To
	                                      ^
/home/jenkins/agent/workspace/eclipse.platform.ui_PR-1108/bundles/org.eclipse.jface/src/org/eclipse/jface/widgets/TableColumnFactory.java:123: error: bad HTML entity
	 * display a single '&' in the tool tip, the character '&' can be escaped by
	                     ^
/home/jenkins/agent/workspace/eclipse.platform.ui_PR-1108/bundles/org.eclipse.jface/src/org/eclipse/jface/widgets/TableColumnFactory.java:123: error: bad HTML entity
	 * display a single '&' in the tool tip, the character '&' can be escaped by
	                                                        ^
/home/jenkins/agent/workspace/eclipse.platform.ui_PR-1108/bundles/org.eclipse.jface/src/org/eclipse/jface/widgets/TreeColumnFactory.java:122: error: bad HTML entity
	 * The mnemonic indicator (character '&') is not displayed in a tool tip. To
	                                      ^
/home/jenkins/agent/workspace/eclipse.platform.ui_PR-1108/bundles/org.eclipse.jface/src/org/eclipse/jface/widgets/TreeColumnFactory.java:123: error: bad HTML entity
	 * display a single '&' in the tool tip, the character '&' can be escaped by
	                     ^
/home/jenkins/agent/workspace/eclipse.platform.ui_PR-1108/bundles/org.eclipse.jface/src/org/eclipse/jface/widgets/TreeColumnFactory.java:123: error: bad HTML entity
	 * display a single '&' in the tool tip, the character '&' can be escaped by
	                                                        ^
9 errors
2 warnings
@marcushoepfner
Copy link
Contributor

similar to #1103 (?)

@akurtakov
Copy link
Member

akurtakov commented Sep 19, 2023

These are not similar, what @merks posted here is actually & that is not escaped aka & amp;

@merks
Copy link
Contributor Author

merks commented Sep 19, 2023

I noticed very many such errors, ones that apparent to have been around for a very long time. It seems only the verification build logs/reports these errors, which really do look like things that ought to be fixed because it's really annoying for the verification build to be a sea of errors which appear to be ignored in terms of the build success/failure making it hard to find the "real" errors if any...

@akurtakov
Copy link
Member

@merks
Copy link
Contributor Author

merks commented Sep 19, 2023

Good question. There are so many builds and I don't recall which one had all those errors in the log.

These do look wrong though:

image

So something should be reporting them, or if not, something reported them when I copied the errors from "the log".

@akurtakov
Copy link
Member

Javadoc is still in terrible state and was even worse and I've spent days improving it bit by bit which is extremely tedious process. It got to a state where "certain" things are clean and new issues fail the build so I would like first to get to a point where verifications are stable so people don't have an excuse to ignore them.

@laeubi
Copy link
Contributor

laeubi commented Sep 19, 2023

making it hard to find the "real" errors if any...

Why are Javadoc errors not "real"? ... the inital purpose of this is/was to make people aware of Javadoc errors that otherwise only reported on the next i-build (if one looks there at the logs).

Nerveless no one really needs to scan the logs, we have scanners for this for example here (the linked PR is already merged so build logs are gone):

https://ci.eclipse.org/platform/job/eclipse.platform.ui/job/master/23/

grafik

Also if you look at the summary here you get some parsed problems, I did this mostly for API Tools Errors/Warnings:

https://github.com/eclipse-platform/eclipse.platform.ui/actions/runs/6171755924

grafik

Also the Github Action Checks give a comprehensive summary for the cautious reviewer:
grafik

@merks
Copy link
Contributor Author

merks commented Sep 19, 2023

@laeubi

This is why I put "real" in quotes. Obviously they are real yet this has been this way for a long time. Clearly I did scan logs or I would not have been able to copy and paste the log content into this issue. The question now is why did I find such errors in "the log" yet the current the logs says everything is fine and good.

Moreover, is it a "real" problem to use & in Javadoc directly rather than using & or is it not "real" a problem? And, if not a "real" problem, why was the log I saw full of such errors? If I'd known the problem of reported Javadoc errors wasn't generally reproducible, I would have take more care to keep track of where I found the errors...

@laeubi
Copy link
Contributor

laeubi commented Sep 19, 2023

Moreover, is it a "real" problem to use & in Javadoc directly rather than using &

If you use the ampersand inside html tags, yes and that's what the tool complains about see:

https://docs.oracle.com/javase/8/docs/technotes/tools/windows/javadoc.html > Write Comments in HTML

entities for the less than symbol (<) and the greater than symbol (>) should be written as &lt; and &gt;. Similarly, the ampersand (&) should be written as &amp;.

about reproducibility, as we have special builds that replace artifacts with baseline a tool like javadoc might decide to not run because everything seems up-to-date, but that's only a guess unless one can see a build log of "not reproducibility" (please note that this is a special maven term and eclipse builds are in general not reproducible anyways)

@laeubi
Copy link
Contributor

laeubi commented Sep 19, 2023

By the way I noticed some unnecessary maven warnings in the logs, should be fixed with:

@laeubi
Copy link
Contributor

laeubi commented Sep 19, 2023

I created an issue at p2 as well about another source of many warnings that fill the log here:

@laeubi
Copy link
Contributor

laeubi commented Sep 19, 2023

If I scan the consoleLog of the build I see this error:

16:12:14.912 [INFO] --- javadoc:3.0.1:jar (attach-javadocs) @ org.eclipse.jface ---
16:12:24.823 [ERROR] MavenReportException: Error while generating Javadoc: 
Exit code: 1 - /home/jenkins/agent/workspace/eclipse.platform.ui_master/bundles/org.eclipse.jface/src/org/eclipse/jface/widgets/AbstractControlFactory.java:55: error: bad HTML entity
	 * The mnemonic indicator (character '&') is not displayed in a tool tip. To
	                                      ^
/home/jenkins/agent/workspace/eclipse.platform.ui_master/bundles/org.eclipse.jface/src/org/eclipse/jface/widgets/AbstractControlFactory.java:56: error: bad HTML entity
	 * display a single '&' in the tool tip, the character '&' can be escaped by
	                     ^
/home/jenkins/agent/workspace/eclipse.platform.ui_master/bundles/org.eclipse.jface/src/org/eclipse/jface/widgets/AbstractControlFactory.java:56: error: bad HTML entity
	 * display a single '&' in the tool tip, the character '&' can be escaped by
	                                                        ^
/home/jenkins/agent/workspace/eclipse.platform.ui_master/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/internal/ExpandableNode.java:95: warning: {@return} not at beginning of description
	 * {@return current offset in the original list of elements}
	   ^
/home/jenkins/agent/workspace/eclipse.platform.ui_master/bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/internal/ExpandableNode.java:112: warning: {@return} not at beginning of description
	 * {@return all remaining elements from original array starting with the element
	   ^
/home/jenkins/agent/workspace/eclipse.platform.ui_master/bundles/org.eclipse.jface/src/org/eclipse/jface/widgets/TableColumnFactory.java:122: error: bad HTML entity
	 * The mnemonic indicator (character '&') is not displayed in a tool tip. To
	                                      ^
/home/jenkins/agent/workspace/eclipse.platform.ui_master/bundles/org.eclipse.jface/src/org/eclipse/jface/widgets/TableColumnFactory.java:123: error: bad HTML entity
	 * display a single '&' in the tool tip, the character '&' can be escaped by
	                     ^
/home/jenkins/agent/workspace/eclipse.platform.ui_master/bundles/org.eclipse.jface/src/org/eclipse/jface/widgets/TableColumnFactory.java:123: error: bad HTML entity
	 * display a single '&' in the tool tip, the character '&' can be escaped by
	                                                        ^
/home/jenkins/agent/workspace/eclipse.platform.ui_master/bundles/org.eclipse.jface/src/org/eclipse/jface/widgets/TreeColumnFactory.java:122: error: bad HTML entity
	 * The mnemonic indicator (character '&') is not displayed in a tool tip. To
	                                      ^
/home/jenkins/agent/workspace/eclipse.platform.ui_master/bundles/org.eclipse.jface/src/org/eclipse/jface/widgets/TreeColumnFactory.java:123: error: bad HTML entity
	 * display a single '&' in the tool tip, the character '&' can be escaped by
	                     ^
/home/jenkins/agent/workspace/eclipse.platform.ui_master/bundles/org.eclipse.jface/src/org/eclipse/jface/widgets/TreeColumnFactory.java:123: error: bad HTML entity
	 * display a single '&' in the tool tip, the character '&' can be escaped by
	                                                        ^
9 errors
2 warnings

so it seems to be well reproducible but the Jenkins Javadoc scanner seems not to find it.
Instead it is classified as a Maven Problem:

https://ci.eclipse.org/platform/job/eclipse.platform.ui/job/master/23/maven-warnings/moduleName.657231328/

by the way, currently the build is configured to not fails on javadoc problems ... so that why it show as ERROR in the log but not make the build itself fail...

@merks
Copy link
Contributor Author

merks commented Sep 19, 2023

Excellent detective work!

@laeubi
Copy link
Contributor

laeubi commented Sep 19, 2023

It seems even that this is specific to the HTML encoding problem where it is currently not handled so nice in this PR I see javadoc annotations just as expected:

grafik

(not that it seems people are bothering much more either if they are shown ;-)

grafik

@HeikoKlare
Copy link
Contributor

The last remaining javadoc errors that can be found in build logs should be fixed with:

@merks @laeubi Do you see anything left to do here or any reason to keep this issue open afterwards?

@laeubi laeubi linked a pull request Jan 18, 2024 that will close this issue
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 a pull request may close this issue.

5 participants