Hacker News new | ask | show | jobs
by ushakov 1538 days ago
you should also highlight that your solution has a significant downside: you have to generate the definitions yourself in order for them to be displayed in source graph

this means you’d have to setup a CI/CD to rebuild index each time you make changes to the code + host it on your own

what’s great in GitHub’s approach is they take that obligation away from customers

2 comments

I didn't have to do anything and sourcegraph indexed my project: https://sourcegraph.com/github.com/josephmate/OdinCodeBrowse...

Are you taking about a self hosted or private repo? In that case, I am not familiar.

yes, they used "search-based indexing" for your repository

i was talking about LSIF, which enables autocomplete, go to definitions, finding references but at expense of generating your own index

Actually that’s not quite right. We offer auto-indexing now for some languages with more on the way. If neither auto-indexing nor manual LSIF generation are an option, we fall back to our search-based code navigation, which, similar to GitHub’s implementation, trades off accuracy for zero configuration (GitHub’s approach is parser-based while we use a combo of parsing, search, and heuristics that eliminates the need for an index entirely in some cases). This is all documented here for those curious to learn more: https://docs.sourcegraph.com/code_intelligence.