Auto-indexing is the process of periodically generating code graph data for a repository within Sourcegraph itself and adding it to the Sourcegraph instance.
Roughly speaking, auto-indexing has three parts:
For some repositories, depending on the programming language and build system, auto-inference may not be possible. In such situations, one can specify an auto-indexing configuration in the Sourcegraph UI, which is used to run the indexer.
Auto-indexing typically tends to work well with:
See also:
Auto-inference is an optional first step of [auto-indexing], which looks at a repository's contents and determines:
.ts
files, we should probably invoked our TypeScript index)A tool that is used to transform code into a format where it can be executed, usually by carrying out a series of build steps (~almost always organized as a directed acylic graph), each of which invokes a more lower-level tool (such as a compiler).
A build system understands the relations between different files, [modules][#module] and [packages][#package].
In the context of code navigation, for out-of-the-box support, an indexer needs to invoke the build system in the right way. (TODO: Clarify this!)