FIFE forums

General Category => General discussion => Topic started by: m64 on May 29, 2008, 04:56:40 pm

Title: Source code crossreferencer
Post by: m64 on May 29, 2008, 04:56:40 pm
I'd like to suggest setting up some kind of an online source code cros sreferencer, like lxr (http://lxr.linux.no/). I thought of this as a potential help for programmers with day jobs (ie. me), who could browse the source code in their slack time at work.

There are a few things to discuss, among them:
- how should the cross referencer be hosted;
- what kind of software should be used;
- other possible enhancements for such technology.

I could probably supply a host for the cross referencer. As of enhancements, perhaps some form of online code commenting would be useful - a bit like the system that was used for GPL3 drafting process - I don't know if any cross referencer comes with such a feature though.
Title: Re: Source code crossreferencer
Post by: m64 on May 30, 2008, 03:50:32 am
I've found another such tool, it.s called opengrok (http://www.opensolaris.org/os/project/opengrok/). It's some OpenSolaris tool. Unfortunately it runs asa java applet and I don't have any means of hosting such things.
Title: Re: Source code crossreferencer
Post by: mvBarracuda on May 31, 2008, 04:44:59 am
Heya m64 :-)

I know fairly little about the proposed tools as I'm not a programmer but it would be great if somebody could summarize what the main difference between these tools and the following existing code browsing solutions is:
* Trac SVN browser: http://mirror1.cvsdude.com/trac/fife/engine/browser
* Doxygen documentation: http://fifedocs.boxbox.org/doxygen/
* Epydoc documentation: http://fifedocs.boxbox.org/epydoc/

Mutex (who hosts the doxygen and epydoc docs on his server) is rather short of time ATM but I'm sure that we can get some of his time in case we decide to use one of these two proposed source code referencing solutions. Feedback by other developers would be appreciated.
Title: Re: Source code crossreferencer
Post by: m64 on May 31, 2008, 05:24:17 am
Heya m64 :-)

I know fairly little about the proposed tools as I'm not a programmer but it would be great if somebody could summarize what the main difference between these tools and the following existing code browsing solutions is:
* Trac SVN browser: http://mirror1.cvsdude.com/trac/fife/engine/browser

Trac allows browsing the code from the file and version based perspective - you can view a file file in the svn in any revision if you know what file are you looking for. Source files are not interconnected.

Quote
* Doxygen documentation: http://fifedocs.boxbox.org/doxygen/
* Epydoc documentation: http://fifedocs.boxbox.org/epydoc/

Code browsing capabilities of these tools allow for browsing in the "up" direction - that is if you stumble upon ie. function call you can find it's documentation and from there you can jump to it's definition.

Tools like LXR do "cross" referencing. That means that I can jump from use to definition, but also from definition to any of the uses and from one use to another (if someone is looking for a use example). They are not connected with documentation too, so it's a bit easier to browse if someone is interested only in source code.

So basically we should evaluate possible advantage of having this bidirectional browsing available. I must admit I forgot about the source code browsing capability of doxygen when  proposing LXR, so perhaps it might be found as not giving enough advantage to justify the cost of setting it up.
Title: Re: Source code crossreferencer
Post by: NikN on June 08, 2008, 01:04:09 am
This is definetly a great idea to look into. Its true for most of us with programming jobs, this will help us spend our downtime looking through the code.
Title: Re: Source code crossreferencer
Post by: MuteX on June 08, 2008, 06:22:40 am
Hey guys.

From my side, I'd be glad to install such a referencer. I'm personally fine with Doxygen, but it's true that it's a big advantage if someone is willing to browse the source from somewhere where the actual sourcecode is not available. I looked at LXR, especially the "examples" and think it's a useful piece of code. Also the good news is that my server is running Debian, and Debian has the LXR binary package in its repositories. So setting it up won't be a pain in the a.., I guess.

So, the only showstopper now is the decision which tool we want to use. ;-) I didn't look at OpenGrok, but at least it's not in the repositories of Debian, and that's kinda strange for such a tool. But if you guys say that OpenGrok has a better functionality and you prefer it, I'll take the time to set it up.

Time to choose. :-)
Title: Re: Source code crossreferencer
Post by: NikN on June 08, 2008, 06:53:42 am
it depends on the functionality we need, i guess. Hierarchical search sounds like a nice feature to have, but that's only available in OpenGrok.  However, the existing feautres in LXR seem fine enough too.
If we don't want most of the features available only in OpenGrok, then I think go with the easier option (namely LXR).
Title: Re: Source code crossreferencer
Post by: Sleek on June 08, 2008, 07:34:10 am
OpenGrok = better, Tomcat + Java webserver = kind of more difficult to setup.

Go LXR !
Title: Re: Source code crossreferencer
Post by: mvBarracuda on June 14, 2008, 01:36:57 pm
Any update on this topic MuteX? I remember that you mentioned that OpenGrok is too CPU-heavy for the server but how about LXR?
Title: Re: Source code crossreferencer
Post by: MuteX on June 24, 2008, 07:09:16 pm
Well, I spent the last hour on setting up LXR, which is really a pain. Too bad it's already 02:00 here when I found a good Mozilla website where a sample configuration is explained well. The next time I'll have some hours on my hands, I'll get this working. So stand by. :)
Title: Re: Source code crossreferencer
Post by: MuteX on July 11, 2008, 12:58:04 pm
I've got good and bad news:

Good ones first: LXR is working. But it's not referencing anything except namespaces and some macros. Look at this page for an example: http://fifedocs.boxbox.org/lxr/source/core/gui/guimanager.cpp

If there's anybody with LXR experience and is willing to give me a hint, feel free to reply. :)
Title: Re: Source code crossreferencer
Post by: mvBarracuda on July 11, 2008, 02:45:08 pm
Looks like you were able to get it working MuteX :-) good work!
Title: Re: Source code crossreferencer
Post by: Sleek on July 12, 2008, 06:35:20 am
Hurray for Mutex ! Good job mate.  :o

P/S : I'm at an oil rig in a very remote place in Pakistan right now. I'll be back :D
Title: Re: Source code crossreferencer
Post by: NikN on July 16, 2008, 09:48:02 am
Way to go Mutex!!!

barra, We'll want to put this on the Wiki, as it is an extremely useful tool and I think will allow much easier access for anyone interested in FIFE
Title: Re: Source code crossreferencer
Post by: mvBarracuda on July 16, 2008, 12:49:43 pm
Good point NikN, I've added a short paragraph about it here:
http://wiki.fifengine.net/Getting_started#Documentation