5 ms·
SourceWeb: A C/C++ source code indexer and navigator
- ausjke 11y agoThis looks really interesting, source-navigator has not been actively developed for years, source-insighter is windows-only, eclipse etc is just too heavy for code navigator. however the 0.1 release is done on 2013.5.6 and that is it, not much development was done since then. Also the 'apt-get' list for compiling simply failed (could not find those packages) on debian 8. while I really like a light-weight source code navigator,this one needs lots of work it seems.
- aethertap 11y agoThe master branch worked without issue for me on ubuntu 15.04 and 15.10. I had to install clang-3.6 and libclang3.6-dev, if that helps.
- ryanprichard 11y agoSomeone just sent a patch this morning upgrading it to Clang 3.7, which is available in the Ubuntu 15.10 repository, but not earlier. There are also official x64 llvm.org binaries for 14.04 that work. I don't actually use the program on a daily basis, but I do pull it out on special occasions. Most recently I used it while tracking down https://github.com/atom/electron/issues/3380 https://github.com/atom/electron/issues/3380. It's helpful because Electron/Chromium is big and I'm unfamiliar with the code.
- ausjke 11y agoJust built it on 15.10 and it will segfault when I do "sourceweb index" but will run fine "sourceweb ./index", seems like a path is mandatory. All in all this is not as feature complete as source navigator, which is old but works for me better still.
- KayEss 11y agoNice. I've been wanting something like this. I can imagine using this as a starting point to hack something up with as it appears to have examples for all of the bits I was thinking was going to be hardest :) Hopefully it'll mean I can forget about doxygen.
- jhasse 11y agoAwesome! Would be cool if this could be integrated into Atom.
- castratikron 11y agoMight be cool. I'd like to see how it compares with cscope.
- guruz 11y agoThere's a similar tool here which is running inside the web browser: http://code.woboq.org/llvm/clang/include/clang/AST/ASTContext.h.html#_ZNK5clang10ASTContext15getTypeDeclTypeEPKNS_8TypeDeclES3_ http://code.woboq.org/llvm/clang/include/clang/AST/ASTContex... https://code.woboq.org/ https://code.woboq.org/ https://woboq.com/codebrowser.html https://woboq.com/codebrowser.html
- nephyrin 11y agoMozilla's DXR deserves a look as well https://dxr.mozilla.org/mozilla-central/source/ https://dxr.mozilla.org/mozilla-central/source/ https://github.com/mozilla/dxr https://github.com/mozilla/dxr
- TACIXAT 11y agoSource Navigator is a non-web source code viewer. http://sourcenav.sourceforge.net/ http://sourcenav.sourceforge.net/
- mellery451 11y agolooks interesting, but I'd rather have a tool that exposes a data API so that it can be plugged into vim/emacs
- deleted 11y ago[deleted]
- Arkanosis 11y agoI think you're looking for rtags: https://github.com/Andersbakken/rtags https://github.com/Andersbakken/rtags
- martincmartin 11y ago+1 for RTags. I recently got it working, and have been enjoying actually navigating through C++ code. Plus, it can do things like show you preprocessor output, show all places where a function is called, show all implementations of a virtual function, complete symbols, show byte offsets of fields, etc.
- jhdevos 11y agoAny idea what the best vim plugin for rtags is? I see there are several...
- jguegant 11y agoYCM is good for vim too: https://github.com/Valloric/YouCompleteMe https://github.com/Valloric/YouCompleteMe It uses Clang for C/C++/Objective-C/Objective-C++ and exposes itself as a server usable from vim, emacs, sublime ...
- pedram_hadjian 11y agoI have been looking for good code navigation in vim and find it weird, that ctags and scope is oftentimes advertised, as it only does index symbol names. If two different c++ classes use the same identifier for a member and you even fully qualify it in a .cpp definition (e.g. A::Temp and B::Temp), ctags/cscope still just picks the earliest occurrence of Temp. Using the clang parser is the obvious thing to do (Qt Creator now has a plugin like this). The real downside to the linux command line tools I found (clic, rtags) is, that you need to provide compiler invokations for all .cpp files to the tools. With cmake, this is easy (call it with -DCMAKE_EXPORT_COMPILE_COMMANDS=ON), but with plain make files, this is pain (specially, if you don't want to setup the whole dependencies): if it doesn't compile, you can't parse. I would love to see a "parse what is possible", because I'd like to learn from source by running "apt-get source ..." and navigating through parts, that I am interested in without trying to compile everything. Best example for source, I don't want to compile is the Android source code (AOSP). Am I missing something?
- ryanprichard 11y agoSourceWeb needs a list of C++ invocations (compile_commands.json), but it ignores compiler errors, so I'm not sure how precise the invocations need to be. If all the C++ source files in a directory were naively listed, the index might still be useful. I've never actually done that, though -- I normally use the sw-btrace tool to build the JSON file. The indexer comes up with a globally-unique name for each "symbol" it indexes. This turned out to be a hard problem for things like templates and macros. The indexer names static functions by prepending a filename, e.g. "bio_ssl.c/ssl_write". For local variables, it also appends a file offset. With templates/macros, it can determine that a single identifier corresponds to arbitrarily many different symbols, and when you right-click that identifier in the GUI, it attempts to show them all in a popup menu, which fills the entire screen.
- nitrogen 11y agoI seem to recall cscope being much more powerful when run directly outside of vim, but it's been a very long time since I've tried it.
- vmorgulis 11y ago
- i336_ 11y agoIMO, this is less interesting than the tiny little homemade screencast app powering the part at the top of the page. Its FPS is so fast I knew there was some magic going on behind the scenes, so I poked it. Turns out there are a bunch of JSON arrays that cross-references x,y coordinates with PNG files, and a tiny player to "render" these in realtime. The tidbits are right there in the element inspector.
- vmorgulis 11y agoGood point! The screencasting tool from the same author: https://github.com/rprichard/x11-canvas-screencast https://github.com/rprichard/x11-canvas-screencast
- dang 5y agoThis project was subsequently renamed to CxxCodeBrowser (https://github.com/rprichard/CxxCodeBrowser https://github.com/rprichard/CxxCodeBrowser) and is not associated with SourceWeb International AG.