Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scip-java index doesn't work for Scala 3 projects in sbt #478

Open
ckipp01 opened this issue Aug 9, 2022 · 1 comment
Open

scip-java index doesn't work for Scala 3 projects in sbt #478

ckipp01 opened this issue Aug 9, 2022 · 1 comment

Comments

@ckipp01
Copy link
Contributor

ckipp01 commented Aug 9, 2022

The problem

When running scip-java index on a pure Scala 3 project you won't get any semanticDB produced and therefore no scip file will be produced.

Steps to reproduce

  1. g8 scala/scala3.g8 and accept all the defaults
  2. run scip-java index on the project
  3. See the following output
❯ scip-java index
$ sbt sourcegraphEnable sourcegraphScip
[info] welcome to sbt 1.7.1 (Temurin Java 1.8.0_332)
[info] loading settings for project global-plugins from plugins.sbt ...
[info] loading global plugins from /Users/ckipp/.sbt/1.0/plugins
[info] loading settings for project scala-3-project-template-build from sourcegraph_generated.sbt ...
[info] loading project definition from /Users/ckipp/Documents/scratch-workspace/scala-3-project-template/project
[info] loading settings for project root from build.sbt ...
[info] set current project to Scala 3 Project Template (in build file:/Users/ckipp/Documents/scratch-workspace/scala-3-project-template/)
[info] set current project to Scala 3 Project Template (in build file:/Users/ckipp/Documents/scratch-workspace/scala-3-project-template/)
[info] compiling 1 Scala source to /Users/ckipp/Documents/scratch-workspace/scala-3-project-template/target/scala-3.1.3/classes ...
[info] done compiling
[info] compiling 1 Scala source to /Users/ckipp/Documents/scratch-workspace/scala-3-project-template/target/scala-3.1.3/test-classes ...
[info] done compiling
[error] (ThisBuild / sourcegraphTargetRoots) com.sourcegraph.sbtsourcegraph.SourcegraphPlugin$TaskException: Can't upload LSIF index to Sourcegraph because there are no SemanticDB directories. To fix this problem, run the `sourcegraphEnable` command before `sourcegraphCompile` like this: sbt sourcegraphEnable sourcegraphCompile
[error] Total time: 4 s, completed Aug 9, 2022 1:21:22 PM

Expectation

I'd expect this to work for Scala 3 projects giving me a index.scip file.

Notes

More than likely the fix will need to be in https://github.com/sourcegraph/sbt-sourcegraph since that's what's controlling everything, but since I experienced it using scip-java I'm creating here.

@ckipp01 ckipp01 changed the title scip-java index doesn't work for Scala 3 projects scip-java index doesn't work for Scala 3 projects in sbt Aug 9, 2022
@olafurpg olafurpg self-assigned this Aug 17, 2022
@kubukoz
Copy link

kubukoz commented Oct 15, 2022

I'm getting a similar result in a Scala 2.13.10 project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants