Skip to content

Commit cd2441f

Browse files
committed
Rename LSIF into SCIP
1 parent 6fb8a78 commit cd2441f

File tree

109 files changed

+570
-564
lines changed

Some content is hidden

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

109 files changed

+570
-564
lines changed

.github/workflows/ci.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ jobs:
2727
- uses: actions/checkout@v2
2828
- run: yarn global add @bazel/bazelisk
2929
- run: bazel build //... --//semanticdb-javac:enabled=true
30-
- run: bazel run lsif-semanticdb:bazel -- --sourceroot "$PWD"
31-
- run: du -h dump.lsif-typed
32-
- run: bazel build //... --@lsif_java//semanticdb-javac:enabled=true
30+
- run: bazel run scip-semanticdb:bazel -- --sourceroot "$PWD"
31+
- run: du -h index.scip
32+
- run: bazel build //... --@scip_java//semanticdb-javac:enabled=true
3333
working-directory: examples/bazel-example
34-
- run: bazel run @lsif_java//lsif-semanticdb:bazel -- --sourceroot "$PWD"
34+
- run: bazel run @scip_java//scip-semanticdb:bazel -- --sourceroot "$PWD"
3535
working-directory: examples/bazel-example
36-
- run: du -h dump.lsif-typed
36+
- run: du -h index.scip
3737
working-directory: examples/bazel-example
3838
check:
3939
runs-on: ubuntu-latest

.github/workflows/sourcegraph.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ on:
66
- olafurpg/lets-go
77
pull_request:
88
jobs:
9-
lsif:
9+
scip:
1010
runs-on: ubuntu-latest
11-
name: "Upload LSIF"
11+
name: "Upload SCIP"
1212
steps:
1313
- uses: actions/checkout@v2
1414
- uses: olafurpg/setup-scala@v13

.gitignore

+3-2
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,12 @@ project/metals.sbt
5252
out/
5353
*.hnir
5454
test-report.json
55-
dump.lsif
55+
index.scip
5656

5757
./generated
5858
/sources
5959
bazel-bin
60-
bazel-lsif-java
60+
bazel-scip-java
6161
bazel-out
6262
bazel-testlogs
63+
bazel-lsif-java

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Contributing guide
22

3-
See https://sourcegraph.github.io/lsif-java/docs/contributing.html
3+
See https://sourcegraph.github.io/scip-java/docs/contributing.html

README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# Java indexer for the Language Server Index Format (LSIF) ![](https://img.shields.io/badge/status-development-yellow?style=flat)
1+
# Java, Scala, and Kotlin indexer for SCIP ![](https://img.shields.io/badge/status-development-green?style=flat)
22

33
| Documentation | Link |
44
| -------------------- | ---------------------------------------------------------------------- |
5-
| Landing page | https://sourcegraph.github.io/lsif-java |
6-
| Getting started | https://sourcegraph.github.io/lsif-java/docs/getting-started.html |
7-
| Manual configuration | https://sourcegraph.github.io/lsif-java/docs/manual-configuration.html |
8-
| Contributing | https://sourcegraph.github.io/lsif-java/docs/contributing.html |
9-
| Design | https://sourcegraph.github.io/lsif-java/docs/design.html |
5+
| Landing page | https://sourcegraph.github.io/scip-java |
6+
| Getting started | https://sourcegraph.github.io/scip-java/docs/getting-started.html |
7+
| Manual configuration | https://sourcegraph.github.io/scip-java/docs/manual-configuration.html |
8+
| Contributing | https://sourcegraph.github.io/scip-java/docs/contributing.html |
9+
| Design | https://sourcegraph.github.io/scip-java/docs/design.html |
1010

WORKSPACE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
workspace(name = "lsif_java_tests")
1+
workspace(name = "scip_java_tests")
22
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
33

44
##############

bin/lsif-java-docker-script.sh bin/scip-java-docker-script.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
2-
# Wrapper script for `lsif-java`, which automatically picks up the correct JVM
2+
# Wrapper script for `scip-java`, which automatically picks up the correct JVM
33
# version. It assumes that `coursier` is available on the `$PATH` and that the
4-
# `lsif-java` binary is already installed at `/app/lsif-java/bin/lsif-java`.
4+
# `scip-java` binary is already installed at `/app/scip-java/bin/scip-java`.
55
set -eu
66
JVM_VERSION="8"
77
FILE="$PWD/lsif-java.json"
@@ -22,4 +22,4 @@ if [ "$JVM_VERSION" = "17" ]; then
2222
export JAVA_OPTS="--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED"
2323
fi
2424

25-
/app/lsif-java/bin/lsif-java "$@"
25+
/app/scip-java/bin/scip-java "$@"

build.sbt

+21-21
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ inThisBuild(
3535
semanticdbEnabled := true,
3636
semanticdbVersion := V.scalameta,
3737
organization := "com.sourcegraph",
38-
homepage := Some(url("https://github.com/sourcegraph/lsif-java")),
38+
homepage := Some(url("https://github.com/sourcegraph/scip-java")),
3939
dynverSeparator := "-",
4040
licenses :=
4141
List("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")),
@@ -124,10 +124,10 @@ lazy val plugin = project
124124
)
125125
.dependsOn(semanticdb)
126126

127-
lazy val lsif = project
128-
.in(file("lsif-semanticdb"))
127+
lazy val scip = project
128+
.in(file("scip-semanticdb"))
129129
.settings(
130-
moduleName := "lsif-semanticdb",
130+
moduleName := "scip-semanticdb",
131131
javaToolchainVersion := "8",
132132
javaOnlySettings,
133133
libraryDependencies +=
@@ -139,10 +139,10 @@ lazy val lsif = project
139139
.dependsOn(semanticdb)
140140

141141
lazy val cli = project
142-
.in(file("lsif-java"))
142+
.in(file("scip-java"))
143143
.settings(
144-
moduleName := "lsif-java",
145-
(Compile / mainClass) := Some("com.sourcegraph.lsif_java.LsifJava"),
144+
moduleName := "scip-java",
145+
(Compile / mainClass) := Some("com.sourcegraph.scip_java.ScipJava"),
146146
(run / baseDirectory) := (ThisBuild / baseDirectory).value,
147147
buildInfoKeys :=
148148
Seq[BuildInfoKey](
@@ -168,7 +168,7 @@ lazy val cli = project
168168
"bloopVersion" -> V.bloop,
169169
"bspVersion" -> V.bsp
170170
),
171-
buildInfoPackage := "com.sourcegraph.lsif_java",
171+
buildInfoPackage := "com.sourcegraph.scip_java",
172172
libraryDependencies ++=
173173
List(
174174
"io.get-coursier" %% "coursier" % V.coursier,
@@ -200,26 +200,26 @@ lazy val cli = project
200200

201201
IO.copy(outs)
202202
val props = new Properties()
203-
val propsFile = out.resolve("lsif-java.properties").toFile
203+
val propsFile = out.resolve("scip-java.properties").toFile
204204
val copiedJars = outs.collect { case (_, out) =>
205205
out
206206
}
207207
val names = copiedJars.map(_.getName).mkString(";")
208208
props.put("jarNames", names)
209-
IO.write(props, "lsif-java", propsFile)
209+
IO.write(props, "scip-java", propsFile)
210210

211211
propsFile :: copiedJars.toList
212212
}
213213
.taskValue,
214214
docker / imageNames :=
215215
List(
216-
ImageName("sourcegraph/lsif-java:latest"),
217-
ImageName(s"sourcegraph/lsif-java:${version.value}")
216+
ImageName("sourcegraph/scip-java:latest"),
217+
ImageName(s"sourcegraph/scip-java:${version.value}")
218218
),
219219
docker / dockerfile := {
220220
val binaryDistribution = pack.value
221221
val script = (ThisBuild / baseDirectory).value / "bin" /
222-
"lsif-java-docker-script.sh"
222+
"scip-java-docker-script.sh"
223223
new Dockerfile {
224224
from("gradle:7.2.0-jdk8")
225225

@@ -248,14 +248,14 @@ lazy val cli = project
248248
"https://github.com/coursier/jvm-index/blob/master/index.json"
249249
)
250250

251-
// Install `lsif-java` binary.
252-
add(script, "/usr/local/bin/lsif-java")
253-
add(binaryDistribution, "/app/lsif-java")
251+
// Install `scip-java` binary.
252+
add(script, "/usr/local/bin/scip-java")
253+
add(binaryDistribution, "/app/scip-java")
254254
}
255255
}
256256
)
257257
.enablePlugins(PackPlugin, DockerPlugin, BuildInfoPlugin)
258-
.dependsOn(lsif)
258+
.dependsOn(scip)
259259

