Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 184065 - gvim/vim needs |+netbeans_intg| to work with Clewn.
Summary: gvim/vim needs |+netbeans_intg| to work with Clewn.
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Vim Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-03 08:59 UTC by Giampier
Modified: 2008-03-03 20:56 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Giampier 2007-07-03 08:59:31 UTC
Clewn (http://clewn.sourceforge.net/index.html) provides an integration between
gdb and vim. However to work it needs gvim/vim beeing |+netbeans_intg| enabled.
However with USE="netbeans" flag, portage installs all the Sun Java suite, and this is bad.
Please provide a suitable use flag to activate this feature only without all that dependencies.

Reproducible: Always
Comment 1 Mike Kelly (RETIRED) gentoo-dev 2007-07-03 13:11:13 UTC
The netbeans USE flag pulls in dev-util/netbeans, which in turn depends on >=virtual/jdk-1.3. I guess the default provider for that virtual on your system is sun, but there are others.

This doesn't look like it's at all a vim bug, though.

Also, maybe you're setting the netbeans USE flag globally? Have you tried just setting it for app-editors/gvim in your /etc/portage/package.use file?
Comment 2 Giampier 2007-07-03 15:03:14 UTC
> Have you tried just
> setting it for app-editors/gvim in your /etc/portage/package.use file?

Yes. And the result is the same.

  $ echo $USE
  -acl -gpm cscope
  $ cat /etc/portage/package.use 
  app-editors/gvim netbeans
  $ emerge -pv gvim

  These are the packages that would be merged, in order:

  Calculating dependencies... done!
  [ebuild  N    ] dev-java/javatoolkit-0.2.0-r1  20 kB 
  ...
  [ebuild  N    ] dev-util/netbeans-5.5-r6  USE="-debug -doc" 107,174 kB 
  [ebuild   R   ] app-editors/gvim-7.1.002  USE="cscope netbeans* perl python -acl (-aqua) -bash-completion -gnome -gpm -gtk -motif -nextaw -nls -ruby" 0 kB 

  Total: 138 packages (137 new, 1 reinstall), Size of downloads: 458,074 kB
  Fetch Restriction: 2 packages (2 unsatisfied)

I have also tried to use the `netbeans_intg' flag.
But simply the wanted feature is not compiled.

  $ gvim --version | grep netbeans
  -netbeans_intg -osfiletype +path_extra +perl +postscript +printer +profile
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2007-07-04 07:22:13 UTC
(In reply to comment #2)
> I have also tried to use the `netbeans_intg' flag.
> But simply the wanted feature is not compiled.

There's no such flag, why are you surprised? :) Also, there's no way to work around the fact that netbeans depends on Java, live with it.
Comment 4 Giampier 2007-07-04 10:03:18 UTC
> There's no such flag, why are you surprised? :)
I hoped in some kind of undocumented flag...

> Also, there's no way to work
> around the fact that netbeans depends on Java, live with it.

This is not the point. I try to be more clear:

1) I want gvim/vim with the netbeans_intg feature. (see gvim --version).
2) I do not want Netbeans.
3) I do not want Java.

This because exist programs, other than Netbeans,
that use the 'netbeans_intg' feature to interact with
vim/gvim (see Clewn).

Is this possible?

Comment 5 Miroslav Šulc gentoo-dev 2007-08-23 18:25:13 UTC
You can try to dig out what exactly from netbeans is needed to build that netbeans support in gvim. Then we can talk about what we can do about it.

