@@ -19,6 +19,10 @@ object SourcegraphPlugin extends AutoPlugin {
1919 " Task to upload the LSIF index to Sourcegraph to enable precise code intelligence."
2020 )
2121 val sourcegraphLsif : TaskKey [File ] =
22+ taskKey[File ](" Alias for the sourcegraphCompile command." )
23+ val sourcegraphScip : TaskKey [File ] =
24+ taskKey[File ](" Alias for the sourcegraphCompile command." )
25+ val sourcegraphCompile : TaskKey [File ] =
2226 taskKey[File ](
2327 " Task to generate a single LSIF index for all SemanticDB files in this workspace."
2428 )
@@ -30,8 +34,8 @@ object SourcegraphPlugin extends AutoPlugin {
3034 taskKey[File ](
3135 " Task to generate a single LSIF index for all SemanticDB files in this workspace."
3236 )
33- val sourcegraphLsifJavaVersion : SettingKey [String ] =
34- settingKey[String ](" The version of the `lsif -java` command-line tool." )
37+ val sourcegraphScipJavaVersion : SettingKey [String ] =
38+ settingKey[String ](" The version of the `scip -java` command-line tool." )
3539 val sourcegraphSemanticdbDirectories : TaskKey [List [File ]] =
3640 taskKey[List [File ]](
3741 " Task to compile all projects in this build and aggregate all SemanticDB directories."
@@ -79,9 +83,9 @@ object SourcegraphPlugin extends AutoPlugin {
7983 import autoImport ._
8084
8185 override lazy val buildSettings : Seq [Def .Setting [_]] = List (
82- sourcegraphLsifJavaVersion := {
86+ sourcegraphScipJavaVersion := {
8387 scala.util.Properties
84- .propOrElse(" lsif -java-version" , Versions .semanticdbJavacVersion())
88+ .propOrElse(" scip -java-version" , Versions .semanticdbJavacVersion())
8589 },
8690 sourcegraphTargetRoots := {
8791 val directories =
@@ -93,7 +97,7 @@ object SourcegraphPlugin extends AutoPlugin {
9397 if (directoryArguments.isEmpty) {
9498 throw new TaskException (
9599 " Can't upload LSIF index to Sourcegraph because there are no SemanticDB directories. " +
96- " To fix this problem, run the `sourcegraphEnable` command before `sourcegraphLsif ` like this: sbt sourcegraphEnable sourcegraphLsif "
100+ " To fix this problem, run the `sourcegraphEnable` command before `sourcegraphCompile ` like this: sbt sourcegraphEnable sourcegraphCompile "
97101 )
98102 }
99103 directoryArguments
@@ -110,14 +114,17 @@ object SourcegraphPlugin extends AutoPlugin {
110114 )
111115 out
112116 },
113- sourcegraphLsif := {
114- val out = target.in(Sourcegraph ).value / " dump.lsif"
117+ sourcegraphLsif := sourcegraphCompile.value,
118+ sourcegraphScip := sourcegraphCompile.value,
119+ sourcegraphCompile := {
120+ val out = target.in(Sourcegraph ).value / " index.scip"
115121 out.getParentFile.mkdirs()
116122 runProcess(
117123 sourcegraphCoursierBinary.value ::
118124 " launch" ::
119- " --contrib" ::
120- s " lsif-java: ${sourcegraphLsifJavaVersion.value}" ::
125+ s " com.sourcegraph:scip-java_2.13: ${sourcegraphScipJavaVersion.value}" ::
126+ " -M" ::
127+ " com.sourcegraph.scip_java.ScipJava" ::
121128 " --" ::
122129 " index-semanticdb" ::
123130 s " --output= $out" ::
@@ -134,11 +141,11 @@ object SourcegraphPlugin extends AutoPlugin {
134141 " in https://github.com/sourcegraph/sbt-sourcegraph/blob/main/README.md"
135142 )
136143 }
137- val in = sourcegraphLsif .value
144+ val in = sourcegraphCompile .value
138145 val uploadCommand = List [Option [String ]](
139146 Some (sourcegraphSrcBinary.value),
140147 sourcegraphEndpoint.value.map(url => s " --endpoint= $url" ),
141- Some (" lsif " ),
148+ Some (" code-intel " ),
142149 Some (" upload" ),
143150 Option (System .getenv(" GITHUB_TOKEN" ))
144151 .map(token => s " --github-token= $token" ),
0 commit comments