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

Update to codesnippetdoclet 0.82 (supports JDK-11) and using JEP-413 @snippet tag #4342

Merged
merged 4 commits into from Jul 8, 2022

Conversation

jtulach
Copy link
Contributor

@jtulach jtulach commented Jul 7, 2022

There are broken links in NetBeans Javadoc as of 12.6 version (since we started to build with JDK-11). For example the modules package page references Modules API and that one is missing. To reproduce:

netbeans/platform/openide.modules$ JAVA_HOME=/jdk-8 ant clean build javadoc

generates the link properly. When JDK-11 is used to build the Javadoc, then the link is broken.

This PR updates to codesnippet4javadoc 0.82 which is properly tested on newer JDKs (up to JDK-18) and generates all the pages properly on all JDKs.

Additionally the switch to version 0.82 allows us to use JEP-413 javadoc tags. Done for platform and ide clusters in: 669e8f2 and in 66ace01 - for the rest. That allows us to disable the original syntax and allow only JEP-413 compliant one

@jtulach jtulach added this to the NB15 milestone Jul 7, 2022
@jtulach jtulach requested a review from ebarboni July 7, 2022 08:26
@jtulach jtulach self-assigned this Jul 7, 2022
@mbien mbien added Upgrade Library Library (Dependency) Upgrade doc Documentation related PRs labels Jul 7, 2022
@mbien
Copy link
Member

mbien commented Jul 7, 2022

we have a CI job which builds javadoc. I am wondering if this serves any purpose since it wouldn't really detect bugs like this anyway. Should I remove it next time I look at CI jobs to conserve some resources (thats ~30mins x2 per PR)?

I bet jenkins builds javadoc too for the dev builds (so we would still have something which builds it periodically).

@JaroslavTulach
Copy link

we have a CI job which builds javadoc. I am wondering if this serves any purpose since it wouldn't really detect bugs like this anyway.

Running ant build-javadoc generates a file nbbuild/build/javadoc/checklinks-errors.xml - if it contains failed JUnit test, the build could fail. There used to be a time, when there were no broken links in the Javadoc - not sure how much work would be to get there again.

@jtulach jtulach changed the title Updating to codesnippetdoclet 0.82 that works on JDK-11 Updating to codesnippetdoclet 0.82 that works on JDK-11 and using JEP-413 @snippet tag Jul 7, 2022
Copy link
Member

@mbien mbien left a comment

Choose a reason for hiding this comment

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

awesome, thanks for fixing this.

I like that you made the lib forward compatible with JEP413 and updated the tags with this PR too. I think NB even recently got some completion support for JEP413 via #3266 - so this all fits nicely together.

Copy link
Contributor

@singh-akhilesh singh-akhilesh left a comment

Choose a reason for hiding this comment

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

Awesome, LGTM.

@jtulach jtulach requested a review from lkishalmi July 8, 2022 05:35
@@ -35,7 +35,6 @@
import org.openide.util.NbBundle;
import org.openide.util.RequestProcessor;

import static org.netbeans.modules.gradle.execute.Bundle.*;

Choose a reason for hiding this comment

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

Javadoc on JDK-11 seems to have problems with Bundle.* imports - then it generates no HTML pages. I had to eliminate the import and use Bundle.xyz directly. Btw. the same problem appears in maven project, but there is too many mistakes for me to fix - could we have a transformation to avoid using import static, please @jlahoda, @dbalek?

Copy link
Member

Choose a reason for hiding this comment

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

jackpot rule language can't trigger on imports as far as I know. This would have to be written by hand I believe.

@jtulach jtulach changed the title Updating to codesnippetdoclet 0.82 that works on JDK-11 and using JEP-413 @snippet tag Update to codesnippetdoclet 0.82 that works on JDK-11 and using JEP-413 @snippet tag Jul 8, 2022
Copy link
Contributor

@lkishalmi lkishalmi left a comment

Choose a reason for hiding this comment

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

Nice!

@jtulach jtulach changed the title Update to codesnippetdoclet 0.82 that works on JDK-11 and using JEP-413 @snippet tag Update to codesnippetdoclet 0.82 (supports JDK-11) and using JEP-413 @snippet tag Jul 8, 2022
@jtulach jtulach merged commit 05da652 into apache:master Jul 8, 2022
@jtulach jtulach deleted the CodeSnippetDoclet0.82 branch July 8, 2022 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Documentation related PRs enhancement Upgrade Library Library (Dependency) Upgrade
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants