You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Alessandro Benedetti (Jira)" <ji...@apache.org> on 2022/05/26 20:49:00 UTC
[jira] [Commented] (LUCENE-10510) Check module access prior to running gjf/spotless/errorprone tasks
[ https://issues.apache.org/jira/browse/LUCENE-10510?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17542666#comment-17542666 ]
Alessandro Benedetti commented on LUCENE-10510:
-----------------------------------------------
I spent roughly one hour fighting with Gradle, Iwas trying to run ./gradlew tidy before the ./gradlew check:
I have a JDK 17 and all I get is always a vague:
"> Certain gradle tasks and plugins require access to jdk.compiler internals, your gradle.properties might have just been generated or could be out of sync (see help/localSettings.txt)"
I explored the code that generates the exception:
{code:java}
task checkJdkInternalsExportedToGradle() {
doFirst {
def jdkCompilerModule = ModuleLayer.boot().findModule("jdk.compiler").orElseThrow()
def gradleModule = getClass().module
def internalsExported = [
"com.sun.tools.javac.api",
"com.sun.tools.javac.file",
"com.sun.tools.javac.parser",
"com.sun.tools.javac.tree",
"com.sun.tools.javac.util"
].stream()
.allMatch(pkg -> jdkCompilerModule.isExported(pkg, gradleModule))
if (!internalsExported) {
throw new GradleException(
"Certain gradle tasks and plugins require access to jdk.compiler" +
" internals, your gradle.properties might have just been generated or could be" +
" out of sync (see help/localSettings.txt)")
}
}
{code}
And I also read the "help/localSettings.txt" with no success.
Maybe I am tired tonight, am I missing something?
I couldn't find any recommendation for how to fix the problem.
If I am not missing anything, we should do something as I assume a random new contributor would be lost
> Check module access prior to running gjf/spotless/errorprone tasks
> ------------------------------------------------------------------
>
> Key: LUCENE-10510
> URL: https://issues.apache.org/jira/browse/LUCENE-10510
> Project: Lucene - Core
> Issue Type: Improvement
> Reporter: Dawid Weiss
> Assignee: Dawid Weiss
> Priority: Trivial
> Fix For: 9.2
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> PR at: [https://github.com/apache/lucene/pull/802]
--
This message was sent by Atlassian Jira
(v8.20.7#820007)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org