Documentation ¶
Overview ¶
Package config defines configuration settings for extracting compilation records from a repository using a non-bazel build system.
Index ¶
Constants ¶
const ( // DefaultRepoVolume The default volume name containing the repo. DefaultRepoVolume = "/repo" // DefaultOutputVolume The default volume name containing the extraction output. DefaultOutputVolume = "/out" )
Variables ¶
This section is empty.
Functions ¶
func ExtractRepo ¶
ExtractRepo extracts a given code repository and outputs kindex files.
It makes a local clone of the repository. It optionally uses a passed extraction config, otherwise it attempts to find a Kythe config named ".kythe-extraction-config".
It builds a one-off customized Docker image for extraction, and then runs it, generating kindex files (format defined here: http://kythe.io/docs/kythe-index-pack.html).
This function requires both Git and Docker to be in $PATH during execution.
Types ¶
type Extractor ¶
Extractor is the interface for handling kindex generation on repos.
ExtractRepo takes an input repo, output path to a directory, and optional kythe.proto.ExtractionConfiguration file path, and performs kythe extraction on the repo, depositing results in the output directory path.
type Repo ¶
type Repo struct { // Either GitRepo or LocalRepo should be set, not both. // A remote git repo, e.g. https://github.com/kythe/kythe. Git string // A local copy of a repository. Local string // Where to write from an extraction. OutputPath string // An optional path to a file containing a // kythe.proto.ExtractionConfiguration encoded as JSON that details how // to perform extraction. If this is unset, the extractor will first try // to find a config defined in the repo, or finally use a hard coded // default config. ConfigPath string // An optional temporary repo path to copy the input repo to. TempRepoDir string // An optional temporary directory path to write output before copying to // OutputPath. TempOutDir string }
Repo is a container of input/output parameters for doing extraction on remote repositories.
Directories ¶
Path | Synopsis |
---|---|
Package base and its subpackages define default config data for different builders (cmake, gradle, maven).
|
Package base and its subpackages define default config data for different builders (cmake, gradle, maven). |
gradle
Package gradle defines a default kythe.proto.ExtractionConfiguration for Java using Gradle.
|
Package gradle defines a default kythe.proto.ExtractionConfiguration for Java using Gradle. |
mvn
Package mvn defines a default kythe.proto.ExtractionConfiguration for Java using Maven.
|
Package mvn defines a default kythe.proto.ExtractionConfiguration for Java using Maven. |
Binary preprocessor can modify a repo's build configuration file with the necessary bits to run Kythe extraction.
|
Binary preprocessor can modify a repo's build configuration file with the necessary bits to run Kythe extraction. |
modifier
Package modifier provides a library for adding a forked javac executable into a build.gradle file or pom.xml file.
|
Package modifier provides a library for adding a forked javac executable into a build.gradle file or pom.xml file. |
Binary runextractor provides a tool to wrap a repo's compilation with Kythe's custom extractor logic.
|
Binary runextractor provides a tool to wrap a repo's compilation with Kythe's custom extractor logic. |
backup
Package backup is a simple library for backing up a config file and restoring it using a temporary file.
|
Package backup is a simple library for backing up a config file and restoring it using a temporary file. |
cmakecmd
Package cmakecmd extracts from a CMake-based repository.
|
Package cmakecmd extracts from a CMake-based repository. |
compdb
Package compdb contains functionality necessary for extracting from a compile_commands.json file.
|
Package compdb contains functionality necessary for extracting from a compile_commands.json file. |
compdbcmd
Package compdbcmd extracts from a compile_commands.json file.
|
Package compdbcmd extracts from a compile_commands.json file. |
gradlecmd
Package gradlecmd extracts a gradle repo.
|
Package gradlecmd extracts a gradle repo. |
mavencmd
Package mavencmd extracts a maven repo.
|
Package mavencmd extracts a maven repo. |
Package smoke is a basic harness for testing the validity of config.ExtractRepo output.
|
Package smoke is a basic harness for testing the validity of config.ExtractRepo output. |