Update on DXR work

As I wrote previously, I've switched to DXR work for the summer, and have been making some good progress over the past month.  I wanted to show you some of the things I've done, and where I'm going in the coming weeks.

Much of my work thus far has been a backend rewrite.  This was long overdue and somewhat painful, but has enabled me to start fixing bugs and adding new features really easily.  We've setup a DXR instance at Mozilla, which you can find at http://dxr.mozilla.org.  I've also put my Dehydra/JSHydra debugging tool there, too (see http://dxr.mozilla.org/viewsource).  Note: not all of the features I'll be discussing below are installed on dxr.mozilla.org yet, but they will be soon.

I've been fixing things in the UI, and starting to layer new kinds of data into the index.  The first was to add compiler warnings.  You can now search the warnings using keywords and optionally limiting to certain paths:

Search for Warnings

The more common use of this warning info is encountering it within the source while looking at a piece of code.  Warnings appear with an '!' icon beside them, and hovering over the line shows the warning text.  Here's an example:

Warnings in Source

Another feature I've had numerous requests for, and is now implemented, is source code navigation aids. When you are in a large file, and looking at line 2456, it would be nice to know that this line is part of Foo::Bar(), and the signature of Bar(). Here's what it looks like:

Navigation Sync

Notice that AddRequest is highlighted in the sidebar, and a light-blue signature bar has appeared at the top of the source. These happen as you move your mouse, depending on the line, and disappear on their own.

I'm now moving on to improve/replace the current source info popup. I haven't decided whether to use an improved popup, add another panel to the left sidebar, or do something with inline expanding divs. The way Flickr's new popup works is one way I could go:

Improved popup idea for DXR

The inline expanding divs might work like this:

I'm going to spend another week or two on UI fixes before moving on to data analysis fixes and index improvements (there are some great build system changes coming soon that are going to make this easier--hello xpidl.py, I'm looking at you!).  If you have UI input, please give it to me soon.  Meanwhile, the fearless Joshua Cranmer, my lone and valued contributor, is working on making DXR generalized for projects other than Mozilla.  I hope to integrate some of his build/index changes coming up.

More to come soon!

Show Comments