Skip to content

Conversation

@olafurpg
Copy link
Contributor

Previously, the index command didn't work with Gradle projects that
use the Playframework plugin. The codebase would compile, but no LSIF
index would be created. Now, everything should work as expected.

The problem was that the Playframework plugin uses the Scala plugin to
compile auto-generated template and routes files. The Scala plugin runs
Zinc (Scala incremental compiler) in a daemon process behind the scenes
so it ignores the javac fork settings that lsif-java index adds to
the build.

The fix is to enable the SemanticDB Java agent on the Zinc daemon
process and to add one more injection point to ensure that the
SemanticDB compiler plugin is always on the classpath for all projects.

Fixes #170

Previously, the `index` command didn't work with Gradle projects that
use the Playframework plugin. The codebase would compile, but no LSIF
index would be created. Now, everything should work as expected.

The problem was that the Playframework plugin uses the Scala plugin to
compile auto-generated template and routes files. The Scala plugin runs
Zinc (Scala incremental compiler) in a daemon process behind the scenes
so it ignores the `javac` fork settings that `lsif-java index` adds to
the build.

The fix is to enable the SemanticDB Java agent on the Zinc daemon
process and to add one more injection point to ensure that the
SemanticDB compiler plugin is always on the classpath for all projects.
Copy link
Contributor

@Strum355 Strum355 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! 🎉

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Index command does nothing in Gradle project with Playframework plugin enabled

2 participants