Skip to content

Commit ceaa887

Browse files
committed
Drop ScipBuildTool and related code
Removes the SCIP-specific build tool that consumed scip-java.json / lsif-java.json config files, along with everything that only existed to support it: - ScipBuildTool and its test suite - IndexDependencyCommand (only invoked the dropped 'scip' build tool) - LibrarySnapshotGenerator + SemanticdbJavacSnapshotGenerator and the org.jetbrains.exposed snapshot fixtures (the generator only worked via index-dependency) - TracingServer test helper (only used by ScipBuildToolSuite) - Dependencies.kotlinMPPCommon (only used by ScipBuildTool) - The scipConfig / scipIgnoredJavacOptionPrefixes / scipIgnoredAnnotationProcessors CLI flags - The lsif-java.json JVM lookup in scip-java-docker-script.sh, and the now-unused jq install (Dockerfile, flake.nix, CONTRIBUTING.md) Also fixes a pre-existing misplaced @description annotation in IndexCommand so that the buildCommand description is actually attached to buildCommand instead of leaking onto strictCompilation.
1 parent e67f91c commit ceaa887

95 files changed

Lines changed: 13 additions & 87640 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CONTRIBUTING.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ nix develop .#jdk21 # JDK 21
1515
```
1616

1717
This drops you into a shell with `sbt`, `cs` (coursier), `maven`, `gradle`,
18-
`bazelisk`, `scalafmt`, `nodejs`, `yarn`, `git`, `jq`, etc. all pinned to the
18+
`bazelisk`, `scalafmt`, `nodejs`, `yarn`, `git`, etc. all pinned to the
1919
versions used in CI.
2020

2121
If you'd rather install tools manually, you'll need at least:
@@ -55,7 +55,6 @@ These are the main components of the project.
5555
| `buildTools/test` | sbt | Run slow build tool tests (Gradle, Maven). |
5656
| `snapshots/testOnly tests.MinimizedSnapshotSuite` | sbt | Runs fast snapshot tests. Indexes a small set of files under `tests/minimized`. |
5757
| `snapshots/testOnly tests.MinimizedSnapshotSuite -- *InnerClasses*` | sbt | Runs only individual tests cases matching the name "InnerClasses". |
58-
| `snapshots/testOnly tests.LibrarySnapshotSuite` | sbt | Runs slow snapshot tests. Indexes a corpus of external Java libraries. |
5958
| `snapshots/test` | sbt | Runs all snapshot tests. |
6059
| `snapshots/run` | sbt | Update snapshot tests. Use this command after you have fixed a bug. |
6160
| `cli/run --cwd DIRECTORY` | sbt | Run `scip-java` command-line tool against a given Gradle/Maven build. |

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM eclipse-temurin:17@sha256:6eca72bb4cd5fb8cd215f2579a4dfffd24b0f47effb6c868b7e92b7f0422fa9f
22

3-
RUN apt-get update && apt-get install --yes jq wget curl zip unzip git python3 python3-pip autoconf automake libtool build-essential libtool make g++
3+
RUN apt-get update && apt-get install --yes wget curl zip unzip git python3 python3-pip autoconf automake libtool build-essential libtool make g++
44

55
WORKDIR /workdir
66

bin/scip-java-docker-script.sh

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,6 @@
44
# `scip-java` binary is already installed at `/app/scip-java/bin/scip-java`.
55
set -eu
66
JVM_VERSION="${JVM_VERSION:-21,17,11,8}"
7-
FILE="$PWD/lsif-java.json"
8-
if test -f "$FILE"; then
9-
FROM_CONFIG=$(jq -r '.jvm' "$FILE")
10-
if [ "$FROM_CONFIG" != "null" ]; then
11-
JVM_VERSION="$FROM_CONFIG"
12-
fi
13-
fi
147

158
JVM_VERSIONS=$(echo "$JVM_VERSION" | tr "," "\n")
169

flake.nix

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
git
2828
(gradle.override ({ java = jdk; }))
2929
jdk
30-
jq
3130
(maven.override ({ jdk_headless = jdk; }))
3231
nixfmt
3332
nodejs

scip-java/src/main/scala/com/sourcegraph/scip_java/Dependencies.scala

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,11 @@ import java.io.File
44
import java.nio.file.Path
55

66
import scala.concurrent.duration.Duration
7-
import scala.util.Try
87
import scala.xml.XML
98

109
import coursier.Fetch
1110
import coursier.Repositories
1211
import coursier.Resolve
13-
import coursier.cache.Cache
1412
import coursier.cache.CachePolicy
1513
import coursier.cache.FileCache
1614
import coursier.core._
@@ -43,39 +41,6 @@ object Dependencies {
4341
Repositories.centralGcs
4442
)
4543

46-
/**
47-
* Attempts to find the "common definitions" JAR for a potentially
48-
* MultiPlatform Project. We only support JVM for now, native and JS are not
49-
* supported. If it ends with '-jvm', we search for a JAR with the classifier
50-
* truncated. If it does not end with -jvm, we search for a JAR with the
51-
* -common classifier. This is non-exhaustive, and the classifiers are
52-
* completely arbitrary.
53-
*/
54-
def kotlinMPPCommon(
55-
group: String,
56-
artifact: String,
57-
version: String
58-
): Option[Path] =
59-
Try {
60-
val task = Fetch[Task](Cache.default)
61-
.withClassifiers(Set(Classifier.sources))
62-
.addRepositories(defaultExtraRepositories: _*)
63-
64-
if (artifact.endsWith("-jvm")) {
65-
val dependency = Dependencies.parseDependency(
66-
s"$group:${artifact.stripSuffix("-jvm")}:$version"
67-
)
68-
val result = task.addDependencies(dependency).runResult()
69-
return Some(result.files.head.toPath)
70-
}
71-
72-
val dependency = Dependencies.parseDependency(
73-
s"$group:$artifact-common:$version"
74-
)
75-
val result = task.addDependencies(dependency).runResult()
76-
result.files.head.toPath
77-
}.toOption
78-
7944
def resolveDependencies(
8045
dependencies: List[String],
8146
transitive: Boolean = true

scip-java/src/main/scala/com/sourcegraph/scip_java/ScipJava.scala

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package com.sourcegraph.scip_java
33
import java.io.PrintStream
44

55
import com.sourcegraph.scip_java.commands.IndexCommand
6-
import com.sourcegraph.scip_java.commands.IndexDependencyCommand
76
import com.sourcegraph.scip_java.commands.IndexSemanticdbCommand
87
import com.sourcegraph.scip_java.commands.SnapshotCommand
98
import moped.cli.Application
@@ -21,7 +20,6 @@ object ScipJava {
2120
CommandParser[VersionCommand],
2221
CommandParser[IndexCommand],
2322
CommandParser[IndexSemanticdbCommand],
24-
CommandParser[IndexDependencyCommand],
2523
CommandParser[SnapshotCommand]
2624
)
2725
)

scip-java/src/main/scala/com/sourcegraph/scip_java/buildtools/BuildTool.scala

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ object BuildTool {
2727
// first detected build tool will be used in `auto` mode
2828
// Bazel is missing because it isn't supported by auto-indexing
2929

30-
// first as it indicates user's intent to use SCIP auto-indexing
31-
new ScipBuildTool(index),
3230
// Maven first, then Gradle
3331
// To match the order indicated in IntelliJ Java developer survey 2022:
3432
// https://www.jetbrains.com/lp/devecosystem-2022/java/#which-build-systems-do-you-regularly-use-if-any-

0 commit comments

Comments
 (0)