master apidoc links fixes (partial)#4450
Conversation
what if we generate the javadoc with the same JDK of the current nb-javac version? So for master it would be JDK 18 right now. Due to nb-javac, NetBeans builds a little bit of a frankenstein JDK at runtime. Since java is forward compatible API-wise, JDK 18 should hopefully cover all APIs which are used in NBs. |
|
@mbien this could be done in a CI build but how to do that at the time you edit the module within IDE for example. |
I don't think this is a problem. NB can be built on current JDKs thanks to the updates in 13 and 14. We could let it print a warning and skip the javadoc build: "javadoc build of this module requires running on the same JDK version as nb-javac is based on" but maybe this isn't even needed. Javadoc is a separate target it isn't build by default anyway - not many would notice. As long we can generate and host docs somehow its all good IMO. edit: does it work if you build the doc with 18? ;) |
|
Could "we" publish javadocs for nbjavac? And if we did, could we link to them? |
|
@mbien building too ahead make some module not compilable (source target too low 1.6 for openide.io as an example) I have now idea if we can mix javadoc from nbjavac + current jdk. there are a lots of forward reference to modules that are not in build classpath and need the replace @see and @link are very strict. |
i think we could rise everything to 8 if necessary. Even the profiler is using 8. Nothing is tested on 1.6. |
|
I will later sqash all of that in one commit so we could resync. |
this was a lot of work @ebarboni, good job! |
9549d9b to
5cb0f24
Compare
|
removed the discussion as ported to dev. I tried to use --patch-module but withtout success. waiting for PR on website site to alter the missing link. Introducing: to allow a choice in nbbuild/javadoctools/templates.xml because now 2 modules needs the boolean set: |
|
this is going to be difficult to review :/ would it be possible to split "interesting" changes like the build logic for |
| <target name="javadoc-exec-packages" depends="javadoc-init,javadoc-generate-references,javadoc-generate-overview,javadoc-exec-condition,javadoc-check-timestamps,javadoc-make-plain-title,javadoc-make-hyperlinked-title,javadoc-exec-condition,-javadoc-set-footer,-javadoc-exec-packages-jdk,-javadoc-exec-packages-nbjavac" unless="javadoc.exec.packages"> | ||
| <!-- javadoc-exec-packages-jdk --> | ||
| <!-- javadoc-exec-packages-nbjavac --> | ||
| </target> | ||
|
|
There was a problem hiding this comment.
previous target javadoc-exec-packages depends on -javadoc-exec-packages-jdk and javadoc-exec-packages-nbjavac
| <arg value="-notimestamp" /> | ||
| </javadoc> | ||
| </target> | ||
| <target name="-javadoc-exec-packages-jdk" depends="javadoc-init,javadoc-generate-references,javadoc-generate-overview,javadoc-exec-condition,javadoc-check-timestamps,javadoc-make-plain-title,javadoc-make-hyperlinked-title,javadoc-exec-condition,-javadoc-set-footer" unless="javadoc.nbjavac"> |
There was a problem hiding this comment.
target -javadoc-exec-package-jdk is active only if javadoc.nbjavac is not set
| <javadoc source="${javac.source}" author="false" destdir="${javadoc.out.dir}" packagenames="${javadoc.packages}" stylesheetfile="${javadoc.css.main}" windowtitle="${javadoc.title}" overview="${javadoc.overview}" splitindex="true" use="true" version="false" useexternalfile="true" encoding="UTF-8"> | ||
|
|
||
|
|
||
| <target name="-javadoc-exec-packages-nbjavac" depends="javadoc-init,javadoc-generate-references,javadoc-generate-overview,javadoc-exec-condition,javadoc-check-timestamps,javadoc-make-plain-title,javadoc-make-hyperlinked-title,javadoc-exec-condition,-javadoc-set-footer" if="javadoc.nbjavac"> |
There was a problem hiding this comment.
-javadoc-exec-packages-nbjavac target only active javadoc.nbjavac
currently as mentioned only 2 modules need that. javadoc in this case not fail if error.
it's possible to test on module java.source.base. ant clean;ant build; ant javadoc.
As this target is not working cannot prepend the bootclasspath with nb-javac-jdk this lead to this module not visible in the apidoc (except their arch,apichanges)
|
I try to put emphasis on the part that change according to the javadoc.nbjavac flag. it's if unless ant contional as done in many place in our build file. The only issue is within the javadoc target using nbjavac I've no idea on how to make it work I find it difficult to split as I would like to get the last link error done. The one linking to *netbeans.org/ and blots landing to useless 404 pages (pr in progress to website). All changes in templates.xml is because got lots of fixes to do like replacing @element@ deeper, filtering on special index files or deprecated list. Snippet was to short with only 120 line. Adding generated path to get bundle linked too. |
591b5f0 to
f66a27b
Compare
f66a27b to
7a4a3bf
Compare
|
@mbien hope the commit split in enough. |
mbien
left a comment
There was a problem hiding this comment.
i only glanced over the first commit since it touches over 1k files which makes it hard to review.
The rest looks ok as far as I can tell. Good that the javadoc.nbjavac trick works. I left one comment inline.
Since this is such a big changeset, i would recommend to split it into two commits, one which changes ant logic and actual source code logic and another which fixes all the links and other javadoc issues. So that we don't hide important changes in all the cleanup noise.
sdedic
left a comment
There was a problem hiding this comment.
Reviewed up to harness cluster ... will continue. Sorry - it's terribly long :)
enterprise/j2eeserver/src/org/netbeans/modules/j2ee/deployment/devmodules/api/J2eePlatform.java
Outdated
Show resolved
Hide resolved
...rprise/j2eeserver/src/org/netbeans/modules/j2ee/deployment/plugins/spi/J2eePlatformImpl.java
Outdated
Show resolved
Hide resolved
| * The mapping can cause the action to be <b>disabled</b>: if {@link #getReloadRule()} == {@link ReloadRule#NEVER} and | ||
| * {@link #getArgs()} == {@code null}. Such mapping had no effect in previous versions. This can be checked by a | ||
| * convenience method {@link RunUtils#isActionDisabled}. | ||
| * {@link #getArgs()} == {@code null}. Such mapping had no effect in previous versions. |
There was a problem hiding this comment.
reason to remove the mention to isActionDisabled ?
There was a problem hiding this comment.
this method is no more present.
| * <p> | ||
| * GradleExecConfigurations can be also declared by a Plugin that implements a | ||
| * <a href="@TOP@/org/netbeans/spi/GradleActionsProvider.html#define-configuration">GradleActionsProvider</a>, | ||
| * {@link org.netbeans.modules.gradle.spi.actions.GradleActionsProvider GradleActionsProvider }, |
There was a problem hiding this comment.
The original link points directly to the example code (using anchor)
There was a problem hiding this comment.
The anchor is not working because not present that why I try to use the link to the class
| * Post action on this DebuggerEngine. | ||
| * This method does not block till the action is done, | ||
| * if {@link #canPostAsynchronously} returns true. | ||
| * if <code>canPostAsynchronously</code> returns true. |
There was a problem hiding this comment.
method is not existing and cannot be linked. Not sure on how to rewrite
|
I will later squash all this in one commit but I try to keep the commit per module for helping review |
|
will be reworked per clusters. Changes should be the same |
|
Hey @ebarboni , could I possibly help with this? It's interesting to me and I could learn some new stuff. I would need some guidance so that I don't already duplicate your work. |
HI @jtulach I tried the approach on master too.
with jdk 11 some warning are now error I guess and prevent the javadoc generation
I try to fix some of the issue I encounter.
Missing element are error (i.e Bundle so I introduced) a new path element in the javadoc task
For the moment I have 63 lines of bad links.
most of them are related to https://github.com/apache/netbeans/tree/master/java/java.source.base
(as an example)
org.netbeans.modules.java.source.builder issue it that javadoc cannot find the com.sun.source.tree.CaseTree.CaseKind;
I compile on jdk 11 and this is introduced in jdk 12 or maybe with the nb-javac.
What would be a good method to handle that ?