Repository: kythe/kythe
Pull request #5343 (2022-08-09 23:12:28)

chore(go): remove unused config-based extractor setup


Patch:
diff --git a/kythe/go/extractors/config/BUILD b/kythe/go/extractors/config/BUILD
deleted file mode 100644
index a9f011a47..000000000
--- a/kythe/go/extractors/config/BUILD
+++ /dev/null
@@ -1,46 +0,0 @@
-load("//tools:build_rules/shims.bzl", "go_library", "go_test")
-
-package(default_visibility = ["//kythe:default_visibility"])
-
-go_library(
-    name = "config",
-    srcs = [
-        "config_parser.go",
-        "config_selector.go",
-        "extractor.go",
-    ],
-    deps = [
-        "//kythe/go/extractors/config/base",
-        "//kythe/proto:extraction_config_go_proto",
-        "@org_bitbucket_creachadair_shell//:go_default_library",
-        "@org_golang_google_protobuf//encoding/protojson:go_default_library",
-        "@org_golang_google_protobuf//proto:go_default_library",
-    ],
-)
-
-go_test(
-    name = "config_parser_test",
-    srcs = ["config_parser_test.go"],
-    data = ["//kythe/go/extractors/config/base:testdatafiles"],
-    library = ":config",
-    deps = [
-        "//kythe/go/test/testutil",
-        "//kythe/proto:extraction_config_go_proto",
-        "@org_golang_google_protobuf//encoding/protojson:go_default_library",
-        "@org_golang_google_protobuf//proto:go_default_library",
-    ],
-)
-
-go_test(
-    name = "config_selector_test",
-    srcs = ["config_selector_test.go"],
-    data = ["//kythe/go/extractors/config/base:testdatafiles"],
-    library = ":config",
-    deps = [
-        "//kythe/go/extractors/config/base",
-        "//kythe/go/test/testutil",
-        "//kythe/proto:extraction_config_go_proto",
-        "@org_golang_google_protobuf//encoding/protojson:go_default_library",
-        "@org_golang_google_protobuf//proto:go_default_library",
-    ],
-)
diff --git a/kythe/go/extractors/config/base/BUILD b/kythe/go/extractors/config/base/BUILD
deleted file mode 100644
index cd30a9943..000000000
--- a/kythe/go/extractors/config/base/BUILD
+++ /dev/null
@@ -1,31 +0,0 @@
-load("//tools:build_rules/shims.bzl", "go_library", "go_test")
-
-package(default_visibility = ["//kythe:default_visibility"])
-
-filegroup(
-    name = "testdatafiles",
-    srcs = glob(["testdata/**"]),
-)
-
-go_library(
-    name = "base",
-    srcs = [
-        "base.go",
-    ],
-    deps = [
-        "//kythe/go/extractors/config/base/gradle",
-        "//kythe/go/extractors/config/base/mvn",
-    ],
-)
-
-go_test(
-    name = "base_test",
-    srcs = ["base_test.go"],
-    data = glob(["testdata/**"]),
-    library = ":base",
-    deps = [
-        "//kythe/go/extractors/config/base/gradle",
-        "//kythe/go/extractors/config/base/mvn",
-        "//kythe/go/test/testutil",
-    ],
-)
diff --git a/kythe/go/extractors/config/base/base.go b/kythe/go/extractors/config/base/base.go
deleted file mode 100644
index fb1c95cdd..000000000
--- a/kythe/go/extractors/config/base/base.go
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright 2018 The Kythe Authors. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// Package base and its subpackages define default config data for different
-// builders (cmake, gradle, maven).
-package base // import "kythe.io/kythe/go/extractors/config/base"
-
-import (
-	"log"
-	"os"
-	"path/filepath"
-
-	"kythe.io/kythe/go/extractors/config/base/gradle"
-	"kythe.io/kythe/go/extractors/config/base/mvn"
-)
-
-// DefaultConfig tries to find a valid base builder that works for a given repo
-// and returns a json-encoded kythe.proto.ExtractionConfiguration that will work
-// for simple repos using thatbuilder.
-func DefaultConfig(repoDir string) (string, bool) {
-	// TODO(#3060): There might be more than one match, in which case we need to
-	// know what to do to combine separate extractors' output.
-	for _, b := range supportedBuilders() {
-		if b.validFor(repoDir) {
-			return b.DefaultConfig, true
-		}
-	}
-	return "", false
-}
-
-type builder struct {
-	Name string
-	// BuildFile is the name pattern of the default build file that this builder
-	// uses.  For eaxmple 'BUILD' for bazel, or 'pom.xml' for maven.
-	BuildFile string
-	// DefaultConfig returns a reader that yields a valid
-	// kythe.proto.ExtractionConfiguration which is fine-tuned to work for a
-	// simple repo of the given builder.
-	DefaultConfig string
-}
-
-// validFor returns whether or not a builder is potentially valid for a given
-// repo.
-func (b builder) validFor(repoDir string) bool {
-	// TODO(danielmoy): This logic probably needs to hunt for config
-	// files that are not in the top-level directory.
-	buildPath := filepath.Join(repoDir, b.BuildFile)
-	f, err := os.Open(buildPath)
-	if os.IsNotExist(err) {
-		return false
-	} else if err != nil {
-		log.Printf("Failed to open build file %s", buildPath)
-		return false
-	}
-	// TODO(danielmoy): In the event that we need to inspect the build file
-	// itself to modify the default config in some way (pull in dependencies,
-	// etc), then this cannot simply be closed without looking at it.  But for
-	// now, we just always use default config.
-	defer f.Close()
-	return true
-}
-
-// supportedBuilders returns all of the supported builders for Kythe extraction.
-func supportedBuilders() []builder {
-	return []builder{
-		builder{
-			Name:          "gradle",
-			BuildFile:     "build.gradle",
-			DefaultConfig: gradle.DefaultConfig,
-		},
-		builder{
-			Name:          "maven",
-			BuildFile:     "pom.xml",
-			DefaultConfig: mvn.DefaultConfig,
-		},
-	}
-}
diff --git a/kythe/go/extractors/config/base/gradle/BUILD b/kythe/go/extractors/config/base/gradle/BUILD
deleted file mode 100644
index a94dd6760..000000000
--- a/kythe/go/extractors/config/base/gradle/BUILD
+++ /dev/null
@@ -1,10 +0,0 @@
-load("//tools:build_rules/shims.bzl", "go_library")
-
-package(default_visibility = ["//kythe:default_visibility"])
-
-go_library(
-    name = "gradle",
-    srcs = [
-        "gradle.go",
-    ],
-)
diff --git a/kythe/go/extractors/config/base/gradle/gradle.go b/kythe/go/extractors/config/base/gradle/gradle.go
deleted file mode 100644
index 4db24866c..000000000
--- a/kythe/go/extractors/config/base/gradle/gradle.go
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Copyright 2018 The Kythe Authors. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// Package gradle defines a default kythe.proto.ExtractionConfiguration for Java
-// using Gradle.
-package gradle // import "kythe.io/kythe/go/extractors/config/base/gradle"
-
-// DefaultConfig describes a kythe.proto.ExtractionConfiguration object for a
-// basic Gradle repository, including the extractor entrypoint using a
-// build.gradle file located at the top level of the repo.
-const DefaultConfig = `{
-  "required_image": [
-    {
-      "uri": "openjdk:8",
-      "name": "java",
-      "copy_spec": [
-        {
-          "source": "/docker-java-home"
-        },
-        {
-          "source": "/etc/java-8-openjdk"
-        }
-      ],
-      "env_var": [
-        {
-          "name": "JAVA_HOME",
-          "value": "/docker-java-home"
-        },
-        {
-          "name": "PATH",
-          "value": "$JAVA_HOME/bin:$PATH"
-        }
-      ]
-    },
-    {
-      "uri": "gcr.io/kythe-public/kythe-javac-extractor-artifacts",
-      "name": "javac-extractor-artifacts",
-      "copy_spec": [
-        {
-          "source": "/opt/kythe/extractors/runextractor"
-        },
-        {
-          "source": "/opt/kythe/extractors/javac-wrapper.sh"
-        },
-        {
-          "source": "/opt/kythe/extractors/javac_extractor.jar"
-        }
-      ],
-      "env_var": [
-        {
-          "name": "KYTHE_CORPUS",
-          "value": "testcorpus"
-        },
-        {
-          "name": "REAL_JAVAC",
-          "value": "$JAVA_HOME/bin/javac"
-        },
-        {
-          "name": "JAVAC_EXTRACTOR_JAR",
-          "value": "/opt/kythe/extractors/javac_extractor.jar"
-        },
-        {
-          "name": "KYTHE_OUTPUT_FILE",
-          "value": "$KYTHE_OUTPUT_DIRECTORY/extractor-output.kzip"
-        }
-      ]
-    },
-    {
-      "uri": "gradle:latest",
-      "name": "gradle",
-      "copy_spec": [
-        {
-          "source": "/usr/share/gradle"
-        },
-        {
-          "source": "/etc/ssl"
-        }
-      ],
-      "env_var": [
-        {
-          "name": "GRADLE_HOME",
-          "value": "/usr/share/gradle"
-        },
-        {
-          "name": "PATH",
-          "value": "$GRADLE_HOME/bin:$PATH"
-        }
-      ]
-    }
-  ],
-  "entry_point": ["/opt/kythe/extractors/runextractor", "gradle", "-build_file", "build.gradle", "-javac_wrapper", "/opt/kythe/extractors/javac-wrapper.sh"]
-}`
diff --git a/kythe/go/extractors/config/base/mvn/BUILD b/kythe/go/extractors/config/base/mvn/BUILD
deleted file mode 100644
index 8767c626c..000000000
--- a/kythe/go/extractors/config/base/mvn/BUILD
+++ /dev/null
@@ -1,10 +0,0 @@
-load("//tools:build_rules/shims.bzl", "go_library")
-
-package(default_visibility = ["//kythe:default_visibility"])
-
-go_library(
-    name = "mvn",
-    srcs = [
-        "mvn.go",
-    ],
-)
diff --git a/kythe/go/extractors/config/base/mvn/mvn.go b/kythe/go/extractors/config/base/mvn/mvn.go
deleted file mode 100644
index d98f1913c..000000000
--- a/kythe/go/extractors/config/base/mvn/mvn.go
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Copyright 2018 The Kythe Authors. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// Package mvn defines a default kythe.proto.ExtractionConfiguration for Java
-// using Maven.
-package mvn // import "kythe.io/kythe/go/extractors/config/base/mvn"
-
-// DefaultConfig describes a kythe.proto.ExtractionConfiguration object for a
-// basic Maven repository, including the extractor entrypoint using a pom.xml
-// file located at the top level of the repo.
-const DefaultConfig = `{
-  "required_image": [
-    {
-      "uri": "openjdk:8",
-      "name": "java",
-      "copy_spec": [
-        {
-          "source": "/docker-java-home"
-        },
-        {
-          "source": "/etc/java-8-openjdk"
-        }
-      ],
-      "env_var": [
-        {
-          "name": "JAVA_HOME",
-          "value": "/docker-java-home"
-        },
-        {
-          "name": "PATH",
-          "value": "$JAVA_HOME/bin:$PATH"
-        }
-      ]
-    },
-    {
-      "uri": "gcr.io/kythe-public/kythe-javac-extractor-artifacts",
-      "name": "javac-extractor-artifacts",
-      "copy_spec": [
-        {
-          "source": "/opt/kythe/extractors/runextractor"
-        },
-        {
-          "source": "/opt/kythe/extractors/javac-wrapper.sh"
-        },
-        {
-          "source": "/opt/kythe/extractors/javac_extractor.jar"
-        },
-        {
-          "source": "/opt/kythe/extractors/javac9_tools.jar"
-        }
-      ],
-      "env_var": [
-        {
-          "name": "KYTHE_CORPUS",
-          "value": "testcorpus"
-        },
-        {
-          "name": "REAL_JAVAC",
-          "value": "$JAVA_HOME/bin/javac"
-        },
-        {
-          "name": "JAVAC_EXTRACTOR_JAR",
-          "value": "/opt/kythe/extractors/javac_extractor.jar"
-        },
-        {
-          "name": "KYTHE_OUTPUT_FILE",
-          "value": "$KYTHE_OUTPUT_DIRECTORY/extractor-output.kzip"
-        },
-        {
-          "name": "KYTHE_JAVA_RUNTIME_OPTIONS",
-          "value": "-Xbootclasspath/p:/opt/kythe/extractors/javac9_tools.jar"
-        }
-      ]
-    },
-    {
-      "uri": "maven:latest",
-      "name": "maven",
-      "copy_spec": [
-        {
-          "source": "/usr/share/maven"
-        },
-        {
-          "source": "/etc/ssl"
-        }
-      ],
-      "env_var": [
-        {
-          "name": "MAVEN_HOME",
-          "value": "/usr/share/maven"
-        },
-        {
-          "name": "PATH",
-          "value": "$MAVEN_HOME/bin:$PATH"
-        }
-      ]
-    }
-  ],
-  "entry_point": ["/opt/kythe/extractors/runextractor", "maven", "-pom_xml", "pom.xml", "-javac_wrapper", "/opt/kythe/extractors/javac-wrapper.sh"]
-}`
diff --git a/kythe/go/extractors/config/config_parser.go b/kythe/go/extractors/config/config_parser.go
deleted file mode 100644
index f3fe00c11..000000000
--- a/kythe/go/extractors/config/config_parser.go
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- * Copyright 2018 The Kythe Authors. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// Package config defines configuration settings for extracting compilation records from
-// a repository using a non-bazel build system.
-package config // import "kythe.io/kythe/go/extractors/config"
-
-import (
-	"bytes"
-	"fmt"
-	"io/ioutil"
-
-	"bitbucket.org/creachadair/shell"
-
-	ecpb "kythe.io/kythe/proto/extraction_config_go_proto"
-)
-
-const (
-	// DefaultRepoVolume The default volume name containing the repo.
-	DefaultRepoVolume = "/repo"
-
-	// DefaultOutputVolume The default volume name containing the extraction output.
-	DefaultOutputVolume = "/out"
-
-	// defaultBaseImage The default base image for extraction.
-	defaultBaseImage = "debian:jessie"
-
-	// outputVolumeEnv The EnvVar which will be configured pointing to the output.
-	outputVolumeEnv = "KYTHE_OUTPUT_DIRECTORY"
-
-	// repoVolumeEnv The EnvVar which will be configured pointing to the repo.
-	repoVolumeEnv = "KYTHE_ROOT_DIRECTORY"
-)
-
-// imageSettings allows for optionally controlling a known input repo and
-// output dir.  Leaving these unset just defaults to /repo and /out for use in
-// an ephemeral Docker container.
-type imageSettings struct {
-	RepoDir   string
-	OutputDir string
-}
-
-// newImage consumes the configuration data specified in
-// extractionConfig utilizing it to generate a composite extraction Docker
-// image tailored for the requirements necessary for successful extraction of
-// the configuration's corresponding repository. Returns the contents of the
-// Dockerfile for the generated composite image. The Dockerfile format is
-// defined here: https://docs.docker.com/engine/reference/builder/
-func newImage(config *ecpb.ExtractionConfiguration, settings imageSettings) ([]byte, error) {
-	if settings.RepoDir == "" {
-		settings.RepoDir = DefaultRepoVolume
-	}
-	if settings.OutputDir == "" {
-		settings.OutputDir = DefaultOutputVolume
-	}
-	var buf bytes.Buffer
-
-	// Format the FROM statements for the required images.
-	for _, image := range config.RequiredImage {
-		fmt.Fprintf(&buf, "FROM %s as %s\n", image.Uri, image.Name)
-	}
-
-	// Format the base configuration including the base image, volume hooks, and
-	// working dir.
-	fmt.Fprintf(&buf, `
-FROM %[1]s
-VOLUME %[2]s
-ENV %[3]s=%[2]s
-VOLUME %[4]s
-ENV %[5]s=%[4]s
-WORKDIR %[2]s
-`, defaultBaseImage, settings.RepoDir, repoVolumeEnv, settings.OutputDir, outputVolumeEnv)
-
-	// Format the COPY statements for the required images, (these must come after
-	// the last FROM statement due to the way docker's multi-stage builds work).
-	for _, image := range config.RequiredImage {
-		for _, artifact := range image.CopySpec {
-			if artifact.Source == "" {
-				return nil, fmt.Errorf("missing image copy artifact source for required image: %s", image.Uri)
-			}
-
-			// attempt to retrieve the dest defaulting to the source path
-			dest := artifact.Source
-			if artifact.Destination != "" {
-				dest = artifact.Destination
-			}
-
-			fmt.Fprintf(&buf, "COPY --from=%s %s %s\n", image.Name, artifact.Source, dest)
-		}
-
-		// process required environment variables for the image
-		for _, env := range image.EnvVar {
-			if env.Name == "" {
-				return nil, fmt.Errorf("missing Image.EnvVar.Name")
-			}
-
-			if env.Value == "" {
-				return nil, fmt.Errorf("missing Image.EnvVar.Value")
-			}
-
-			fmt.Fprintf(&buf, "ENV %s=%s\n", env.Name, env.Value)
-		}
-	}
-
-	// iterate over the required RUN commands for the configuration
-	for _, cmd := range config.RunCommand {
-		fmt.Fprintf(&buf, "RUN %s ", cmd.Command)
-		for i, arg := range cmd.Arg {
-			fmt.Fprintf(&buf, "%s", shell.Quote(arg))
-			if i < len(cmd.Arg)-1 {
-				fmt.Fprintf(&buf, " ")
-			}
-		}
-		fmt.Fprintln(&buf)
-	}
-
-	// process the required entry point for the configuration
-	if len(config.EntryPoint) > 0 {
-		fmt.Fprintf(&buf, "ENTRYPOINT [")
-		for i, entryPointComponent := range config.EntryPoint {
-			fmt.Fprintf(&buf, "\"%s\"", entryPointComponent)
-			if i < len(config.EntryPoint)-1 {
-				fmt.Fprintf(&buf, ", ")
-			}
-		}
-		fmt.Fprintf(&buf, "]\n")
-	}
-
-	return buf.Bytes(), nil
-}
-
-// createImage uses the specified extraction configuration to generate a
-// new extraction image, which is written to the specified output path.
-func createImage(config *ecpb.ExtractionConfiguration, settings imageSettings, outputPath string) error {
-	// attempt to generate a docker image from the specified config
-	image, err := newImage(config, settings)
-	if err != nil {
-		return fmt.Errorf("generating extraction image: %v", err)
-	}
-
-	// write the generated extraction image to the specified output file
-	if err = ioutil.WriteFile(outputPath, image, 0444); err != nil {
-		return fmt.Errorf("writing output: %v", err)
-	}
-
-	return nil
-}
diff --git a/kythe/go/extractors/config/config_selector.go b/kythe/go/extractors/config/config_selector.go
deleted file mode 100644
index e9b1cb0c4..000000000
--- a/kythe/go/extractors/config/config_selector.go
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright 2018 The Kythe Authors. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package config
-
-// This subpart of package config handles getting a
-// kythe.proto.ExtractionConfiguration either from a file or the default config.
-
-import (
-	"fmt"
-	"io"
-	"io/ioutil"
-	"os"
-	"path/filepath"
-	"strings"
-
-	"kythe.io/kythe/go/extractors/config/base"
-
-	"google.golang.org/protobuf/encoding/protojson"
-
-	ecpb "kythe.io/kythe/proto/extraction_config_go_proto"
-)
-
-func findConfig(configPath, repoDir string) (*ecpb.ExtractionConfiguration, error) {
-	// if a config was passed in, use the specified config, otherwise go
-	// hunt for one in the repository.
-	if configPath == "" {
-		// otherwise, use a Kythe config within the repo (if it exists)
-		configPath = filepath.Join(repoDir, kytheExtractionConfigFile)
-	}
-
-	f, err := os.Open(configPath)
-	if os.IsNotExist(err) {
-		if defaultConfig, ok := base.DefaultConfig(repoDir); ok {
-			return load(strings.NewReader(defaultConfig))
-		}
-		return nil, fmt.Errorf("failed to find a supported builder for repo %s", repoDir)
-	} else if err != nil {
-		return nil, fmt.Errorf("opening config file: %v", err)
-	}
-
-	defer f.Close()
-	return load(f)
-}
-
-// load parses an extraction configuration from the specified reader.
-func load(r io.Reader) (*ecpb.ExtractionConfiguration, error) {
-	rec, err := ioutil.ReadAll(r)
-	if err != nil {
-		return nil, err
-	}
-	// attempt to deserialize the extraction config
-	extractionConfig := &ecpb.ExtractionConfiguration{}
-	if err := protojson.Unmarshal(rec, extractionConfig); err != nil {
-		return nil, err
-	}
-
-	return extractionConfig, nil
-}
diff --git a/kythe/go/extractors/config/extractor.go b/kythe/go/extractors/config/extractor.go
deleted file mode 100644
index 5e59defce..000000000
--- a/kythe/go/extractors/config/extractor.go
+++ /dev/null
@@ -1,329 +0,0 @@
-/*
- * Copyright 2018 The Kythe Authors. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package config
-
-import (
-	"bufio"
-	"context"
-	"fmt"
-	"io"
-	"io/ioutil"
-	"log"
-	"os"
-	"os/exec"
-	"path/filepath"
-	"strings"
-)
-
-// kytheConfigFileName The name of the Kythe extraction config
-const kytheExtractionConfigFile = ".kythe-extraction-config"
-
-// Repo is a container of input/output parameters for doing extraction on remote
-// repositories.
-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
-
-	// TODO(#156): these two should be remoevd when docker-in-docker is
-	// removed.  Currently necessary for docker-in-docker because regular volume
-	// mapping uses the outermost context instead of correctly pushing the
-	// first layer docker container's empeheral volume into the innermost
-	// layer.
-	//
-	// When running inside a docker container, these should be set to match
-	// their corresponding volumes.
-	// When not running inside a docker cotnainer, these can be left unset,
-	// in which case an ephemeral temp directory is used for TempRepoDir, and
-	// output is written directly into OutputPath from runextractor.go.
-
-	// 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
-}
-
-func (r Repo) gitClone(ctx context.Context, tmpDir string) error {
-	return GitClone(ctx, r.Git, tmpDir)
-}
-
-// GitClone is a convenience wrapper around a commandline git clone call.
-func GitClone(ctx context.Context, repo, outputPath string) error {
-	// TODO(#154): strongly consider go-git instead of os.exec
-	return exec.CommandContext(ctx, "git", "clone", repo, outputPath).Run()
-}
-
-func (r Repo) localClone(ctx context.Context, tmpDir string) error {
-	gitDir := filepath.Join(r.Local, ".git")
-	// TODO(danielmoy): consider extracting all or part of this
-	// to a more common place.
-	err := copyDir(copyArgs{
-		out:     tmpDir,
-		in:      r.Local,
-		skipDir: gitDir,
-	})
-	if err != nil {
-		return fmt.Errorf("copying repo: %v", err)
-	}
-	return nil
-}
-
-type copyArgs struct {
-	out     string
-	in      string
-	skipDir string
-}
-
-// copyDir copies files from in to out. If skipDir is not empty, it skips any
-// directories matching that prefix.
-func copyDir(args copyArgs) error {
-	return filepath.Walk(args.in, func(path string, info os.FileInfo, err error) error {
-		if err != nil {
-			return err
-		}
-		if args.in == path {
-			// Intentionally do nothing for base dir.
-			return nil
-		}
-		if args.skipDir != "" && strings.HasPrefix(path, args.skipDir) {
-			return filepath.SkipDir
-		}
-		rel, err := filepath.Rel(args.in, path)
-		if err != nil {
-			return err
-		}
-		outPath := filepath.Join(args.out, rel)
-		if info.Mode().IsRegular() {
-			if err := os.MkdirAll(filepath.Dir(outPath), 0755); err != nil {
-				return fmt.Errorf("failed to make dir: %v", err)
-			}
-			inf, err := os.Open(path)
-			if err != nil {
-				return fmt.Errorf("failed to open input file: %v", err)
-			}
-			defer inf.Close()
-			of, err := os.Create(outPath)
-			if err != nil {
-				return fmt.Errorf("failed to open output file for copy: %v", err)
-			}
-			if _, err := io.Copy(of, inf); err != nil {
-				of.Close()
-				return fmt.Errorf("failed to copy repo file: %v", err)
-			}
-			return of.Close()
-		} else if !info.IsDir() {
-			// Notably in here are any links or other odd things.
-			log.Printf("Unsupported file %s with mode %s\n", path, info.Mode())
-		}
-		return nil
-	})
-}
-
-// 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 Extractor func(ctx context.Context, repo Repo) error
-
-// Clone takes either the Git or Local repo and makes a copy of it.
-func (r Repo) Clone(ctx context.Context, tmpDir string) error {
-	if r.Git != "" {
-		return r.gitClone(ctx, tmpDir)
-	}
-	return r.localClone(ctx, tmpDir)
-}
-
-// 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.
-func ExtractRepo(ctx context.Context, repo Repo) error {
-	if (repo.Git != "" && repo.Local != "") || (repo.Git == "" && repo.Local == "") {
-		return fmt.Errorf("ExtractRepo requries either Git or Local repo, but not both")
-	}
-	if err := verifyRequiredTools(repo); err != nil {
-		return fmt.Errorf("ExtractRepo requires git and docker to be in $PATH: %v", err)
-	}
-
-	repoDir := repo.TempRepoDir
-	if repoDir == "" {
-		// create a temporary directory for the repo clone
-		var err error
-		repoDir, err = ioutil.TempDir("", "repoDir")
-		if err != nil {
-			return fmt.Errorf("creating tmp repo dir: %v", err)
-		}
-		// TODO(#156): intentionally not cleaning up repo dir when passed
-		// in might be a mistake.  Long term this doesn't matter after
-		// refactor, but would be good to confirm no disk leak here.
-		// Because it should be inside container I think this doesn't
-		// matter.
-		defer os.RemoveAll(repoDir)
-	}
-
-	// create a temporary directory for the extraction output
-	tmpOutDir, err := ioutil.TempDir("", "tmpOutDir")
-	if err != nil {
-		return fmt.Errorf("creating tmp out dir: %v", err)
-	}
-	defer os.RemoveAll(tmpOutDir)
-
-	// copy the repo into our temp directory, so we can mutate its
-	// build config without affecting the original source.
-	if err := repo.Clone(ctx, repoDir); err != nil {
-		return fmt.Errorf("copying repo: %v", err)
-	}
-
-	log.Printf("Using configuration file: %q", repo.ConfigPath)
-	extractionDockerFile, err := ioutil.TempFile(tmpOutDir, "extractionDockerFile")
-	if err != nil {
-		return fmt.Errorf("creating tmp Dockerfile: %v", err)
-	}
-
-	// generate an extraction image from the config
-	extractionConfig, err := findConfig(repo.ConfigPath, repoDir)
-	if err != nil {
-		return fmt.Errorf("reading config file: %v", err)
-	}
-
-	outPath := repo.OutputPath
-	if repo.TempOutDir != "" {
-		outPath = repo.TempOutDir
-	}
-	err = createImage(extractionConfig, imageSettings{
-		RepoDir:   repo.TempRepoDir,
-		OutputDir: outPath,
-	}, extractionDockerFile.Name())
-	if err != nil {
-		return fmt.Errorf("creating extraction image: %v", err)
-	}
-
-	// use Docker to build the extraction image
-	imageTag := strings.ToLower(filepath.Base(extractionDockerFile.Name()))
-	output, err := exec.CommandContext(ctx, "docker", "build", "-f", extractionDockerFile.Name(), "-t", imageTag, tmpOutDir).CombinedOutput()
-	defer mustCleanUpImage(ctx, imageTag)
-	if err != nil {
-		return fmt.Errorf("building docker image: %v\nCommand output %s", err, string(output))
-	}
-
-	targetRepoDir := repo.TempRepoDir
-	if targetRepoDir == "" {
-		targetRepoDir = DefaultRepoVolume
-	}
-	// run the extraction
-	commandArgs := []string{"run", "--rm"}
-	// Check and see if we're living inside a docker image.
-	// TODO(#156): This is an undesireable smell from docker-in-docker which
-	// should be removed when we refactor the inner docker away.
-	if id, ok := inDockerImage(ctx); ok {
-		// Because we're inside an inner docker image, if we set
-		// -v /input/repo:/input, it actually takes /input/repo from the
-		// *outermost* docker container, which is not what we want! Instead rely
-		// on --volumes-from to copy in all the correct volumes.
-		// Similar logic holds for output directory mapping.
-		commandArgs = append(commandArgs, "--volumes-from", id)
-	} else {
-		commandArgs = append(commandArgs, "-v", fmt.Sprintf("%s:%s", repo.OutputPath, outPath), "-v", fmt.Sprintf("%s:%s", repoDir, targetRepoDir))
-	}
-	commandArgs = append(commandArgs, "-t", imageTag)
-	output, err = exec.CommandContext(ctx, "docker", commandArgs...).CombinedOutput()
-	if err != nil {
-		return fmt.Errorf("extracting repo: %v\nCommand output: %s", err, string(output))
-	}
-	if repo.TempOutDir != "" {
-		// TODO(#156): after removing docker-in-docker we can ax this copy.
-		err := copyDir(copyArgs{
-			out: repo.OutputPath,
-			in:  repo.TempOutDir,
-		})
-		if err != nil {
-			return fmt.Errorf("copying output: %v", err)
-		}
-	}
-	return nil
-}
-
-func verifyRequiredTools(repo Repo) error {
-	if repo.Git != "" {
-		if _, err := exec.LookPath("git"); err != nil {
-			return err
-		}
-	}
-
-	if _, err := exec.LookPath("docker"); err != nil {
-		return err
-	}
-	return nil
-}
-
-func mustCleanUpImage(ctx context.Context, tmpImageTag string) {
-	cmd := exec.CommandContext(ctx, "docker", "image", "rm", tmpImageTag)
-	err := cmd.Run()
-	if err != nil {
-		log.Printf("Failed to clean up docker image: %v", err)
-	}
-}
-
-func inDockerImage(ctx context.Context) (string, bool) {
-	f, err := os.Open("/proc/self/cgroup")
-	if err != nil {
-		log.Printf("Failed to open /proc/self/cgroup to check for docker: %v", err)
-		return "", false
-	}
-	defer f.Close()
-
-	scanner := bufio.NewScanner(f)
-	for scanner.Scan() {
-		// Example line for this file is:
-		// 10:cpuset:/docker/5e24d567c9846f5209af443612ca2e53f7291afe6cfb31510121f82f1ac93472
-		gr := strings.Split(scanner.Text(), ":")
-		if len(gr) == 3 {
-			res := strings.Split(gr[2], "/")
-			if len(res) == 3 && res[1] == "docker" && len(res[2]) >= 12 {
-				return res[2][0:12], true
-			}
-		}
-	}
-
-	if err := scanner.Err(); err != nil {
-		log.Printf("Failed reading /rpoc/self/cgroup: %v", err)
-	}
-	return "", false
-}
diff --git a/kythe/go/extractors/config/smoke/BUILD b/kythe/go/extractors/config/smoke/BUILD
deleted file mode 100644
index c4bb5aca1..000000000
--- a/kythe/go/extractors/config/smoke/BUILD
+++ /dev/null
@@ -1,26 +0,0 @@
-load("//tools:build_rules/shims.bzl", "go_library", "go_test")
-
-package(default_visibility = ["//kythe:default_visibility"])
-
-go_library(
-    name = "smoke",
-    srcs = [
-        "smoke.go",
-    ],
-    deps = [
-        "//kythe/go/extractors/config",
-        "//kythe/go/platform/kindex",
-        "@org_bitbucket_creachadair_stringset//:go_default_library",
-    ],
-)
-
-go_test(
-    name = "smoke_test",
-    srcs = ["smoke_test.go"],
-    library = ":smoke",
-    deps = [
-        "//kythe/go/platform/kindex",
-        "//kythe/proto:analysis_go_proto",
-        "//kythe/proto:storage_go_proto",
-    ],
-)
diff --git a/kythe/go/extractors/config/smoke/smoke.go b/kythe/go/extractors/config/smoke/smoke.go
deleted file mode 100644
index edb580b2a..000000000
--- a/kythe/go/extractors/config/smoke/smoke.go
+++ /dev/null
@@ -1,235 +0,0 @@
-/*
- * Copyright 2018 The Kythe Authors. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// Package smoke is a basic harness for testing the validity of
-// config.ExtractRepo output.
-package smoke // import "kythe.io/kythe/go/extractors/config/smoke"
-
-import (
-	"context"
-	"fmt"
-	"io/ioutil"
-	"log"
-	"os"
-	"path/filepath"
-	"strings"
-
-	"kythe.io/kythe/go/extractors/config"
-	"kythe.io/kythe/go/platform/kindex"
-
-	"bitbucket.org/creachadair/stringset"
-)
-
-// Tester checks the validity of config.ExtractRepo.
-//
-// It does this in a generic way by simply trying to determine expected output
-// automatically. The current implementation is to simply check the fraction of
-// files covered by extractor output.
-//
-// Also optionally supports indexing the extractors output.
-type Tester func(ctx context.Context, repo string) (Result, error)
-
-// Fetcher is fetches a given repo and writes it to an output directory.
-type Fetcher func(ctx context.Context, repo, outputPath string) error
-
-// GitFetch fetches repos using git commandline.
-func GitFetch(ctx context.Context, repo, outputPath string) error {
-	return config.GitClone(ctx, repo, outputPath)
-}
-
-// Indexer takes .kindex files in a given inputDir, indexes them, and deposits
-// in outputDir.
-//
-// TODO(danielmoy): kzip?  This is generally a thing that needs supporting in
-// smoke.go and related files now that I think about it.
-type Indexer func(ctx context.Context, inputDir, outputDir string) error
-
-// EmptyIndexer does nothing - it is a placeholder.
-func EmptyIndexer(ctx context.Context, inputDir, outputDir string) error {
-	return nil
-}
-
-// A Harness contains all the settings necessary to test a repository.
-// All fields are optional and use defaults as specified.  Note that a default
-// ConfigPath tries to use per-repository configuration files.
-type Harness struct {
-	Fetcher    Fetcher          // defaults to GitFetch
-	Extractor  config.Extractor // defaults to config.ExtractRepo
-	Indexer    Indexer          // defaults to EmptyIndexer
-	ConfigPath string           // defaults to ""
-}
-
-func (h Harness) fetcher() Fetcher {
-	if h.Fetcher == nil {
-		return GitFetch
-	}
-	return h.Fetcher
-}
-
-func (h Harness) extractor() config.Extractor {
-	if h.Extractor == nil {
-		return config.ExtractRepo
-	}
-	return h.Extractor
-}
-
-// TODO(#53): Implement indexing on smoke test harness.
-func (h Harness) indexer() Indexer {
-	if h.Indexer == nil {
-		return EmptyIndexer
-	}
-	return h.Indexer
-}
-
-// Result is a simple container for the results of a single repo test.  It may
-// contain useful information about whether or not the repo was accessible,
-// extracted at all, or the extent to which we got good file coverage from the
-// extraction.
-//
-// TODO(danielmoy): consider better metrics here. For example consider having
-// the smoke test harness try to run a kythe indexer in addition to an
-// extraction and see how much symbol coverage we have.  This might be out of
-// scope for a simple smoke test harness though.
-type Result struct {
-	// Whether the repo was successfully downloaded, extracted, or indexed.
-	Downloaded, Extracted, Indexed bool
-	// The number of downloaded and extracted files, and the number of
-	// indexed symbols.
-	DownloadCount, ExtractCount, IndexCount int
-	// The percentage of files in the repo that are covered by extraction.
-	// Should be in range [0.0, 1.0]
-	FileCoverage float64
-}
-
-// TestRepo compares the result of extraction and optional indexing with
-// expected output from a given repo.
-func (h Harness) TestRepo(ctx context.Context, repo string) (Result, error) {
-	fromRepo, err := h.filenamesFromRepo(ctx, repo)
-	if err != nil {
-		log.Printf("Failed to read repo from remote: %v", err)
-		return Result{
-			Downloaded:    false,
-			Extracted:     false,
-			Indexed:       false,
-			DownloadCount: len(fromRepo),
-		}, nil
-	}
-
-	fromExtraction, err := h.filenamesFromExtraction(ctx, repo)
-	if err != nil {
-		log.Printf("Failed to extract repo: %v", err)
-		// TODO(danielmoy): consider handling errors independently and
-		// returning separate false results if either err != nil.
-		return Result{
-			Downloaded:    true,
-			Extracted:     false,
-			Indexed:       false,
-			DownloadCount: len(fromRepo),
-			ExtractCount:  fromExtraction.Len(),
-		}, nil
-	}
-
-	var coverageTotal int32
-	var coverageCount int32
-	for k := range fromRepo {
-		coverageTotal = coverageTotal + 1
-		if fromExtraction.Contains(k) {
-			coverageCount = coverageCount + 1
-		}
-	}
-
-	var coverage float64
-	if coverageTotal > 0 {
-		coverage = float64(coverageCount) / float64(coverageTotal)
-	}
-	return Result{
-		Downloaded:    true,
-		Extracted:     true,
-		DownloadCount: fromRepo.Len(),
-		ExtractCount:  fromExtraction.Len(),
-		FileCoverage:  coverage,
-	}, nil
-}
-
-func (h Harness) filenamesFromRepo(ctx context.Context, repoURI string) (stringset.Set, error) {
-	repoName := pathTail(repoURI)
-
-	repoDir, err := ioutil.TempDir("", repoName)
-	if err != nil {
-		return nil, fmt.Errorf("failed to create temp dir for repo %s: %v", repoURI, err)
-	}
-	defer os.RemoveAll(repoDir)
-
-	if err = h.fetcher()(ctx, repoURI, repoDir); err != nil {
-		return nil, err
-	}
-
-	ret := stringset.New()
-	err = filepath.Walk(repoDir, func(path string, info os.FileInfo, err error) error {
-		// TODO(danielmoy): make this parameterized based on the
-		// extractor, e.g. supporting other languages.
-		if err == nil && filepath.Ext(path) == ".java" {
-			// We are only interested in the repo-relative path.
-			rp, err := filepath.Rel(repoDir, path)
-			if err != nil {
-				return err
-			}
-			ret.Add(rp)
-		}
-		return err
-	})
-	return ret, err
-}
-
-func (h Harness) filenamesFromExtraction(ctx context.Context, repoURI string) (stringset.Set, error) {
-	repoName := pathTail(repoURI)
-	tmpOutDir, err := ioutil.TempDir("", repoName)
-	if err != nil {
-		return nil, fmt.Errorf("failed to create temp dir for repo %s: %v", repoURI, err)
-	}
-	defer os.RemoveAll(tmpOutDir)
-
-	if err := h.extractor()(ctx, config.Repo{
-		Git:        repoURI,
-		OutputPath: tmpOutDir,
-		ConfigPath: h.ConfigPath,
-	}); err != nil {
-		return nil, err
-	}
-	ret := stringset.New()
-	err = filepath.Walk(tmpOutDir, func(path string, info os.FileInfo, err error) error {
-		if err == nil && filepath.Ext(path) == ".kindex" {
-			cu, err := kindex.Open(ctx, path)
-			if err != nil {
-				return err
-			}
-			if cu.Proto != nil {
-				for _, v := range cu.Proto.SourceFile {
-					if strings.HasSuffix(v, ".java") {
-						ret.Add(v)
-					}
-				}
-			}
-		}
-		return err
-	})
-
-	return ret, err
-}
-
-func pathTail(path string) string {
-	return path[strings.LastIndex(path, "/")+1:]
-}
diff --git a/kythe/go/platform/tools/extraction/BUILD b/kythe/go/platform/tools/extraction/BUILD
deleted file mode 100644
index 2bd52bf98..000000000
--- a/kythe/go/platform/tools/extraction/BUILD
+++ /dev/null
@@ -1,11 +0,0 @@
-package(default_visibility = ["//kythe:default_visibility"])
-
-filegroup(
-    name = "extractrepo",
-    srcs = ["//kythe/go/platform/tools/extraction/extractrepo"],
-)
-
-filegroup(
-    name = "repotester",
-    srcs = ["//kythe/go/platform/tools/extraction/repotester"],
-)
diff --git a/kythe/go/platform/tools/extraction/README.md b/kythe/go/platform/tools/extraction/README.md
deleted file mode 100644
index ff6319702..000000000
--- a/kythe/go/platform/tools/extraction/README.md
+++ /dev/null
@@ -1,72 +0,0 @@
-# Kythe Repository Extractor Tools
-
-## `extractrepo.go`
-
-This tool runs a Kythe extraction on a specified repository using an extraction
-configuration as defined in [kythe.proto.ExtractionConfiguration](https://github.com/kythe/kythe/blob/master/kythe/proto/extraction_config.proto).
-It makes a local clone of the repository via the specified repository URI, and
-runs an extraction on its contents. It will accept an extraction configuration
-file specified as a CLI argument, otherwise it will search the root of repository
-for a Kythe configuration file named: ".kythe-extraction-config". The extraction
-configuration is expected to be in the format of [JSON encoded protobuf](https://developers.google.com/protocol-buffers/docs/proto3#json).
-The extraction requirements specified within the configuration will be drawn
-upon to compose a customized extraction Docker image containing the necessary
-build systems and SDKs for compiling and extracting Kythe compilation units for
-the project. The tool proceeds to build the customized extraction image and
-execute it for performing the extraction process. The output of the extraction
-process are [kindex files](http://kythe.io/docs/kythe-index-pack.html).
-
-### Build Instructions
-
-To build the `extractrepo.go` binary use the following bazel command:
-
-`bazel build //kythe/go/platform/tools/extraction:extractrepo`
-
-It may also be necessary to build the relevant extractors that you are going to
-be running:
-
-`bazel build //kythe/java/com/google/devtools/kythe/extractors/java/artifacts`
-
-### Usage
-
-These instructions assume that any required Docker images referred to in the
-extraction configuration file are accessible either from a local or remote
-container registry from within the executing host environment.
-
-`extractrepo -repo <repo_uri> -output <output_file_path> -config [config_file_path]`
-
-## `repotester.go`
-
-This tool wraps the above `extractrepo.go` tool and provides testing of input
-repos, verifying that its output is sensible. It does this by separately cloning
-the contents of the github repo and comparing them with the extractor's
-`.kindex` output. For just extraction, it uses simple filename comparison. When
-indexing is supported in the future, we will extend this tool to look at symbol
-names as well.
-
-In order to run `repotester.go`, you may first want to verify that extraction
-works as above. Many of the problems you'll run into with `repotester.go` will
-be exactly the same as with `extractrepo.go`, for example setting the correct
-extraction config.
-
-### Build Instructions
-
-To build the `repotester.go` binary, use the following bazel command:
-
-`bazel build //kythe/go/platform/tools/extraction:repotester`
-
-### Usage
-
-These instructions assume that any required Docker images referred to in the
-extraction configuration file are accessible either from a local or remote
-contanier registry from within the executing host environment.
-
-`repotester -repos <repo_list> -config <config_file_path>`
-
-`repo_list` can be a comma separated list of github repo urls, e.g.
-`"https://github.com/kythe/kythe,https://github.com/google/go-github"`.
-
-If you are managing a long list of repos, you can also sepecify a file with one
-repo per line, and instead call:
-
-`repotester -repos_list_file <file> ...`
diff --git a/kythe/go/platform/tools/extraction/extractrepo/BUILD b/kythe/go/platform/tools/extraction/extractrepo/BUILD
deleted file mode 100644
index a0c8a364f..000000000
--- a/kythe/go/platform/tools/extraction/extractrepo/BUILD
+++ /dev/null
@@ -1,9 +0,0 @@
-load("//tools:build_rules/shims.bzl", "go_binary")
-
-package(default_visibility = ["//kythe:default_visibility"])
-
-go_binary(
-    name = "extractrepo",
-    srcs = ["extractrepo.go"],
-    deps = ["//kythe/go/extractors/config"],
-)
diff --git a/kythe/go/platform/tools/extraction/extractrepo/Dockerfile b/kythe/go/platform/tools/extraction/extractrepo/Dockerfile
deleted file mode 100644
index 7f06e6f85..000000000
--- a/kythe/go/platform/tools/extraction/extractrepo/Dockerfile
+++ /dev/null
@@ -1,36 +0,0 @@
-# Copyright 2018 The Kythe Authors. All rights reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# Dockerfile for packaging up extractrepo.
-#
-# You must first build extractrepo using bazel before trying to build this
-# image:
-#
-# $ bazel build kythe/go/platforms/tools/extraction/extractrepo:extractrepo
-# $ cp bazel-bin/kythe/go/platform/tools/extraction/extractrepo/linux_amd64_stripped/extractrepo kythe/go/platform/tools/extraction/extractrepo
-# $ docker build --tag test-extract kythe/go/platform/tools/extraction/extractrepo/.
-# $ docker run -i -v /some/mvn/repo:/repo -v /some/output/dir:/output -v /var/run/docker.sock:/var/run/docker.sock -t kythe-mvn-extract-0.2
-#
-# It will deposit .kindex files into /tmp/output.
-
-FROM docker:dind
-
-# TODO(#156): These volumes are only necessary for docker-in-docker, remove
-# them in the future.
-VOLUME /tmp/input
-VOLUME /tmp/out
-
-ADD extractrepo extractrepo
-
-ENTRYPOINT ["/extractrepo", "-local", "/repo", "-output", "/output", "-tmp_repo_dir", "/tmp/input", "-tmp_out_dir", "/tmp/out"]
diff --git a/kythe/go/platform/tools/extraction/extractrepo/extractrepo.go b/kythe/go/platform/tools/extraction/extractrepo/extractrepo.go
deleted file mode 100644
index 180001832..000000000
--- a/kythe/go/platform/tools/extraction/extractrepo/extractrepo.go
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * Copyright 2018 The Kythe Authors. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// Binary extractrepo provides a tool to run a Kythe extraction on a
-// specified repository.  This binary requires both Git and Docker to be on the
-// $PATH during execution.
-//
-// Usage:
-//
-//	extractrepo -remote <repo-url> -output <output-file-path> -config [config-file-path]
-package main
-
-import (
-	"context"
-	"flag"
-	"fmt"
-	"io/ioutil"
-	"log"
-	"os"
-	"path/filepath"
-	"time"
-
-	"kythe.io/kythe/go/extractors/config"
-)
-
-var (
-	repoURI    = flag.String("remote", "", "URI of the repository containing the project to be extracted")
-	repoPath   = flag.String("local", "", "Existing local directory copy of the repository containing the project to be extracted")
-	outputPath = flag.String("output", "", "Path for output kindex file")
-	configPath = flag.String("config", "", "Path for the JSON extraction configuration file")
-	timeout    = flag.Duration("timeout", 2*time.Minute, "Timeout for extraction")
-	// TODO(#156): Remove these flags after we get rid of docker-in-docker.
-	tempRepoDir = flag.String("tmp_repo_dir", "", "Path for inner docker copy of input repo. Should be an empty directory.")
-	tempOutDir  = flag.String("tmp_out_dir", "", "Path for inner docker copy of output. Should be an empty directory.")
-)
-
-func init() {
-	flag.Usage = func() {
-		fmt.Fprintf(os.Stderr, `Usage: %s -remote <repo_uri> -output <path> -config [config_file_path]
-
-This tool extracts compilation records from a repository utilizing a JSON
-extraction configuration encoding a kythe.proto.ExtractionConfiguration.
-
-The originating repo to extract is specified either by -remote <repo-url> and
-done via a git clone, or -local <repo-path> and simply copying the repo over.
-Specifying both -remote and -local is invalid input.
-
-The configuration is specified either via the -config flag, or else within
-a configuration file located at the root of the repository named:
-".kythe-extraction-config". It makes a local clone of the specified repository
-and then uses the config to generate a customized extraction Docker image.
-
-Finally it executes the extraction by running the extraction image, the output
-of which is a kindex file as defined here:  http://kythe.io/docs/kythe-index-pack.html
-
-This binary requires both Git and Docker to be on the $PATH during execution.
-
-Options:
-`, filepath.Base(os.Args[0]))
-		flag.PrintDefaults()
-	}
-}
-
-func checkFlags() {
-	if flag.NArg() > 0 {
-		log.Fatalf("Unknown arguments: %v", flag.Args())
-	}
-
-	hasError := false
-	if *repoURI == "" && *repoPath == "" {
-		hasError = true
-		log.Println("You must provide a non-empty -remote or -local")
-	}
-	if *repoURI != "" && *repoPath != "" {
-		hasError = true
-		log.Println("You must specify only one of -remote or -local, not both")
-	}
-
-	if *outputPath == "" {
-		hasError = true
-		log.Println("You must provide a non-empty -output")
-	}
-
-	if *tempRepoDir != "" && !isEmptyDir(*tempRepoDir) {
-		hasError = true
-		log.Printf("Error: -tmp_repo_dir %q should be an empty directory", *tempRepoDir)
-	}
-
-	if *tempOutDir != "" && !isEmptyDir(*tempOutDir) {
-		hasError = true
-		log.Printf("Error: -tmp_out_dir %q should be an empty directory", *tempOutDir)
-	}
-
-	if hasError {
-		os.Exit(1)
-	}
-}
-
-// isEmptyDir reports whether dir is an empty directory.  If dir does not exist,
-// an empty directory is created at that path.
-func isEmptyDir(dir string) bool {
-	fi, err := ioutil.ReadDir(dir)
-	if os.IsNotExist(err) {
-		return os.MkdirAll(dir, 0755) == nil
-	} else if err != nil {
-		log.Printf("Error checking directory: %v", err)
-	}
-	return err == nil && len(fi) == 0
-}
-
-func main() {
-	flag.Parse()
-	checkFlags()
-
-	ctx, cancel := context.WithTimeout(context.Background(), *timeout)
-	defer cancel()
-	repo := config.Repo{
-		Git:         *repoURI,
-		Local:       *repoPath,
-		OutputPath:  *outputPath,
-		ConfigPath:  *configPath,
-		TempRepoDir: *tempRepoDir,
-		TempOutDir:  *tempOutDir,
-	}
-	if err := config.ExtractRepo(ctx, repo); err != nil {
-		log.Fatalf("Failed to extract repo: %v", err)
-	}
-}


Test patch:
diff --git a/kythe/go/extractors/config/base/base_test.go b/kythe/go/extractors/config/base/base_test.go
deleted file mode 100644
index e55854d3f..000000000
--- a/kythe/go/extractors/config/base/base_test.go
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright 2018 The Kythe Authors. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package base
-
-import (
-	"io/ioutil"
-	"os"
-	"path/filepath"
-	"strings"
-	"testing"
-
-	"kythe.io/kythe/go/test/testutil"
-)
-
-func TestDefaultConfig(t *testing.T) {
-	expectedConfig := map[string]string{
-		"maven":  "testdata/mvn_config.json",
-		"gradle": "testdata/gradle_config.json",
-	}
-	tCases := supportedBuilders()
-	for _, tc := range tCases {
-		t.Run(tc.Name, func(t *testing.T) {
-			td := makeTestDir(tc.BuildFile, t)
-			defer os.RemoveAll(td)
-			r, ok := DefaultConfig(td)
-			if !ok {
-				t.Fatalf("Did not recognize %s file as a %s repo.", tc.BuildFile, tc.Name)
-			}
-
-			// Let's also make sure that foo_config.json stays in sync with foo.go,
-			// because I've already forgotten to do that twice now.
-			conf, ok := expectedConfig[tc.Name]
-			if !ok {
-				t.Fatalf("Unsupported builder %s", tc.Name)
-			}
-			fn := testutil.TestFilePath(t, conf)
-			expected, err := ioutil.ReadFile(fn)
-			if err != nil {
-				t.Fatalf("Failed to open config file: %s", fn)
-			}
-			actual, err := ioutil.ReadAll(strings.NewReader(r))
-			if err != nil {
-				t.Fatalf("Failed to read default config")
-			}
-			if eq, diff := testutil.TrimmedEqual(expected, actual); !eq {
-				t.Fatalf("Images were not equal, diff:\n%s", diff)
-			}
-		})
-	}
-}
-
-// makeTestDir creates a temporary directory with a build file in it.  The
-// caller is responsible for cleaning up the temp directory.
-func makeTestDir(buildFile string, t *testing.T) string {
-	t.Helper()
-	td, err := ioutil.TempDir("", "testrepo")
-	if err != nil {
-		t.Fatalf("failed to create test dir %s: %v", buildFile, err)
-	}
-	tf := filepath.Join(td, buildFile)
-	if err := ioutil.WriteFile(tf, []byte("not a real build file"), 0644); err != nil {
-		t.Fatalf("failed to create test build file %s: %v", buildFile, err)
-	}
-	return td
-}
diff --git a/kythe/go/extractors/config/base/testdata/expected_gradle_config.Dockerfile b/kythe/go/extractors/config/base/testdata/expected_gradle_config.Dockerfile
deleted file mode 100644
index bed835ee5..000000000
--- a/kythe/go/extractors/config/base/testdata/expected_gradle_config.Dockerfile
+++ /dev/null
@@ -1,26 +0,0 @@
-FROM openjdk:8 as java
-FROM gcr.io/kythe-public/kythe-javac-extractor-artifacts as javac-extractor-artifacts
-FROM gradle:latest as gradle
-
-FROM debian:jessie
-VOLUME /repo
-ENV KYTHE_ROOT_DIRECTORY=/repo
-VOLUME /out
-ENV KYTHE_OUTPUT_DIRECTORY=/out
-WORKDIR /repo
-COPY --from=java /docker-java-home /docker-java-home
-COPY --from=java /etc/java-8-openjdk /etc/java-8-openjdk
-ENV JAVA_HOME=/docker-java-home
-ENV PATH=$JAVA_HOME/bin:$PATH
-COPY --from=javac-extractor-artifacts /opt/kythe/extractors/runextractor /opt/kythe/extractors/runextractor
-COPY --from=javac-extractor-artifacts /opt/kythe/extractors/javac-wrapper.sh /opt/kythe/extractors/javac-wrapper.sh
-COPY --from=javac-extractor-artifacts /opt/kythe/extractors/javac_extractor.jar /opt/kythe/extractors/javac_extractor.jar
-ENV KYTHE_CORPUS=testcorpus
-ENV REAL_JAVAC=$JAVA_HOME/bin/javac
-ENV JAVAC_EXTRACTOR_JAR=/opt/kythe/extractors/javac_extractor.jar
-ENV KYTHE_OUTPUT_FILE=$KYTHE_OUTPUT_DIRECTORY/extractor-output.kzip
-COPY --from=gradle /usr/share/gradle /usr/share/gradle
-COPY --from=gradle /etc/ssl /etc/ssl
-ENV GRADLE_HOME=/usr/share/gradle
-ENV PATH=$GRADLE_HOME/bin:$PATH
-ENTRYPOINT ["/opt/kythe/extractors/runextractor", "gradle", "-build_file", "build.gradle", "-javac_wrapper", "/opt/kythe/extractors/javac-wrapper.sh"]
diff --git a/kythe/go/extractors/config/base/testdata/expected_mvn2_config.Dockerfile b/kythe/go/extractors/config/base/testdata/expected_mvn2_config.Dockerfile
deleted file mode 100644
index b590de6a3..000000000
--- a/kythe/go/extractors/config/base/testdata/expected_mvn2_config.Dockerfile
+++ /dev/null
@@ -1,26 +0,0 @@
-FROM openjdk:8 as java
-FROM gcr.io/kythe-public/kythe-javac-extractor-artifacts as javac-extractor-artifacts
-FROM maven:latest as maven
-
-FROM debian:jessie
-VOLUME /repo
-ENV KYTHE_ROOT_DIRECTORY=/repo
-VOLUME /out
-ENV KYTHE_OUTPUT_DIRECTORY=/out
-WORKDIR /repo
-COPY --from=java /docker-java-home /docker-java-home
-COPY --from=java /etc/java-8-openjdk /etc/java-8-openjdk
-ENV JAVA_HOME=/docker-java-home
-ENV PATH=$JAVA_HOME/bin:$PATH
-COPY --from=javac-extractor-artifacts /opt/kythe/extractors/runextractor /opt/kythe/extractors/runextractor
-COPY --from=javac-extractor-artifacts /opt/kythe/extractors/javac-wrapper.sh /opt/kythe/extractors/javac-wrapper.sh
-COPY --from=javac-extractor-artifacts /opt/kythe/extractors/javac_extractor.jar /opt/kythe/extractors/javac_extractor.jar
-ENV KYTHE_CORPUS=testcorpus
-ENV REAL_JAVAC=$JAVA_HOME/bin/javac
-ENV JAVAC_EXTRACTOR_JAR=/opt/kythe/extractors/javac_extractor.jar
-ENV KYTHE_OUTPUT_FILE=$KYTHE_OUTPUT_DIRECTORY/extractor-output.kzip
-COPY --from=maven /usr/share/maven /usr/share/maven
-COPY --from=maven /etc/ssl /etc/ssl
-ENV MAVEN_HOME=/usr/share/maven
-ENV PATH=$MAVEN_HOME/bin:$PATH
-ENTRYPOINT ["/opt/kythe/extractors/runextractor", "maven", "-pom_xml", "inner/nested/pom.xml", "-javac_wrapper", "/opt/kythe/extractors/javac-wrapper.sh"]
diff --git a/kythe/go/extractors/config/base/testdata/expected_mvn_config.Dockerfile b/kythe/go/extractors/config/base/testdata/expected_mvn_config.Dockerfile
deleted file mode 100644
index c3a74d673..000000000
--- a/kythe/go/extractors/config/base/testdata/expected_mvn_config.Dockerfile
+++ /dev/null
@@ -1,28 +0,0 @@
-FROM openjdk:8 as java
-FROM gcr.io/kythe-public/kythe-javac-extractor-artifacts as javac-extractor-artifacts
-FROM maven:latest as maven
-
-FROM debian:jessie
-VOLUME /repo
-ENV KYTHE_ROOT_DIRECTORY=/repo
-VOLUME /out
-ENV KYTHE_OUTPUT_DIRECTORY=/out
-WORKDIR /repo
-COPY --from=java /docker-java-home /docker-java-home
-COPY --from=java /etc/java-8-openjdk /etc/java-8-openjdk
-ENV JAVA_HOME=/docker-java-home
-ENV PATH=$JAVA_HOME/bin:$PATH
-COPY --from=javac-extractor-artifacts /opt/kythe/extractors/runextractor /opt/kythe/extractors/runextractor
-COPY --from=javac-extractor-artifacts /opt/kythe/extractors/javac-wrapper.sh /opt/kythe/extractors/javac-wrapper.sh
-COPY --from=javac-extractor-artifacts /opt/kythe/extractors/javac_extractor.jar /opt/kythe/extractors/javac_extractor.jar
-COPY --from=javac-extractor-artifacts /opt/kythe/extractors/javac9_tools.jar /opt/kythe/extractors/javac9_tools.jar
-ENV KYTHE_CORPUS=testcorpus
-ENV REAL_JAVAC=$JAVA_HOME/bin/javac
-ENV JAVAC_EXTRACTOR_JAR=/opt/kythe/extractors/javac_extractor.jar
-ENV KYTHE_OUTPUT_FILE=$KYTHE_OUTPUT_DIRECTORY/extractor-output.kzip
-ENV KYTHE_JAVA_RUNTIME_OPTIONS=-Xbootclasspath/p:/opt/kythe/extractors/javac9_tools.jar
-COPY --from=maven /usr/share/maven /usr/share/maven
-COPY --from=maven /etc/ssl /etc/ssl
-ENV MAVEN_HOME=/usr/share/maven
-ENV PATH=$MAVEN_HOME/bin:$PATH
-ENTRYPOINT ["/opt/kythe/extractors/runextractor", "maven", "-pom_xml", "pom.xml", "-javac_wrapper", "/opt/kythe/extractors/javac-wrapper.sh"]
diff --git a/kythe/go/extractors/config/base/testdata/gradle_config.json b/kythe/go/extractors/config/base/testdata/gradle_config.json
deleted file mode 100644
index 68ef35289..000000000
--- a/kythe/go/extractors/config/base/testdata/gradle_config.json
+++ /dev/null
@@ -1,82 +0,0 @@
-{
-  "required_image": [
-    {
-      "uri": "openjdk:8",
-      "name": "java",
-      "copy_spec": [
-        {
-          "source": "/docker-java-home"
-        },
-        {
-          "source": "/etc/java-8-openjdk"
-        }
-      ],
-      "env_var": [
-        {
-          "name": "JAVA_HOME",
-          "value": "/docker-java-home"
-        },
-        {
-          "name": "PATH",
-          "value": "$JAVA_HOME/bin:$PATH"
-        }
-      ]
-    },
-    {
-      "uri": "gcr.io/kythe-public/kythe-javac-extractor-artifacts",
-      "name": "javac-extractor-artifacts",
-      "copy_spec": [
-        {
-          "source": "/opt/kythe/extractors/runextractor"
-        },
-        {
-          "source": "/opt/kythe/extractors/javac-wrapper.sh"
-        },
-        {
-          "source": "/opt/kythe/extractors/javac_extractor.jar"
-        }
-      ],
-      "env_var": [
-        {
-          "name": "KYTHE_CORPUS",
-          "value": "testcorpus"
-        },
-        {
-          "name": "REAL_JAVAC",
-          "value": "$JAVA_HOME/bin/javac"
-        },
-        {
-          "name": "JAVAC_EXTRACTOR_JAR",
-          "value": "/opt/kythe/extractors/javac_extractor.jar"
-        },
-        {
-          "name": "KYTHE_OUTPUT_FILE",
-          "value": "$KYTHE_OUTPUT_DIRECTORY/extractor-output.kzip"
-        }
-      ]
-    },
-    {
-      "uri": "gradle:latest",
-      "name": "gradle",
-      "copy_spec": [
-        {
-          "source": "/usr/share/gradle"
-        },
-        {
-          "source": "/etc/ssl"
-        }
-      ],
-      "env_var": [
-        {
-          "name": "GRADLE_HOME",
-          "value": "/usr/share/gradle"
-        },
-        {
-          "name": "PATH",
-          "value": "$GRADLE_HOME/bin:$PATH"
-        }
-      ]
-    }
-  ],
-  "entry_point": ["/opt/kythe/extractors/runextractor", "gradle", "-build_file", "build.gradle", "-javac_wrapper", "/opt/kythe/extractors/javac-wrapper.sh"]
-}
diff --git a/kythe/go/extractors/config/base/testdata/mvn2_config.json b/kythe/go/extractors/config/base/testdata/mvn2_config.json
deleted file mode 100644
index b625efbbc..000000000
--- a/kythe/go/extractors/config/base/testdata/mvn2_config.json
+++ /dev/null
@@ -1,82 +0,0 @@
-{
-  "required_image": [
-    {
-      "uri": "openjdk:8",
-      "name": "java",
-      "copy_spec": [
-        {
-          "source": "/docker-java-home"
-        },
-        {
-          "source": "/etc/java-8-openjdk"
-        }
-      ],
-      "env_var": [
-        {
-          "name": "JAVA_HOME",
-          "value": "/docker-java-home"
-        },
-        {
-          "name": "PATH",
-          "value": "$JAVA_HOME/bin:$PATH"
-        }
-      ]
-    },
-    {
-      "uri": "gcr.io/kythe-public/kythe-javac-extractor-artifacts",
-      "name": "javac-extractor-artifacts",
-      "copy_spec": [
-        {
-          "source": "/opt/kythe/extractors/runextractor"
-        },
-        {
-          "source": "/opt/kythe/extractors/javac-wrapper.sh"
-        },
-        {
-          "source": "/opt/kythe/extractors/javac_extractor.jar"
-        }
-      ],
-      "env_var": [
-        {
-          "name": "KYTHE_CORPUS",
-          "value": "testcorpus"
-        },
-        {
-          "name": "REAL_JAVAC",
-          "value": "$JAVA_HOME/bin/javac"
-        },
-        {
-          "name": "JAVAC_EXTRACTOR_JAR",
-          "value": "/opt/kythe/extractors/javac_extractor.jar"
-        },
-        {
-          "name": "KYTHE_OUTPUT_FILE",
-          "value": "$KYTHE_OUTPUT_DIRECTORY/extractor-output.kzip"
-        }
-      ]
-    },
-    {
-      "uri": "maven:latest",
-      "name": "maven",
-      "copy_spec": [
-        {
-          "source": "/usr/share/maven"
-        },
-        {
-          "source": "/etc/ssl"
-        }
-      ],
-      "env_var": [
-        {
-          "name": "MAVEN_HOME",
-          "value": "/usr/share/maven"
-        },
-        {
-          "name": "PATH",
-          "value": "$MAVEN_HOME/bin:$PATH"
-        }
-      ]
-    }
-  ],
-  "entry_point": ["/opt/kythe/extractors/runextractor", "maven", "-pom_xml", "inner/nested/pom.xml", "-javac_wrapper", "/opt/kythe/extractors/javac-wrapper.sh"]
-}
diff --git a/kythe/go/extractors/config/base/testdata/mvn_config.json b/kythe/go/extractors/config/base/testdata/mvn_config.json
deleted file mode 100644
index 4d8887b92..000000000
--- a/kythe/go/extractors/config/base/testdata/mvn_config.json
+++ /dev/null
@@ -1,89 +0,0 @@
-{
-  "required_image": [
-    {
-      "uri": "openjdk:8",
-      "name": "java",
-      "copy_spec": [
-        {
-          "source": "/docker-java-home"
-        },
-        {
-          "source": "/etc/java-8-openjdk"
-        }
-      ],
-      "env_var": [
-        {
-          "name": "JAVA_HOME",
-          "value": "/docker-java-home"
-        },
-        {
-          "name": "PATH",
-          "value": "$JAVA_HOME/bin:$PATH"
-        }
-      ]
-    },
-    {
-      "uri": "gcr.io/kythe-public/kythe-javac-extractor-artifacts",
-      "name": "javac-extractor-artifacts",
-      "copy_spec": [
-        {
-          "source": "/opt/kythe/extractors/runextractor"
-        },
-        {
-          "source": "/opt/kythe/extractors/javac-wrapper.sh"
-        },
-        {
-          "source": "/opt/kythe/extractors/javac_extractor.jar"
-        },
-        {
-          "source": "/opt/kythe/extractors/javac9_tools.jar"
-        }
-      ],
-      "env_var": [
-        {
-          "name": "KYTHE_CORPUS",
-          "value": "testcorpus"
-        },
-        {
-          "name": "REAL_JAVAC",
-          "value": "$JAVA_HOME/bin/javac"
-        },
-        {
-          "name": "JAVAC_EXTRACTOR_JAR",
-          "value": "/opt/kythe/extractors/javac_extractor.jar"
-        },
-        {
-          "name": "KYTHE_OUTPUT_FILE",
-          "value": "$KYTHE_OUTPUT_DIRECTORY/extractor-output.kzip"
-        },
-        {
-          "name": "KYTHE_JAVA_RUNTIME_OPTIONS",
-          "value": "-Xbootclasspath/p:/opt/kythe/extractors/javac9_tools.jar"
-        }
-      ]
-    },
-    {
-      "uri": "maven:latest",
-      "name": "maven",
-      "copy_spec": [
-        {
-          "source": "/usr/share/maven"
-        },
-        {
-          "source": "/etc/ssl"
-        }
-      ],
-      "env_var": [
-        {
-          "name": "MAVEN_HOME",
-          "value": "/usr/share/maven"
-        },
-        {
-          "name": "PATH",
-          "value": "$MAVEN_HOME/bin:$PATH"
-        }
-      ]
-    }
-  ],
-  "entry_point": ["/opt/kythe/extractors/runextractor", "maven", "-pom_xml", "pom.xml", "-javac_wrapper", "/opt/kythe/extractors/javac-wrapper.sh"]
-}
diff --git a/kythe/go/extractors/config/config_parser_test.go b/kythe/go/extractors/config/config_parser_test.go
deleted file mode 100644
index 9b67d0f1a..000000000
--- a/kythe/go/extractors/config/config_parser_test.go
+++ /dev/null
@@ -1,170 +0,0 @@
-/*
- * Copyright 2018 The Kythe Authors. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package config
-
-import (
-	"fmt"
-	"io"
-	"io/ioutil"
-	"os"
-	"path/filepath"
-	"strings"
-	"testing"
-
-	"kythe.io/kythe/go/test/testutil"
-
-	"google.golang.org/protobuf/encoding/protojson"
-	"google.golang.org/protobuf/proto"
-
-	ecpb "kythe.io/kythe/proto/extraction_config_go_proto"
-)
-
-const testDataDir = "base/testdata"
-
-func mustLoadDockerFile(t *testing.T, testConfigFile string) []byte {
-	t.Helper()
-	fileName := fmt.Sprintf("expected_%s.Dockerfile", strings.Replace(filepath.Base(testConfigFile), ".json", "", 1))
-	content, err := ioutil.ReadFile(testutil.TestFilePath(t, filepath.Join(testDataDir, fileName)))
-	if err != nil {
-		t.Fatalf("Failed to open test docker file: %v\n", err)
-	}
-
-	return content
-}
-
-type testFiles []*os.File
-
-func (t testFiles) Close() error {
-	var err error
-	for _, f := range t {
-		if cerr := f.Close(); err == nil {
-			err = cerr
-		}
-	}
-	return err
-}
-
-func mustOpenTestData(t *testing.T) testFiles {
-	t.Helper()
-	fileNames, err := filepath.Glob(testutil.TestFilePath(t, os.ExpandEnv(fmt.Sprintf("%s/%s", testDataDir, "*.json"))))
-	if err != nil {
-		t.Fatalf("Failed to glob for test data files: %v\n", err)
-	}
-
-	if len(fileNames) == 0 {
-		t.Fatal("No test config data found!\n")
-	}
-
-	var files []*os.File
-	for _, fileName := range fileNames {
-		file, err := os.Open(fileName)
-		if err != nil {
-			t.Fatalf("Failed to load test data: %v", err)
-		}
-
-		files = append(files, file)
-	}
-
-	return files
-}
-
-func TestNewImageGeneratesExpectedDockerFiles(t *testing.T) {
-	testData := mustOpenTestData(t)
-	defer testData.Close()
-	for _, file := range testData {
-		config, err := load(file)
-		if err != nil {
-			t.Fatalf("Failed to load extraction config: %v", err)
-		}
-
-		got, err := newImage(config, imageSettings{})
-		if err != nil {
-			t.Fatalf("Failed to parse test config: %v\n", err)
-		}
-
-		want := mustLoadDockerFile(t, file.Name())
-		if eq, diff := testutil.TrimmedEqual(want, got); !eq {
-
-			t.Fatalf("Images were not equal, diff:\n%s", diff)
-		}
-	}
-}
-
-func TestLoadReturnsProperData(t *testing.T) {
-	testData := mustOpenTestData(t)
-	defer testData.Close()
-	for _, file := range testData {
-		got, err := load(file)
-		if err != nil {
-			t.Fatalf("Failed to load extraction config: %v", err)
-		}
-
-		_, err = file.Seek(0, io.SeekStart)
-		if err != nil {
-			t.Fatalf("Failed to seek test data: %v", err)
-		}
-		rec, err := ioutil.ReadAll(file)
-		if err != nil {
-			t.Fatalf("Failed to read test data: %v", err)
-		}
-		want := &ecpb.ExtractionConfiguration{}
-		if err := protojson.Unmarshal(rec, want); err != nil {
-			t.Fatalf("Failed to unmarshal test data: %v", err)
-		}
-
-		if !proto.Equal(got, want) {
-			t.Fatalf("Expected: %v\nGot: %v", want, got)
-		}
-	}
-}
-
-func TestCreateImageWritesProperData(t *testing.T) {
-	tempDir, err := ioutil.TempDir("", "tempOutputDir")
-	if err != nil {
-		t.Fatalf("Failed to create temp dir: %v", err)
-	}
-	defer os.RemoveAll(tempDir)
-
-	testData := mustOpenTestData(t)
-	defer testData.Close()
-	for _, file := range testData {
-		config, err := load(file)
-		if err != nil {
-			t.Fatalf("Failed to load extraction config: %v", err)
-		}
-
-		tmpImageFile, err := ioutil.TempFile(tempDir, "tmpExtractionImage.Docker")
-		if err != nil {
-			t.Fatalf("Failed to create temp image file: %v", err)
-		}
-
-		err = createImage(config, imageSettings{}, tmpImageFile.Name())
-		if err != nil {
-			t.Fatalf("Failed to create image: %v", err)
-		}
-
-		got, err := ioutil.ReadAll(tmpImageFile)
-		if err != nil {
-			t.Fatalf("Failed to read created image: %v", err)
-		}
-
-		want := mustLoadDockerFile(t, file.Name())
-		if eq, diff := testutil.TrimmedEqual(got, want); !eq {
-			t.Fatalf("Images were not equal, diff:\n%s\n", diff)
-		}
-	}
-}
diff --git a/kythe/go/extractors/config/config_selector_test.go b/kythe/go/extractors/config/config_selector_test.go
deleted file mode 100644
index f89bb8537..000000000
--- a/kythe/go/extractors/config/config_selector_test.go
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Copyright 2018 The Kythe Authors. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package config
-
-import (
-	"io/ioutil"
-	"os"
-	"path/filepath"
-	"testing"
-
-	"kythe.io/kythe/go/test/testutil"
-
-	"google.golang.org/protobuf/encoding/protojson"
-	"google.golang.org/protobuf/proto"
-
-	ecpb "kythe.io/kythe/proto/extraction_config_go_proto"
-)
-
-type testcase struct {
-	name          string
-	expectedError bool
-	configFile    string
-	buildFile     string
-	expectedProto *ecpb.ExtractionConfiguration
-}
-
-func TestFindConfig(t *testing.T) {
-	tCases := []testcase{
-		testcase{
-			name:          "maven-default",
-			buildFile:     "pom.xml",
-			expectedProto: loadProto("base/testdata/mvn_config.json", t),
-		},
-		// Note that if we're passed a config, technically we don't need to see
-		// the config at this step in the process.  If we were being thorough,
-		// the makeTestDir would populate a inner/nested/pom.xml, but I'm being
-		// lazy.
-		testcase{
-			name:          "maven-passed",
-			configFile:    "base/testdata/mvn2_config.json",
-			expectedProto: loadProto("base/testdata/mvn2_config.json", t),
-		},
-		testcase{
-			name:          "maven-missing-pom",
-			expectedError: true,
-		},
-		testcase{
-			name:          "maven-missing-config",
-			expectedError: true,
-			configFile:    "base/testdata/sir_not_appearing_in_this_repo.json",
-		},
-		// Even if there's a build.gradle file, if the config is directly
-		// passed in, then trust the user.
-		testcase{
-			name:          "passed-overrides-default",
-			buildFile:     "gradle.build",
-			configFile:    "base/testdata/mvn2_config.json",
-			expectedProto: loadProto("base/testdata/mvn2_config.json", t),
-		},
-		testcase{
-			name:          "gradle-default",
-			buildFile:     "build.gradle",
-			expectedProto: loadProto("base/testdata/gradle_config.json", t),
-		},
-	}
-	for _, tc := range tCases {
-		t.Run(tc.name, func(t *testing.T) {
-			td := makeTestDir(tc.buildFile, t)
-			defer os.RemoveAll(td)
-			p, err := findConfig(tc.configFile, td)
-			if err != nil && !tc.expectedError {
-				t.Fatalf("Unexpected error finding config %v", err)
-			} else if err == nil && tc.expectedError {
-				t.Fatalf("Expected error finding config %s, but didn't get one!", tc.name)
-			} else if !tc.expectedError {
-				if tc.expectedProto == nil {
-					t.Fatalf("Test specification failure - should have an expected proto for case %s", tc.name)
-				}
-
-				if !proto.Equal(tc.expectedProto, p) {
-					t.Fatalf("Expected and actual protos differ:\n%s\n\n%s", tc.expectedProto, p)
-				}
-			}
-		})
-	}
-}
-
-// makeTestDir creates a temporary directory, optionally with a build file.  The
-// caller is responsible for cleaning up the temp directory.
-func makeTestDir(buildFile string, t *testing.T) string {
-	t.Helper()
-	td, err := ioutil.TempDir("", "testrepo")
-	if err != nil {
-		t.Fatalf("failed to create test dir %s: %v", buildFile, err)
-	}
-	if buildFile != "" {
-		tf := filepath.Join(td, buildFile)
-		if err := ioutil.WriteFile(tf, []byte("not a real build file"), 0644); err != nil {
-			t.Fatalf("failed to create test build file %s: %v", buildFile, err)
-		}
-	}
-	return td
-}
-
-func loadProto(path string, t *testing.T) *ecpb.ExtractionConfiguration {
-	t.Helper()
-	tf := testutil.TestFilePath(t, path)
-	f, err := os.Open(tf)
-	if err != nil {
-		t.Fatalf("Test specfication failure: failed to load config %s: %v", path, err)
-	}
-	defer f.Close()
-	rec, err := ioutil.ReadAll(f)
-	if err != nil {
-		t.Fatalf("Test specification failure: failed to read config %s: %v", path, err)
-	}
-	extractionConfig := &ecpb.ExtractionConfiguration{}
-	if err := protojson.Unmarshal(rec, extractionConfig); err != nil {
-		t.Fatalf("Test specification failure: failed to parse config %s: %v", path, err)
-	}
-
-	return extractionConfig
-}
diff --git a/kythe/go/extractors/config/smoke/smoke_test.go b/kythe/go/extractors/config/smoke/smoke_test.go
deleted file mode 100644
index 1882f9f97..000000000
--- a/kythe/go/extractors/config/smoke/smoke_test.go
+++ /dev/null
@@ -1,187 +0,0 @@
-/*
- * Copyright 2018 The Kythe Authors. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package smoke
-
-import (
-	"context"
-	"fmt"
-	"io/ioutil"
-	"math"
-	"os"
-	"path/filepath"
-	"testing"
-
-	"kythe.io/kythe/go/extractors/config"
-	"kythe.io/kythe/go/platform/kindex"
-
-	apb "kythe.io/kythe/proto/analysis_go_proto"
-	spb "kythe.io/kythe/proto/storage_go_proto"
-)
-
-type testExtractor struct {
-	repoFiles       map[string][]byte
-	extractionFiles []string
-	separateKindex  bool
-}
-
-type container struct {
-	requiredInput []string
-	kindexName    string
-}
-
-func (e testExtractor) ExtractRepo(ctx context.Context, repo config.Repo) error {
-	af := []container{}
-	if e.separateKindex {
-		for i, f := range e.extractionFiles {
-			af = append(af, container{
-				requiredInput: []string{f},
-				kindexName:    fmt.Sprintf("fake%d.kindex", i),
-			})
-		}
-	} else {
-		af = append(af, container{
-			requiredInput: e.extractionFiles,
-			kindexName:    "fake.kindex",
-		})
-
-	}
-	return writeKindex(af, repo.OutputPath)
-}
-
-func writeKindex(allFiles []container, outputPath string) error {
-	for _, files := range allFiles {
-		cu := &kindex.Compilation{
-			Proto: &apb.CompilationUnit{
-				VName: &spb.VName{
-					Corpus: "test",
-					Path:   "fakepath",
-				},
-				SourceFile: files.requiredInput,
-			},
-		}
-
-		err := writeSingleKindex(filepath.Join(outputPath, files.kindexName), cu)
-		if err != nil {
-			return err
-		}
-	}
-	return nil
-}
-
-func writeSingleKindex(path string, unit *kindex.Compilation) error {
-	f, err := os.Create(path)
-	if err != nil {
-		return err
-	} else if _, err := unit.WriteTo(f); err != nil {
-		f.Close()
-		return err
-	}
-	return f.Close()
-}
-
-func (e testExtractor) Fetch(ctx context.Context, _, outputPath string) error {
-	for k, v := range e.repoFiles {
-		if err := ioutil.WriteFile(filepath.Join(outputPath, k), v, 0444); err != nil {
-			return err
-		}
-	}
-	return nil
-}
-
-func TestBasicExtraction(t *testing.T) {
-	rf := map[string][]byte{
-		"foo.java": []byte("stuff"),
-		"bar.java": []byte("stuff"),
-	}
-	ef := []string{"foo.java", "bar.java"}
-
-	te := testExtractor{
-		repoFiles:       rf,
-		extractionFiles: ef,
-	}
-
-	verifyRepoCoverage(t, te, 2, 2, 1.0)
-}
-
-func TestMissingRepoFiles(t *testing.T) {
-	rf := map[string][]byte{
-		"foo.java": []byte("stuff"),
-		"bar.java": []byte("stuff"),
-	}
-	ef := []string{"foo.java"}
-
-	te := testExtractor{
-		repoFiles:       rf,
-		extractionFiles: ef,
-	}
-
-	verifyRepoCoverage(t, te, 2, 1, 0.5)
-}
-
-func TestMultipleKindexFiles(t *testing.T) {
-	rf := map[string][]byte{
-		"foo.java": []byte("stuff"),
-		"bar.java": []byte("stuff"),
-	}
-	ef := []string{"foo.java", "bar.java"}
-
-	te := testExtractor{
-		repoFiles:       rf,
-		extractionFiles: ef,
-		separateKindex:  true,
-	}
-
-	verifyRepoCoverage(t, te, 2, 2, 1.0)
-}
-
-// verifyRepoCoverage tests that a given testExtractor yields a specific
-// number of files downloaded, extracted, and percentage coverage. The passed
-// testExtractor should be set up with all of the relevant input repo and
-// extraction files.
-func verifyRepoCoverage(t *testing.T, te testExtractor, expectedDownloadCount, expectedExtractCount int, expectedCoverage float64) {
-	t.Helper()
-	h := Harness{
-		Fetcher:    te.Fetch,
-		Extractor:  te.ExtractRepo,
-		ConfigPath: "",
-		Indexer:    nil,
-	}
-
-	r, err := h.TestRepo(context.Background(), "foo")
-	if err != nil {
-		t.Fatalf("failed to test repo: %v", err)
-	}
-	if !r.Downloaded {
-		t.Error("failed to download")
-	}
-	if !r.Extracted {
-		t.Error("failed to extract")
-	}
-	if expectedDownloadCount != r.DownloadCount {
-		t.Errorf("expected %d downloaded files, got %d", expectedDownloadCount, r.DownloadCount)
-	}
-	if expectedExtractCount != r.ExtractCount {
-		t.Errorf("expected %d extracted files, got %d", expectedExtractCount, r.ExtractCount)
-	}
-	if !floatEquals(r.FileCoverage, expectedCoverage) {
-		t.Errorf("expected %.3f expectedCoverage, got %.3f", expectedCoverage, r.FileCoverage)
-	}
-}
-
-const eps float64 = 0.0001
-
-func floatEquals(a, b float64) bool { return math.Abs(a-b) < eps }
diff --git a/kythe/go/platform/tools/extraction/repotester/BUILD b/kythe/go/platform/tools/extraction/repotester/BUILD
deleted file mode 100644
index e07000ea3..000000000
--- a/kythe/go/platform/tools/extraction/repotester/BUILD
+++ /dev/null
@@ -1,9 +0,0 @@
-load("//tools:build_rules/shims.bzl", "go_binary")
-
-package(default_visibility = ["//kythe:default_visibility"])
-
-go_binary(
-    name = "repotester",
-    srcs = ["repotester.go"],
-    deps = ["//kythe/go/extractors/config/smoke"],
-)
diff --git a/kythe/go/platform/tools/extraction/repotester/repotester.go b/kythe/go/platform/tools/extraction/repotester/repotester.go
deleted file mode 100644
index 87a262f12..000000000
--- a/kythe/go/platform/tools/extraction/repotester/repotester.go
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * Copyright 2018 The Kythe Authors. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// Binary repotester tests the high level validity of repo extraction. It tries
-// to run similar logic to sibling binary extractrepo on a specified target
-// repositories, and reports results in csv format.
-//
-// An extraction config can be optionally read from a specified file.  The
-// format follows kythe.proto.ExtractionConfiguration.
-//
-// Usage:
-//
-//	repotester -repos <comma_delimited,repo_urls> [-config <config_file_path>]
-//	repotester -repo_list_file <file> [-config <config_file_path>]
-package main
-
-import (
-	"bufio"
-	"context"
-	"encoding/csv"
-	"flag"
-	"fmt"
-	"log"
-	"os"
-	"path/filepath"
-	"strconv"
-	"strings"
-	"time"
-
-	"kythe.io/kythe/go/extractors/config/smoke"
-)
-
-var (
-	repos      = flag.String("repos", "", "A comma delimited list of repos to test")
-	reposFile  = flag.String("repo_list_file", "", "A file that contains a newline delimited list of repos to test")
-	configPath = flag.String("config", "", "An optional config file to specify kythe.proto.ExtractionConfiguration logic")
-	index      = flag.Bool("index", false, "Whether to attempt to index a repo after successful extraction")
-	timeout    = flag.Duration("timeout", 2*time.Minute, "Timeout for testing an individual repo.")
-)
-
-func init() {
-	flag.Usage = func() {
-		binary := filepath.Base(os.Args[0])
-		fmt.Fprintf(os.Stderr, `Usage: %s -repos <comma_delimited,repo_urls>
-%s -repo_list_file <file_containing_line_delimited_repo_urls>
-
-This tool tests repo extraction by comparing extractrepo results with the
-contents of the actual repository itself.
-
-This binary requires both Git and Docker to be on the $PATH during execution.
-
-Options:
-`, binary, binary)
-		flag.PrintDefaults()
-	}
-}
-
-func main() {
-	flag.Parse()
-	checkFlags()
-
-	w := csv.NewWriter(os.Stdout)
-	w.Write([]string{"downloads", "extracts", "downloadfilecount", "extractfilecount", "coverage", "repo"})
-	w.Flush()
-
-	repos, err := getRepos()
-	if err != nil {
-		log.Fatalf("Failed to get repos to read: %v", err)
-	}
-
-	h := &smoke.Harness{
-		ConfigPath: *configPath,
-	}
-
-	if *index {
-		h.Indexer = smoke.EmptyIndexer
-	}
-
-	for _, repo := range repos {
-		ctx, cancel := context.WithTimeout(context.Background(), *timeout)
-		defer cancel()
-		res, err := h.TestRepo(ctx, repo)
-		if err != nil {
-			log.Printf("Failed to test repo: %s", err)
-		} else {
-			w.Write([]string{
-				strconv.FormatBool(res.Downloaded),
-				strconv.FormatBool(res.Extracted),
-				strconv.Itoa(res.DownloadCount),
-				strconv.Itoa(res.ExtractCount),
-				strconv.FormatFloat(res.FileCoverage, 'f', 2, 64),
-				repo,
-			})
-			w.Flush()
-		}
-	}
-}
-
-func checkFlags() {
-	if flag.NArg() > 0 {
-		log.Fatalf("Unknown arguments: %v", flag.Args())
-	}
-	if (*repos == "" && *reposFile == "") || (*repos != "" && *reposFile != "") {
-		log.Fatalf("Must specify one of -repos or -repo_list_file, but no both.")
-	}
-}
-
-func getRepos() ([]string, error) {
-	switch {
-	case *repos != "":
-		return strings.Split(*repos, ","), nil
-	case *reposFile != "":
-		return getReposFromFile()
-	default:
-		return nil, fmt.Errorf("invalid state - need a source of repos")
-	}
-}
-
-func getReposFromFile() ([]string, error) {
-	file, err := os.Open(*reposFile)
-	if err != nil {
-		return nil, fmt.Errorf("cannot read repo file: %v", err)
-	}
-	defer file.Close()
-
-	ret := []string{}
-	scanner := bufio.NewScanner(file)
-	// TODO(danielmoy): consider supporting separate configs per repo. This
-	// will become more necessary once we have more customized configs.
-	for scanner.Scan() {
-		ret = append(ret, scanner.Text())
-	}
-	if err := scanner.Err(); err != nil {
-		return nil, fmt.Errorf("error reading repo file: %v", err)
-	}
-	return ret, nil
-}