Skip to content

Conversation

@olafurpg
Copy link
Contributor

Also adds a custom error message for users on Gradle v6.7 using the
experimental toolchains feature. We can only support toolchains from
version v6.8.

|try {
| java.nio.file.Files.write(
| java.nio.file.Paths.get('$gradleVersionPath'),
| [gradle.gradleVersion],
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this some scala feature Im not aware of?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Which feature? This is a Groovy script, where you have literal syntax [a] for lists.

Comment on lines +44 to +55
case Some(gradleVersion)
if gradleVersion.startsWith("6.7") &&
toolchains.toolchains.nonEmpty =>
index
.app
.error(
"lsif-java does not support Gradle 6.7 when used together with Java toolchains. " +
"To fix this problem, upgrade to Gradle version 6.8 or newer and try again."
)
CommandResult(1, Nil)
case _ =>
runCompileCommand(toolchains)
Copy link
Contributor

Choose a reason for hiding this comment

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

Will this still call runCompileCommand if if gradleVersion.startsWith("6.7") && toolchains.toolchains.nonEmpty evaluates to false?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, case _ => is a catchall

Also adds a custom error message for users on Gradle v6.7 using the
experimental toolchains feature. We can only support toolchains from
version v6.8.
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.

2 participants