Skip to content

Releases: sourcegraph/scip-java

scip-java v0.8.4

17 Aug 05:14
Compare
Choose a tag to compare

Improved Java 17 support

Previously, scip-java index would fail in Gradle and Maven projects using Java 17 due to missing --add-exports flags. These flags are now automatically configured for Gradle and Maven when running on Java 17 or newer.

Mill build tool support

The scip-java index command can now automatically index codebases using the Mill build tool (https://com-lihaoyi.github.io/mill/mill/Intro_to_Mill.html). Thank you @ckipp01 for contributing this addition 🙏

Improved Scala indexing

This releases fixes the following code navigation issues related to Scala anonymous classes, implicit conversions, structural types, and overriding fields.

What's Changed

New Contributors

Full Changelog: v0.8.1...v0.8.4

scip-java v0.8.3

17 Aug 08:47
5f274f3
Compare
Choose a tag to compare

scip-java v0.8.1

11 Jun 07:59
41fe317
Compare
Choose a tag to compare

Bugfix: make scip-java index work with sbt builds

The rename from lsif-java to scip-java introduced a bug where it was no longer possible to index sbt builds. This release fixes this bug by updating to the latest version of the sbt-sourcegraph plugin, which now uses scip-java instead of lsif-java.

Pull Requests

scip-java v0.8 with Bazel support and "Find implementations"

08 Jun 15:20
75204f2
Compare
Choose a tag to compare

We are excited to announce the release of scip-java v0.8. The highlights of this release include:

  • New name: the project was previously called "lsif-java" and it has now been renamed into "scip-java" to reflect that it now emits a code indexing format called SCIP by default.
  • Find implementations: it’s now possible to navigate from interfaces and abstract methods to the implementations to their concrete implementations.
  • Bazel support: it’s now possible to use scip-java with Bazel builds.

New name: scip-java

We recently released SCIP, a new protocol that we are using at Sourcegraph to power precise code navigation. Previously, our Java indexer was called lsif-java because it emitted LSIF (Language Server Index Format) by default. We have renamed the indexer into scip-java to reflect that it now emits SCIP by default.

How to upgrade from lsif-java

Migrating from lsif-java to scip-java requires the following steps:

  • Replace all usages of lsif-java with scip-java. The scip-java command-line interface supports the same sub-commands and flags as the old lsif-java interface. The only functional difference is that running scip-java index now produces an index.scip file instead of dump.lsif.
  • Make sure you are using the latest version of the src command-line tool, which you can now optionally install via npm using the command yarn global add @sourcegraph/src. The latest version of src is needed to recognise the new index.scip file, which is generated by scip-java index. Running src precise-intel upload (previously, src lsif upload) accepts both index.scip and dump.lsif files. If you’re not uploading to Sourcegraph, run scip convert --from=index.scip --to=dump.lsif to convert any SCIP payload into LSIF. The scip command-line tool can be installed from here.

Find implementations

Previously, scip-java only supported "Go to definition" and "Find references". This release adds support to "Find implementations" such that you can navigate from an interface or abstract method to their concrete implementation. For example, consider the following type hierarchy

interface Animal {
  String sound();
}
class Dog implements Animal {
  @Override 
  String sound() { return "Woof!"; }
}

The "Find implementations" action navigates from the Animal interface and Animal.sound() method, to the Dog class and Dog.sound() method, respectively.

Bazel support

Previously, scip-java did not have great support for Bazel. It was possible to use scip-java with Bazel but the steps were undocumented and it required awkward workarounds. This release adds proper support for Bazel that is compatible with Bazel's build cache and allows incremental indexing.

It requires custom configuration to WORKSPACE and BUILD files to integrate scip-java with Bazel builds. It's simply not possible for scip-java index command to automatically configure everything like it does for Gradle and Maven while remaining compatible with Bazel's build model.

Check out the documentation on how to get started with configuring Bazel and scip-java.

Pull Requests

lsif-java v0.7.7

28 Feb 17:41
af16d81
Compare
Choose a tag to compare

What's Changed

  • workflows: add pr-auditor and test plans to PR templates by @bobheadxi in #402
  • Promote synthetic definitions into normal definitions if they share names by @olafurpg in #404

New Contributors

Full Changelog: v0.7.6...v0.7.7

lsif-java v0.7.5

18 Feb 16:39
923efaf
Compare
Choose a tag to compare

Improved code navigation for Scala

Previously, "goto defintion" did not work for synthetic symbols such as
case class companion objects or var setter methods.

class Main {
  case class User(name: String)

  var user = User("Susan") // go to definition on `User` did not work

  user = User("John") // go to definition on `user` did not work
}

Now, lsif-java emits occurrences for these synthetic symbols so that "goto definition" works as expected.

  • Emit additional occurrences for synthetic Scala symbols (#398) @olafurpg

Pull Requests

lsif-java v0.7.2

22 Nov 11:49
Compare
Choose a tag to compare

Kotlin hover support

Previously, the hover message only displayed the name of Kotlin symbols. Now, the hover message shows the symbol signature and KDoc.

image

Improved Java 17 support

Running lsif-java index will now use the correct --add-exports flags in more cases when compiling code with Java 17. There are still many situations where users on Java 17 need to manually add the following JVM options

--add-exports jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED
--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED
--add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED
--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
--add-exports jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED

Updated Docker container

The Docker container sourcegraph/lsif-java is now automatically published on every release alongside the Maven Central artifacts. The Docker container is fairly large because it includes pre-installed Java 8, Java 11 and Java 17. If the container size is a problem then we recommend creating your own Docker container with the Java launcher as documented here https://sourcegraph.github.io/lsif-java/docs/getting-started.html#java-launcher

Pull Requests

lsif-java v0.6.11

19 Oct 07:57
2a6cc1f
Compare
Choose a tag to compare

Kotlin support for Gradle projects

Running lsif-java index in Gradle projects will now index Java, Scala and Kotlin sources. Note that Kotlin support is a few feature that's not as feature-complete as the suport for Java and Scala. Please give it a try and report feedback :)

What's Changed

  • Add support for Kotlin Gradle projects by @olafurpg in #351
  • Add support for Kotlin files in lsif-java.json builds by @olafurpg in #350

Full Changelog: v0.6.9...v0.6.11

lsif-java v0.6.9

22 Sep 15:12
d296b26
Compare
Choose a tag to compare

SemanticDB synthetics are now indexed

Previously, "find references" wouldn't show results for Scala implicits or usages of apply methods. Now, these symbol usages are indexed by lsif-java.

Pull Requests

  • Update dependency com.lightbend.sbt:sbt-java-formatter to v0.6.1 (#323) @renovate
  • Update dependency org.scalameta:munit to v0.7.29 (#326) @renovate
  • Update dependency org.rauschig:jarchivelib to v1.2.0 (#329) @renovate
  • Update gradle Docker tag to v7.2.0 (#330) @renovate
  • Update dependency org.flywaydb:flyway-core to v7.15.0 (#328) @renovate
  • Update dependency com.google.cloud.sql:postgres-socket-factory to v1.3.3 (#334) @renovate
  • Update dependency ch.epfl.scala:sbt-scalafix to v0.9.31 (#322) @renovate
  • Update dependency net.bytebuddy:byte-buddy-agent to v1.11.16 (#325) @renovate
  • Update dependency ch.epfl.scala:sbt-bloop to v1.4.9-14-67e8541e (#321) @renovate
  • Return non-zero exit code when missing SemanticDB files (#332) @olafurpg
  • Add index-dependency command to troubleshoot package repo issues. (#331) @olafurpg

lsif-java v0.6.8

27 Aug 22:28
2fed737
Compare
Choose a tag to compare

Scala Gradle support

Previously, running lsif-java index in Gradle projects indexed only the Java parts of the codebase. Now, lsif-java index also indexes Scala code

https://sourcegraph.com/github.com/apache/samza@a7cb039d2d53cbcf207a12fce504066da8bc21cb/-/blob/samza-kv/src/main/scala/org/apache/samza/storage/kv/LoggedStore.scala?L38:69#tab=references

CleanShot 2021-08-26 at 21 11 37@2x

Fixed bug in Gradle projects using annotation processors

Sometimes, lsif-java index would report an error "plug-in not found: semanticdb" in Gradle projects using annotation processors. This bug should be fixed with this release.

Pull Requests

  • Add support for Gradle Scala projects (#316) @olafurpg
  • Properly fix issue with checkerframework Gradle plugin. (#315) @olafurpg
  • Disable checkerframework Gradle plugin for lsif-java index (#314) @olafurpg
  • Add docs for how to manually enable cross-repository navigation (#312) @olafurpg
  • fix LsifBuildTool errors.nonEmpty checks (#310) @Strum355