I am not gvim maintainer but I am netbeans maintainer so I can help from the netbeans side of the problem.
Comment 6 Giampier 2007-08-25 08:51:42 UTC
(In reply to comment #5)
> You can try to dig out what exactly from netbeans is needed to build that
> netbeans support in gvim. Then we can talk about what we can do about it.

In the beginning was the `NetBeans External Editor module'.
With the `NetBeans External Editor module', gvim can be used as editor in NetBeans.

  ``The External Editor support module allows users a choice
  of several popular editors as well as the default editor
  built into NetBeans. [...] Currently we have integrated with
  a vi super-clone known as Vim  and XEmacs.''

  quoted from http://externaleditor.netbeans.org/

This integration relies on the `External Editor Protocol'.

  ``The External Editor module and the editor you have selected
  comunicate through the External Editor Protocol. [...]''

  again from http://externaleditor.netbeans.org/

On the vim side (the one that interests me) this protocol has been extended to support integration with other tools

  ``The communication between NetBeans and Vim uses plain text
  messages.  This protocol was first designed to work with the
  external editor module of NetBeans see
  http://externaleditor.netbeans.org. Later it was extended to
  work with Agide A-A-P GUI IDE, see http://www.a-a-p.org. The
  extensions are marked with "version 2.1".''

  quoted from http://www.vim.org/htmldoc/netbeans.html *netbeans-protocol*

  ``The interface to NetBeans is also supported by Agide,
  the A-A-P GUI IDE. Agide is very different from NetBeans [...]''

  quoted from http://www.vim.org/htmldoc/netbeans.html *netbeans-intro*

Other tools that uses the `External Editor Protocol' to work with vim also exist. One of these tools is Clewn (http://clewn.sourceforge.net/).

  ``Clewn implements full gdb support in the vim editor: breakpoints,
  watch variables, gdb command completion, assembly windows, etc.''

  quoted from http://clewn.sourceforge.net/index.html

  ``At startup, clewn forks an instance of GDB, sets up a socket,
  listens to this socket, and forks an instance of gvim that will
  connect to this same socket in order to establish a NetBeans connection
  between clewn and gvim.''

  quoted from http://clewn.sourceforge.net/doc.html *clewn-starting*

Currently, the use of the `netbeans' use flag for gvim compiles the `netbeans_intg' option in gvim (see gvim --version) and, as dependency, installs 
NetBeans.

Suppose that I am interested in using Clewn.
Then I need the `netbeans_intg' option compiled in gvim.

\quote{
a) REQUIRED:
------------
    GDB:	    gdb 6.6 or any previous version, starting from gdb 5.3
    VIM:	    any version starting from Vim 6.3 with
		    the |+netbeans_intg| feature enabled
}

  quoted from http://clewn.sourceforge.net/install.html

However I am not interested in NetBeans!

In my opinion, the existence of these tools that uses the `External Editor 
Protocol' to work with vim, shows that it is a mistake that the `netbeans' use 
flag of gvim depends on NetBeans.

Comment 7 Miroslav Šulc gentoo-dev 2007-08-25 09:15:12 UTC
I looked in the related eclass little bit and it seems that the ebuild uses nothing from netbeans.

From your comment it seems to me that 'netbeans_intg' is a legacy name, something like 'externaleditor' would make more sense.

It really makes no sense to install netbeans and all of its deps (there is more than 100 deps in netbeans 5.5 afaik) just because one wants External Editor Protocol support in vim. Unfortunately I can do nothing about this, it's up to vim herd to decide to drop the dep on dev-util/netbeans. Up to that, imo, 'externaleditor' use flag would make more sense but that would not be aligned with upstream.
Comment 8 dynamotwain 2007-12-12 01:09:02 UTC
GVim compiles fine with the netbeans dependencies in /usr/portage/eclass/vim.eclass commented out, and works with Clewn even when when netbeans isn't installed.

There is absolutely nothing from Netbeans that is required to either compile or run Vim with the netbeans USE-flag. Vim's Netbeans integration is just an additional commandline option to use a TCP/IP socket for debugger/editor control.

Programs such as Clewn and AGIDE (http://www.a-a-p.org) use this same TCP/IP protocol to provide graphical debugging support in Vim. There are no run-time or compile-time dependencies on Netbeans; it's only named after Netbeans because it was a Netbeans sub-project that defined the text-based TCP/IP protocol.

In fact, there isn't a single version of Netbeans in portage that includes the externaleditor module that implements this protocol. The oldest version of Netbeans in portage is 3.6, but the oldest version to include this module was 3.5.1 (http://externaleditor.netbeans.org) and sources have been removed from the main trunk.

In short, the artificial dependency on netbeans makes absolutely no sense. There is no header or library dependency provided by netbeans. In addition, the USE-flag does not enable any features that the any recent version of Netbeans supports.
Comment 9 Thomas Capricelli 2008-02-26 23:29:04 UTC
hello
I'm one of the author of kvim (now dead, but still). 
The so-called netbeans integration in vim will just enable the given protocol to be compiled in vim, so that vim can talk with some external component (such as netbeans, but also with others).

There is absolutely no reason why this USE flag should request netbeans to be merged, this is in my humble opinion a mistake. It should (or not) add the ./configure option for vim, but that's all. 

I tested, and indeed, vim compiles ok with the netbeans option enabled, and i  have no java, no netbeans installed.

I'm ready to answer some more question if you like.
Comment 10 Ali Polatel (RETIRED) gentoo-dev 2008-03-03 20:56:33 UTC
First of all thanks everyone :) netbeans use flag doesn't DEPEND on
dev-util/netbeans anymore. I've also edited the USE flag description a bit:
app-editors/gvim:netbeans - Include netbeans externaleditor integration support.
I plan to move over clewn from sunrise to gentoo-x86 this weekend.
Thanks again :)