stack-graphs VS lsif-clang

Compare stack-graphs vs lsif-clang and see what are their differences.

stack-graphs

Rust implementation of stack graphs (by github)

lsif-clang

Language Server Indexing Format (LSIF) generator for C, C++ and Objective C (by sourcegraph)
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
stack-graphs lsif-clang
6 4
687 33
0.9% -
9.6 0.0
10 days ago about 1 year ago
Rust C++
Apache License 2.0 -
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

stack-graphs

Posts with mentions or reviews of stack-graphs. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-04-10.
  • Code Search Is Hard
    13 projects | news.ycombinator.com | 10 Apr 2024
    https://github.com/pyjarrett/septum

    The hardest part about getting code search right imo is grabbing the right amount of surrounding context, which septum is aimed at solving on a per-file basis.

    Another one I'm surprised hasn't been mentioned is stack-graphs (https://github.com/github/stack-graphs), which tries to incrementally resolve symbolic relationships across the whole codebase. It powers github's cross-file precise indexing and conceptually makes a lot of sense, though I've struggled to get the open source version to work

  • Even the Pylint codebase uses Ruff
    8 projects | news.ycombinator.com | 5 Mar 2023
    [2]: https://github.com/github/stack-graphs
  • The technology behind GitHub’s new code search
    17 projects | news.ycombinator.com | 6 Feb 2023
    > It doesn't have the faintest idea where the name is defined, or if there's even a difference between a function name, a parameter name, or a word in a comment.

    I don't think what you are saying is actually true for stack-graphs[0][1].

    [0]: https://github.com/github/stack-graphs

    [1]: https://github.blog/2021-12-09-introducing-stack-graphs/

  • Should I be worried or not worried about Tree-sitter now that the Atom editor has been killed?
    3 projects | /r/neovim | 13 Jun 2022
    I think GitHub still has some use for tree-sitter. In this post it's mentioned that their new code navigation system is based on tree-sitter. In a more recent post they welcome contributers to add special code navigation queries to existing languages. You can find their public repository here if you want to follow along with any developments. Since their code navigation system relies heavily on tree-sitter I don't think it's going anywhere soon (fingers crossed).
  • What happened with GitHub's semantic project?
    3 projects | /r/haskell | 29 Jan 2022
    Which they implement in Rust. https://github.com/github/stack-graphs
  • Stack Graphs
    6 projects | news.ycombinator.com | 9 Dec 2021
    As mentioned elsewhere on this thread, stack graphs and Semantic were built by the same team (which I manage). Semantic is not abandoned, we've just been focusing on a different layer of our tech stack for the past year or so. https://news.ycombinator.com/item?id=29501389

    That PR on the Semantic repo was our first attempt at implementing these ideas. We decided to reimplement it in a separate library (also open source, https://github.com/github/stack-graphs), which only builds on tree-sitter directly so that there's an easier story for us and language communities to add support for new languages. It's a fair point that we could have closed the Semantic PR to indicate that more clearly.

lsif-clang

Posts with mentions or reviews of lsif-clang. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-02-06.
  • The technology behind GitHub’s new code search
    17 projects | news.ycombinator.com | 6 Feb 2023
    In the top right corner of the tooltip it will say either "Search-based" or "Precise" - in this case, you're right, we don't have the abseil-cpp repo indexed so it falls back to search-based as you describe.

    We do have a C++ code indexer in beta, https://github.com/sourcegraph/lsif-clang - it is based on clang but C++ indexing is notably harder to do automatically/without-setup due to the varying build systems that need to be understood in order to invoke the compiler.

  • GitHub Code Search (Preview)
    4 projects | news.ycombinator.com | 3 Jul 2022
    Interesting because on https://lsif.dev/ I see that LSIF support for C++, which basically is just a wrapper around clangd AFAIU, is deprecated. Is there something else that replaced it?
  • SCIP - a better code indexing format than LSIF
    1 project | /r/programming | 8 Jun 2022
    We already have an LSIF indexer for C++ (lsif-clang); however, that is not as feature complete as the other indexers. Moreover, the codebase is forked off of Clang 10, so upgrading to newer Clang versions (and build a SCIP indexer on top of that) will be a challenge.
  • Google Is 2B Lines of Code–and It's All in One Place
    3 projects | news.ycombinator.com | 6 May 2022
    - Go:

    Why are not all repos covered?

    Because different languages have different build systems, so inferring the right build commands, dependencies etc. is not so straightforward; these are necessary per-requisites for compiler-accurate cross references. We're working on fixing this with auto-indexing: https://docs.sourcegraph.com/code_intelligence/explanations/...

    For C and C++ specifically, auto-indexing is challenging because of the large variety in build systems, informal specification of dependencies (such as in a README instead of a machine-readable format), and platform-specific code.

    Outside of auto-indexing, we do have an indexer for C and C++ right now (https://github.com/sourcegraph/lsif-clang) which can be run in CI; that way one can generate an index and upload it to Sourcegraph on a regular basis. It is 'Partially available' (https://docs.sourcegraph.com/code_intelligence/references/in...) right now. We're keenly aware of the interest in C++, and are working our way through different languages based on usage.

What are some alternatives?

When comparing stack-graphs and lsif-clang you can also consider the following projects:

semantic-source - Parsing, analyzing, and comparing source code across many languages

cppinsights - C++ Insights - See your source code with the eyes of a compiler

kickstart.nvim - A launch point for your personal nvim configuration

codechecker - CodeChecker is an analyzer tooling, defect database and viewer extension for the Clang Static Analyzer and Clang Tidy

nvim-lspconfig - Quickstart configs for Nvim LSP

scip - SCIP Code Intelligence Protocol

scip-zig - SCIP indexer for Zig!

color_coded - A vim plugin for libclang-based highlighting of C, C++, ObjC

pagefind - Static low-bandwidth search at scale

LLVM-Guide - LLVM (Low Level Virtual Machine) Guide. Learn all about the compiler infrastructure, which is designed for compile-time, link-time, run-time, and "idle-time" optimization of programs. Originally implemented for C/C++ , though, has a variety of front-ends, including Java, Python, etc.

nvim-ts-context-commentstring - Neovim treesitter plugin for setting the commentstring based on the cursor location in a file.

advanced