apache / netbeans

Apache NetBeans
https://netbeans.apache.org/
Apache License 2.0
2.62k stars 840 forks source link

Remove downloader from NBI #7542

Closed mbien closed 2 months ago

mbien commented 2 months ago

how to test: 1) setup JDK 23 2) checkout this branch 3) build (with zip):

ant clean -q
ant build -Dcluster.config=release

4) build installers (download installer.sh and run using bash)

bash installer.sh nbbuild/NetBeans-dev-dev-baa644f9077e618cb3555695e0d3f0a07a0db380-release.zip 42 121212

this should create the windows installer:

tree dist/
dist/
├── bundles
│   ├── Apache-NetBeans-42-bin-linux-x64.sh
│   └── Apache-NetBeans-42-bin-windows-x64.exe

which is now testable on windows (not testable on JDK 23ea since the native launcher can't parse ea java versions)

this PR would unblock https://github.com/apache/netbeans/pull/7525 (and https://github.com/apache/netbeans/pull/7484) full test on JDK 23 and nb-javac 23 ran in https://github.com/apache/netbeans/pull/7538 related to https://github.com/apache/netbeans/issues/4952

mbien commented 2 months ago

@matthiasblaesing tbh my first thought was also to try to reimplement it which I gave up on fairly quickly after going through the code. My second thought was to remove the time slicing scheduler and sequentialize the download to get rid of the suspend/resume at least. But since the threading model leaked through the API, this wouldn't really work (interrupts etc) - and testing this would have been a pain. Any modern downloader implementation would be trivial today but couldn't really be put behind that API.

@neilcsmith-net did also take a closer look through NBI long ago and also decided that it was not worth it, this is what spawned https://github.com/apache/netbeans-nbpackage as you know.

Last but not least: unmaintained net code isn't ideal, even if it would continue to work. We would keep releasing it even though all tests are disabled and nobody is looking at it anymore.

mbien commented 2 months ago

The check-for-updates checkbox has currently no purpose. It got enabled in https://github.com/apache/netbeans/pull/1348, wondering if we should turn it off again.

nbi-check-for-updates

edit: will move other changes to separate PRs since the main purpose of this PR is to make NB buildable on JDk 23 edit2: -> https://github.com/apache/netbeans/pull/7550

mbien commented 2 months ago

I am planing to merge this relatively soon so that we can start building/testing on JDK 23. I tested this once more on win 10 (in conjunction with https://github.com/apache/netbeans/pull/7550) and saw no problems.

mbien commented 2 months ago

will rebase and then merge.

~once done, I will do the same with https://github.com/apache/netbeans/pull/7525, assuming everything there is still green (can't remember if it also requires nb-javac 23)~

edit: actually I believe the nb-javac PR is a precondition of the CI PR

mbien commented 2 months ago

lets wait with merge https://github.com/apache/netbeans/pull/7387#discussion_r1668389146 / https://github.com/apache/netbeans/pull/7553