netbeans
netbeans copied to clipboard
Upgrade Commons-IO from 2.6.0 to 2.11.0
Library Notes:
- Require Java 8
- 63 Bug fixes
- 72 New Features
- 64 Improvements
NetBeans Notes:
- Remove duplicated jar and add dependency to
java.lsp.servermodule, this is the only module that requiresorg.apache.commons.io - Since version 2.7 commons-io change it's
Bundle-SymbolicNamein the MANIFEST.MF fromorg.apache.commons.iotoorg.apache.commons.commons-io, this newly added hyphen breaks the Ant targetcommit-validationwith the 2 respective GitHub TasksCommit-validation (on macOS)andCommit-validation (on Linux). This should be fixed by adding a hyphen-to a regular expression inplatform/openide.modules/Dependency.java line 180but I could not make it work. I did add a two new tests to validate codename values with a hyphen and underscore. According to the spec this is a valid name:- name: alphanum *headerchar
- headerchar: alphanum | - | _
Testing:
- Full build done
- Verify successful execution of libraries and licenses Ant test
- Verify successful execution of unit tests for modules
java/java.lsp.server(the one that use this library) - Checked the file is in
{nb_all}/platform/modules/org-apache-commons-io.jar
Since version 2.7 commons-io change it's Bundle-SymbolicName in the MANIFEST.MF from org.apache.commons.io to org.apache.commons.commons-io, this newly added hyphen breaks the Ant target commit-validation with the 2 respective GitHub Tasks Commit-validation (on macOS) and Commit-validation (on Linux). This should be fixed by adding a hyphen - to a regular expression in platform/openide.modules/Dependency.java line 180 but I could not make it work. I did add a two new tests to validate codename values with a hyphen and underscore. According to the spec this is a valid name. JARManifest Spec
@dbalek @matthiasblaesing any thoughts?
My gut feeling is, that it should be save to relax the naming rules for code name bases. The dash is the only character that can't be used in code name base, but the NetBeans module name. This needs further checks though.
Update - the last big change in that area is most probably this:
https://bz.apache.org/netbeans/show_bug.cgi?id=212364 https://bz.apache.org/netbeans/attachment.cgi?id=119563&action=diff
So the code-name base is already not a package anymore - further supporting my feeling
@pepness sorry for the late reply. I had a look at this and this needs a documented API change, that will need a review, we should also rename the NetBeans module (yes commons-io broke compatibilty).
This is my suggestion how to fix it: https://github.com/matthiasblaesing/netbeans/tree/pr-3794 (this should be rebased onto master and most probably squashed). Please have a look.
restarting CI with all tests enabled
core.startup is failing, restarted it once already:
junit.framework.AssertionFailedError
at org.netbeans.core.startup.ConsistencyVerifierTest.testIAE(ConsistencyVerifierTest.java:114)
at org.netbeans.junit.NbTestCase.access$200(NbTestCase.java:77)
at org.netbeans.junit.NbTestCase$2.doSomething(NbTestCase.java:476)
at org.netbeans.junit.NbTestCase$1Guard.run(NbTestCase.java:402)
at java.lang.Thread.run(Thread.java:750)
moved this to NB18. If anyone things this would be a candidate for NB17, feel free to move it back
PR has conflicts
moving to NB20
~would be good to resolve the conflicts to get a fresh CI run in~ see below
We have now #6480, the approach @lahodaj took to fix the hyphen vs. underscore problems looks easier to me and does not involve changing the netbeans module system.
closing, since the other PR is now integrated