Open quantrpeter opened 10 months ago
Like the dialog says, unpack200 is required to extract old netbeans modules like CND. Java 14 removed unpack200, so one way to resolve this is to install JDK 8 or 11 and then use the bottom left button to "Choose Unpack200..." on the dialog to select the unpack200 executable to complete the CND install.
thanks @bitrunner May I know where is the c++ plugin? may be i can help to revamp it
Mostly @vieiro (with some clueless flailing around help from me) has been working to bring CND back to life. You can find the current state on the cnd branch of the main netbeans repository here on github.
The module can be found in the cnd directory. There is some conflict/overlap with the newer cpplite module that has to be resolved before CND can be incorporated back into netbeans proper. There have been some discussions regarding that on the mailing list. All help is appreciated.
We will also have the issue that currently NB21 is the last release scheduled to support JDK11. NB22 is meant to support JDK17+. We will have to consider whether to update the version check in NB22, and whether installing the old CND will require running on JDK 11 and with the JDK check killswitch enabled.
https://github.com/apache/netbeans/blob/master/platform/o.n.bootstrap/src/org/netbeans/Main.java#L40
cc/ @mbien
NB 22 would be probably a good time to remove the old update center from NB? It already has modules which don't work anymore even without JDK bumps. e.g #6810
code ages, and we can't update any plugin on there
I agree with @mbien we can't stay in the past. If there is really someone caring, he/she can take the CND plugins, unpack200 them and create a new distribution.
Mostly @vieiro (with some clueless flailing around help from me) has been working to bring CND back to life. You can find the current state on the cnd branch of the main netbeans repository here on github.
The module can be found in the cnd directory. There is some conflict/overlap with the newer cpplite module that has to be resolved before CND can be incorporated back into netbeans proper. There have been some discussions regarding that on the mailing list. All help is appreciated.
Well, to be fair, many people have been pushing the cnd branch, including @matthiasblaesing and @jlahoda, among others. There're incompatibilities with cpplite, but the cnd branch can be built (using ant -Dcluster.config=cnd
). I don't understand how cpplite is being used, so I really can't help improving it to make it compatible with cnd.
FWIW, I've started blending cpplite into cnd some time ago, but not quite done yet, I'm afraid.
Well, to be fair, many people have been pushing the cnd branch...
@vieiro yes which is great! I think what @neilcsmith-net meant was that if someone cared about the old release of CND, it would be possible to repack it without pack200 and upload it somewhere - without having to rebuild anything.
A module compressed with pack200 is a strong indication of it being an unmaintained plugin which hasn't been rebuild for over a decade. Installation itself will not remain the only problem - having decade old hibernate or struts 1 support (which had the last release 14 years ago) is questionable in itself (#6969, #6987, #6810).
here the plugin list of the pre-apache NetBeans 8.2 plugin portal:
For what it's worth, I tried to install C/C++
from plugin portal 8.2 on NB 20 running on JDK 17 (using pack200 from JDK 11) and got many exceptions like:
INFO [org.netbeans.updater]: 780: Unpacking org-netbeans-modules-cnd-antlr.nbm
INFO [org.netbeans.updater]: File installed /run/media/mbien/500GB 860EVO/nb_data/netbeans_20/cnd/config/Modules/org-netbeans-modules-cnd-antlr.xml@0
INFO [org.netbeans.updater]: Copied file /run/media/mbien/500GB 860EVO/nb_data/netbeans_20/cnd/update/download/org-netbeans-modules-cnd-antlr.nbm:netbeans/config/Modules/org-netbeans-modules-cnd-antlr.xml to /run/media/mbien/500GB 860EVO/nb_data/netbeans_20/cnd/config/Modules/org-netbeans-modules-cnd-antlr.xml
INFO [org.netbeans.updater]: File installed /run/media/mbien/500GB 860EVO/nb_data/netbeans_20/cnd/modules/locale/org-netbeans-modules-cnd-antlr_ja.jar.pack.gz@0
INFO [org.netbeans.updater]: Copied file /run/media/mbien/500GB 860EVO/nb_data/netbeans_20/cnd/update/download/org-netbeans-modules-cnd-antlr.nbm:netbeans/modules/locale/org-netbeans-modules-cnd-antlr_ja.jar.pack.gz to /run/media/mbien/500GB 860EVO/nb_data/netbeans_20/cnd/modules/locale/org-netbeans-modules-cnd-antlr_ja.jar.pack.gz
INFO [org.netbeans.updater]: Unpack /run/media/mbien/500GB 860EVO/nb_data/netbeans_20/cnd/modules/locale/org-netbeans-modules-cnd-antlr_ja.jar.pack.gz to /run/media/mbien/500GB 860EVO/nb_data/netbeans_20/cnd/modules/locale/org-netbeans-modules-cnd-antlr_ja.jar
INFO [org.netbeans.updater]: File /run/media/mbien/500GB 860EVO/nb_data/netbeans_20/cnd/modules/locale/org-netbeans-modules-cnd-antlr_ja.jar.pack.gz deleted.
INFO [org.netbeans.updater]: Ignore non-readable files
java.io.FileNotFoundException: /run/media/mbien/500GB 860EVO/nb_data/netbeans_20/cnd/modules/locale/org-netbeans-modules-cnd-antlr_ja.jar (No such file or directory)
at java.base/java.io.FileInputStream.open0(Native Method)
at java.base/java.io.FileInputStream.open(FileInputStream.java:216)
at java.base/java.io.FileInputStream.<init>(FileInputStream.java:157)
at org.netbeans.updater.UpdateTracking.getFileCRC(UpdateTracking.java:508)
[catch] at org.netbeans.updater.ModuleUpdater.unpack(ModuleUpdater.java:470)
at org.netbeans.updater.ModuleUpdater.run(ModuleUpdater.java:118)
and installation failed with:
INFO [org.netbeans.modules.autoupdate.services.InstallSupportImpl]: Timeout waiting for loading module org.netbeans.modules.cnd.api.remote@1.29.5.1
INFO [org.netbeans.modules.autoupdate.ui.wizards.InstallStep]: timeout of loading C/C++ Remote Development API[org.netbeans.modules.cnd.api.remote/1.29.5.1]
org.netbeans.api.autoupdate.OperationException[INSTALL]: timeout of loading C/C++ Remote Development API[org.netbeans.modules.cnd.api.remote/1.29.5.1]
at org.netbeans.modules.autoupdate.services.InstallSupportImpl$3.call(InstallSupportImpl.java:431)
at org.netbeans.modules.autoupdate.services.InstallSupportImpl$3.call(InstallSupportImpl.java:291)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
[catch] at java.base/java.lang.Thread.run(Thread.java:840)
So if someone would like to continue using the old release of the C/C++ support plugins. The easiest way to achieve this is to stick to NB 20 (soon NB 21 once released) and run NetBeans on JDK 11.
NetBeans 22 will only support running on JDK 17, 21 and 22 and will fail during C/C++ plugin installation as demonstrated above (assuming this can't be easily fixed - I wouldn't put too much effort into this, but if someone wants to take a look: https://github.com/apache/netbeans/labels/Contribution%20welcome ;)).
And as previously mentioned I think it would be a opportunity to also remove the NB 8.2 plugin portal from the preset list of NB 22. I might open a draft PR later. edit: here it is: #6991
CND might make it back one day into NB in a properly supported manner, but work on that happens during spare time and the feature is not trivial to re-integrate.
FWIW, I've started blending cpplite into cnd some time ago, but not quite done yet, I'm afraid.
@jlahoda, I would like to help get this done.
FWIW, my current sketch to blend cpplite into CND is here: https://github.com/jlahoda/netbeans/tree/cnd-cpplite-blend
It removes the cpplite.editor (not strictly necessary, but since it is never used anymore, there's no big reason why we should keep it), and rebases cpplite.debugger on top of cnd.debugger.common2
(i.e. it is another frontend to cnd.debugger.common2
, just as cnd.debugger.gdb2
is).
There may be an issue with the debugger - it is used in the VS Code extension, and the CND's debugger seems to require many dependencies. Which would make the extension even bigger than it is now, for a little benefit. One solution would be to try to limit the dependencies of the cnd.debugger.common2
. Alternative might be to exclude the cpplite.debugger from the standard distro, and keep it only for the VS Code extension and/or other special uses. (Or we could move to java/java.lsp.server/nbcode
, which might be cleaner.)
Some things that remain, from the top of my head:
java/java.openjdk.project
can provide the (location of the) compilation database.* on CND side: -- support for ccls (this shouldn't really be difficult, and I am not clear why there's a pushback against this) -- cnd.lsp must allow other projects to provide the (location of the) compilation database. Besides the Lightweight project, the `java/java.openjdk.project` can provide the (location of the) compilation database.
cnd.lsp
should be probably renamed to cnd.makeproject.lsp
, as it's specific for make based projects. Adding support for ccls
shouldn't be difficult. Currently a single clangd
instance can support different projects, I'm not sure if ccls
is able to that. IIRC ccls didn't support different projects last time I looked at it.
IMHO, it would be great if cnd.lsp wasn't specific to make based projects. I would like to use cnd.lsp with the meson project support I added too. Meson produces its own compilation database that should be fed to the server. Does it make any sense to separate the makefile specific compilation database generation from perhaps a more general cnd.lsp that would require a compilation database path to be given to it? I can work on that if there is consensus on that being a reasonable path forward.
Do we need some kind of plan to try to have some kind of CND available in NB 22 or is that just a waste of time and effort should be focused on finishing up Jan's work?
IMHO, it would be great if cnd.lsp wasn't specific to make based projects. I would like to use cnd.lsp with the meson project support I added too. Meson produces its own compilation database that should be fed to the server. Does it make any sense to separate the makefile specific compilation database generation from perhaps a more general cnd.lsp that would require a compilation database path to be given to it? I can work on that if there is consensus on that being a reasonable path forward.
Yep, that' s a good idea, I think. We could lay out things like so:
BTW, "ide/lsp.client" will need some refactoring because of race conditions. The "rust-analyzer" LSP server is complaining that we're sending open document notifications when the server has not been initialized yet.
Do we need some kind of plan to try to have some kind of CND available in NB 22 or is that just a waste of time and effort should be focused on finishing up Jan's work?
I think we should wait to see if Jan can do some progress in improving cpplite with the cnd gdb debuggers. All help should go on Jan's work, I think.
Meanwhile I'll try to upgrade NB's "antlr4" support, drop the obsolete tomlj and move on the pending Rust PR as time permits (little time for this lately, I'm afraid).
Hi NetBeans people, I just suggest that you warn our NetBeans Users (to avoid time loss), in the C/C++ site section, that
due the deadline of JDK 11 --> Netbeans 21 is the last version usable for C++.
I tried Netbeans 21 with JDK 11 and there are no option to install C++ support except CPPLite Kit.
You have to go ... Tools -> Plugins and there Uninstall the C/C++ lite. after that, go to Settings and Add a new portal as "NetBeans 8.2 Plugin Portal" https://updates.netbeans.org/netbeans/updates/8.2/uc/final/distribution/catalog.xml.gz and check his mark "Active"...
After that, in Available Plugins you will find the C++ Suite. Install it and during the 2 minutes install you will have to accept and show the path of JDK-11/bin (mine is /usr/java/jdk-11/bin/) where lives pack/unpack200 programs. The installation finished you're done ! And the best, via the Services tab, you can create and work distant C/C++ projects with git-distant ... Best regards, Serge.
I was trying to install the C/C++ plugin from NetBeans 8.2 Plugin Portal on NetBeans 22 and everytime I get this issue: Manual activation returns this issue: So basically C/C++ plugin might work on NetBeans 22 if those dependencies could be resolved.
EDIT: Same issue on Netbeans 21.
My full sequence works with Netbeans 21 ... and sure on LINUX (for M$ I don´t care !) Regards, Serge
The C/C++ plugin seems to work for me too but it appears disabled in NetBeans plugins list. I already posted the activation error. I'm on Linux too.
Just wondering if there's any more progress or guidance on this. I've been using cnd Netbeans for a long time because it's honestly some of the best C++ code intelligence I've used, and it's hard to move away from that. Now that projects are using more and more modern C++, (like features from C++17 and up), cnd starts breaking.
Netbeans 21 C++ from "NetBeans 8.2 Plugin Portal" is perfectly usable with JDK-11 'pack200' ... why don't you use two versions the last 22 for fun and old 21 for C++ work ?!!
What is the status of https://github.com/apache/netbeans/tree/cnd branch? How to install it? Is it still a plugin or it become a core part of Netbeans? It seems have Meson support that I am interested in.
What is the status of https://github.com/apache/netbeans/tree/cnd branch? How to install it? Is it still a plugin or it become a core part of Netbeans? It seems have Meson support that I am interested in.
Make sure you have JDK11 (and bigger?) and ant
(10.>) in your $PATH
and then
$ git clone https://github.com/apache/netbeans.git
$ cd netbeans
netbeans$ ant -Dcluster.config=cnd
netbeans$ ant tryme
You should install a recent C/C++ LSP server such as clangd
or ccls
.
You should install a recent C/C++ LSP server such as
clangd
orccls
.
Is the LSP requirement a later addition? The older C++ plugin doesn't seem to require anything like that, you just point it to the code and it works out of the box.
You should install a recent C/C++ LSP server such as
clangd
orccls
.Is the LSP requirement a later addition? The older C++ plugin doesn't seem to require anything like that, you just point it to the code and it works out of the box.
The "older C++ plugin" cannot be incorporated directly into Apache NetBeans due to license constraints and code provenance issues. The LSP servers are substitute to those parts. And they're easier to maintain and more accurate.
The "older C++ plugin" cannot be incorporated directly into Apache NetBeans due to license constraints
Does it mean that license is proprietary/NDA or it is just incompatible with Apache Netbeans? If second, it can be developed in separate repo and packaged as plugin.
The "older C++ plugin" cannot be incorporated directly into Apache NetBeans due to license constraints
Does it mean that license is proprietary/NDA or it is just incompatible with Apache Netbeans? If second, it can be developed in separate repo and packaged as plugin.
To begin with not all modules in the original CND were donated to the ASF, so the code didn't even compile (that'd be the first commit in the cnd branch). Then there where license incompatibilities and obscure code provenance. Then also the difficulty of maintaining such an old/big codebase (which has been evident during the years).
You can see the whole history in both the "cnd" branch commit history and in the Apache NetBeans mailing list archives.
You should install a recent C/C++ LSP server such as clangd or ccls.
It worked for me for default Makefile based projects, but not for Meson projects. Is it not supported yet or I am missing something?
For meson have a look here: https://github.com/apache/netbeans/pull/6859
Unfortunately starting NB22 with openjdk 11 produces an error:
@mrechte yes NB22 requires JDK17 but you can choose the path to unpack200 from JDK 11 to install older plugins.
Sorry, I did not read well the thread. However with NB22 I get the same error than @F3llFr0mTh3Sky and I am on a Linux box :)
in summary:
CND might be salvaged one day under the NetBeans project but this is no trivial task so there is no ETA for that. The other plugins weren't donated to apache to my knowledge.
Apache NetBeans version
Apache NetBeans 20
What happened
Language / Project Type / NetBeans Component
No response
How to reproduce
install c++ plugin
Did this work correctly in an earlier version?
No / Don't know
Operating System
Mac
JDK
21
Apache NetBeans packaging
Apache NetBeans provided installer
Anything else
nothing
Are you willing to submit a pull request?
No