260260
def commitAll(): Unit = {
261261
import scala.sys.process._
@@ -273,7 +273,7 @@ commands +=
273273
Command.command("nativeImageProfiled") { s =>
274274
val targetroot =
275275
file("tests/minimized/.j11/target/scala-2.13/meta").absolutePath
276-
val output = Files.createTempFile("lsif-java", "dump.lsif")
276+
val output = Files.createTempFile("scip-java", "index.scip")
277277
"minimized/compile" ::
278278
s"""nativeImageRunAgent " index-semanticdb --output=$output $targetroot"""" ::
279279
"nativeImage" :: s
@@ -403,17 +403,17 @@ lazy val snapshots = project
403403
lazy val bench = project
404404
.in(file("tests/benchmarks"))
405405
.settings(
406-
moduleName := "lsif-java-bench",
406+
moduleName := "scip-java-bench",
407407
(run / fork) := true,
408408
(publish / skip) := true
409409
)
410410
.dependsOn(unit)
411411
.enablePlugins(JmhPlugin)
412412

413413
lazy val docs = project
414-
.in(file("lsif-java-docs"))
414+
.in(file("scip-java-docs"))
415415
.settings(
416-
moduleName := "lsif-java-docs",
416+
moduleName := "scip-java-docs",
417417
mdocOut :=
418418
(ThisBuild / baseDirectory).value / "website" / "target" / "docs",
419419
fork := false,

docs/benchmarks.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ sbt:root> bench/jmh:run -i 10 -wi 10 -f1 -t1
2525
compilation by 45-50%.
2626
- Recommendation: do not enable the SemanticDB compiler plugin during local
2727
edit-and-test workflows. The compiler plugin is primarily intended to be
28-
enabled in custom CI jobs to upload LSIF indexes.
28+
enabled in custom CI jobs to upload SCIP indexes.

docs/contributing.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ title: Contributing guide
55
---
66

77
This page documents tips and tricks for contributing to the
8-
[sourcegraph/lsif-java](https://github.com/sourcegraph/lsif-java) codebase.
8+
[sourcegraph/scip-java](https://github.com/sourcegraph/scip-java) codebase.
99

1010
## System dependencies
1111

@@ -29,7 +29,7 @@ These are the main components of the project.
2929
- `tests/snapshots`: slow running
3030
["snapshot tests"](https://jestjs.io/docs/en/snapshot-testing) that index a
3131
corpus of published Java libraries.
32-
- `cli/src/main/scala`: implementation of the `lsif-java` command-line
32+
- `cli/src/main/scala`: implementation of the `scip-java` command-line
3333
interface.
3434
- `build.sbt`: the sbt build definition.
3535
- `project/plugins.sbt`: plugins for the sbt build.
@@ -47,8 +47,8 @@ These are the main components of the project.
4747
| `snapshots/testOnly tests.LibrarySnapshotSuite` | sbt | Runs slow snapshot tests. Indexes a corpus of external Java libraries. |
4848
| `snapshots/test` | sbt | Runs all snapshot tests. |
4949
| `snapshots/run` | sbt | Update snapshot tests. Use this command after you have fixed a bug. |
50-
| `cli/run --cwd DIRECTORY` | sbt | Run `lsif-java` command-line tool against a given Gradle/Maven build. |
51-
| `cd website && yarn install && yarn start` | terminal | Start live-reload preview of the website at http://localhost:3000/lsif-java. |
50+
| `cli/run --cwd DIRECTORY` | sbt | Run `scip-java` command-line tool against a given Gradle/Maven build. |
51+
| `cd website && yarn install && yarn start` | terminal | Start live-reload preview of the website at http://localhost:3000/scip-java. |
5252
| `docs/mdoc --watch` | sbt | Re-generate markdown files in the `docs/` directory. |
5353
| `fixAll` | sbt | Run Scalafmt, Scalafix and Javafmt on all sources. Run this before opening a PR. |
5454

@@ -81,7 +81,7 @@ It's best to run tests from the sbt shell, not from the IntelliJ UI.
8181
If you want to use completions and precise code navigation, it's not recommended
8282
to use other editors than IntelliJ. IntelliJ is the only IDE that properly
8383
supports hybrid Java/Scala codebases at the moment, although that may change
84-
soon thanks to lsif-java :)
84+
soon thanks to scip-java :)
8585

8686
## Tests are written in Scala
8787

@@ -95,4 +95,4 @@ write tests because:
9595
- Multiline literal strings in Scala make it easy to write unit tests for source
9696
code (which is always multiline). Modern versions of Java support multiline
9797
string literals, but they're not supported in Java 8, which is supported by
98-
lsif-java.
98+
scip-java.

docs/design.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,19 @@ This project is implemented as a
88
that generates one
99
[SemanticDB](https://scalameta.org/docs/semanticdb/specification.html) file for
1010
every `*.java` source file. After compilation completes, the SemanticDB files
11-
are processed to produce LSIF.
11+
are processed to produce SCIP.
1212

13-
![A three stage pipeline that starts with a list of Java sources, creates a list of SemanticDB files that then become a single LSIF index.](assets/semanticdb-javac-pipeline.svg)
13+
![A three stage pipeline that starts with a list of Java sources, creates a list of SemanticDB files that then become a single SCIP index.](assets/semanticdb-javac-pipeline.svg)
1414

1515
### Why Java compiler plugin?
1616

17-
There are several benefits to implementing lsif-java as a compiler plugin:
17+
There are several benefits to implementing scip-java as a compiler plugin:
1818

1919
- **Simple installation**: compiler plugins are enabled with the `-Xplugin`
2020
compiler option. All Java build tools support a way to customize compiler
2121
options, simplifying installation.
2222
- **Language fidelity**: by using the Java compiler to produce semantic
23-
information, we ensure that the produced LSIF data is accurate even as new
23+
information, we ensure that the produced SCIP data is accurate even as new
2424
Java language versions with new language features are released.
2525
- **Environment fidelity**: by hooking into the compilation process of the build
2626
tool, we minimize the risk of diverging from the CI build environment such as
@@ -31,16 +31,16 @@ There are several benefits to implementing lsif-java as a compiler plugin:
3131

3232
SemanticDB is Protobuf schema for information about symbols and types in Java
3333
programs, Scala programs and other languages. There are several benefits to
34-
using SemanticDB as an intermediary representation for LSIF:
34+
using SemanticDB as an intermediary representation for SCIP:
3535

3636
- **Simplicity**: It's easy to translate a single Java source file into a single
3737
SemanticDB file inside a compiler plugin. It's more complicated to produce
38-
LSIF because compiler plugins does not have access to a project-wide context,
38+
SCIP because compiler plugins does not have access to a project-wide context,
3939
which is necessary to produce accurate definitions and hovers in multi-module
4040
projects with external library dependencies.
4141
- **Performance**: SemanticDB is fast to write and read. Each compilation unit
4242
can be processed independently to keep memory usage low. The final conversion
43-
from SemanticDB to LSIF can be safely parallelized.
43+
from SemanticDB to SCIP can be safely parallelized.
4444
- **Cross-language**: SemanticDB has a
4545
[spec](https://scalameta.org/docs/semanticdb/specification.html) for Java and
4646
Scala enabling cross-language navigation in hybrid Java/Scala codebases.
@@ -50,5 +50,5 @@ using SemanticDB as an intermediary representation for LSIF:
5050
the classpath alone (no source code) and from the syntax tree of an individual
5151
source file (no classpath). This flexibility allows the
5252
[Metals](https://scalameta.org/metals/) language server to index codebases
53-
from a variety of different inputs, and will be helpful for lsif-java in the
53+
from a variety of different inputs, and will be helpful for scip-java in the
5454
future to unblock cross-repository navigation.

0 commit comments

Comments
 (0)