sdedic commented on PR #4921:
URL: https://github.com/apache/netbeans/pull/4921#issuecomment-1315317695
So - cause found. This is a combination of 3 bugs
1. in github action `setup-java@v3`. The action seems to unpack the JDK
installation with improper timestamps: instead of leaving the file stats as
they are stored in the archive, the unpacked contents is timestamped with the
date/time of the action execution. If an application links to a `jar` inside a
JDK, such as `tools.jar` for many NB modules, various up-to-date checks might
fail, since the referenced JAR's time will be that of the JDK installation, not
the time of the JAR's creation.
2. the `CustomJavac` task used in `nbbuild` attempts to clean debris after
`depend` ANT task - the depend task does not handle inner classes well, so
`CustomJavac` cleans up inner classes that depend lefts behind, based on the
enclosing class' presence. Because of a bug it mishandles classes whose `$`
mistakes them for innerclasses. Naturally no toplevel class `''` ever existed :)
3. The sequence of steps in the workflow is:
a. install JDK 11
b. build
c. install JDK 8
d. test
At the last step, `tools.jar` from JDK8 appears **more recent than compiled
classes** from step (b), the netbeans build fails up-to-date check and a module
(not test, but production code) is rebuilt, partially.
As JDK8 is itypically not reinstalled each time on developer's machine - and
if it was, it would be through some conventional `unzip` or `tar` that
preserves file timestamps, so the up-to-date check always succeeded on local
machine(s) and the recompilation step was never done in a local environment.
Then, `depend` task because of (again) failed up-to-date check deleted some
classes that (in)directly used `tools.jar` types; typically refactoring
classes. After that, because of the bug (1), `nb-javac` deleted `$JsCallback$`
class - that was never generated again.
The tests were finally run, but the required `$JsCallback*` classes were
gone already.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists