You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "dweiss (via GitHub)" <gi...@apache.org> on 2025/09/29 13:40:49 UTC
[PR] Try to fix eclipse configuration after upgrading to gradle 9.1.0. [lucene]
dweiss opened a new pull request, #15252:
URL: https://github.com/apache/lucene/pull/15252
Fixes #15250, hopefully.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Try to fix eclipse configuration after upgrading to gradle 9.1.0. [lucene]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #15252:
URL: https://github.com/apache/lucene/pull/15252#issuecomment-3347033025
This PR does not have an entry in lucene/CHANGES.txt. Consider adding one. If the PR doesn't need a changelog entry, then add the skip-changelog label to it and you will stop receiving this reminder on future updates to the PR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Try to fix eclipse configuration after upgrading to gradle 9.1.0. [lucene]
Posted by "dweiss (via GitHub)" <gi...@apache.org>.
dweiss commented on code in PR #15252:
URL: https://github.com/apache/lucene/pull/15252#discussion_r2388045313
##########
build-tools/build-infra/src/main/java/org/apache/lucene/gradle/plugins/ide/EclipseSupportPlugin.java:
##########
@@ -172,23 +153,57 @@ private void configureEclipseIdeSettings(Project project, String eclipseJavaVers
task.dependsOn(luceneEclipseJdt);
});
+ // Add gradle plugin portal to the source repository list and
+ // apply any ecj source repository hackery the same way as everywhere.
+ project.getRepositories().gradlePluginPortal();
+ project.apply(conf -> conf.from(project.file("build-tools/build-infra/ecj-source.gradle")));
+
tasks
.withType(GenerateEclipseClasspath.class)
.named("eclipseClasspath")
.configure(
task -> {
+ var classpath = task.getClasspath();
+ classpath.setDefaultOutputDir(project.file("build/eclipse"));
+ classpath.setDownloadJavadoc(false);
+ classpath.setDownloadSources(true);
+
+ // Collect dependencies from selected configurations
+ // and copy them over to a local configuration.
+ List<Dependency> subdependencies = new ArrayList<>();
Review Comment:
I don't think it's 1:1 the same as before - dependency resolution can end up with different outputs... in theory at least. But it seems to work for me.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Try to fix eclipse configuration after upgrading to gradle 9.1.0. [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on code in PR #15252:
URL: https://github.com/apache/lucene/pull/15252#discussion_r2388202920
##########
build-tools/build-infra/src/main/java/org/apache/lucene/gradle/plugins/ide/EclipseSupportPlugin.java:
##########
@@ -172,23 +153,57 @@ private void configureEclipseIdeSettings(Project project, String eclipseJavaVers
task.dependsOn(luceneEclipseJdt);
});
+ // Add gradle plugin portal to the source repository list and
+ // apply any ecj source repository hackery the same way as everywhere.
+ project.getRepositories().gradlePluginPortal();
Review Comment:
why do we need this?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Try to fix eclipse configuration after upgrading to gradle 9.1.0. [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on PR #15252:
URL: https://github.com/apache/lucene/pull/15252#issuecomment-3347112919
This is a bug in the ecj version that ships with my Eclipse release. The field is definitively initialized in the `this()` ctor called before. Maybe its another kind of Heisenbug!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Try to fix eclipse configuration after upgrading to gradle 9.1.0. [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on code in PR #15252:
URL: https://github.com/apache/lucene/pull/15252#discussion_r2388068252
##########
build-tools/build-infra/src/main/java/org/apache/lucene/gradle/plugins/ide/EclipseSupportPlugin.java:
##########
@@ -172,23 +153,57 @@ private void configureEclipseIdeSettings(Project project, String eclipseJavaVers
task.dependsOn(luceneEclipseJdt);
});
+ // Add gradle plugin portal to the source repository list and
+ // apply any ecj source repository hackery the same way as everywhere.
+ project.getRepositories().gradlePluginPortal();
+ project.apply(conf -> conf.from(project.file("build-tools/build-infra/ecj-source.gradle")));
+
tasks
.withType(GenerateEclipseClasspath.class)
.named("eclipseClasspath")
.configure(
task -> {
+ var classpath = task.getClasspath();
+ classpath.setDefaultOutputDir(project.file("build/eclipse"));
+ classpath.setDownloadJavadoc(false);
+ classpath.setDownloadSources(true);
+
+ // Collect dependencies from selected configurations
+ // and copy them over to a local configuration.
+ List<Dependency> subdependencies = new ArrayList<>();
Review Comment:
that was my question, too. You create a clone of the config, but how could they differ. I would say it would resolve the config separately (like a new project with all merged configs, correct?).
It may differ, I am opening the project with Groovy, works!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Try to fix eclipse configuration after upgrading to gradle 9.1.0. [lucene]
Posted by "dweiss (via GitHub)" <gi...@apache.org>.
dweiss commented on code in PR #15252:
URL: https://github.com/apache/lucene/pull/15252#discussion_r2388579249
##########
build-tools/build-infra/src/main/java/org/apache/lucene/gradle/plugins/ide/EclipseSupportPlugin.java:
##########
@@ -172,23 +153,57 @@ private void configureEclipseIdeSettings(Project project, String eclipseJavaVers
task.dependsOn(luceneEclipseJdt);
});
+ // Add gradle plugin portal to the source repository list and
+ // apply any ecj source repository hackery the same way as everywhere.
+ project.getRepositories().gradlePluginPortal();
Review Comment:
There are plugin dependencies (in the build-infra) that wouldn't be resolved from maven central alone and this configuration for Eclipse is set up in the root project (which only has mavenCentral as the source repository).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Try to fix eclipse configuration after upgrading to gradle 9.1.0. [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on PR #15252:
URL: https://github.com/apache/lucene/pull/15252#issuecomment-3347614192
I found another bug with ECJ: https://github.com/eclipse-jdt/eclipse.jdt.core/issues/4449
We can't trust Java 25 compilation with ECJ at the current stage. So all errors or non-errors should be carefully inspected.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Try to fix eclipse configuration after upgrading to gradle 9.1.0. [lucene]
Posted by "dweiss (via GitHub)" <gi...@apache.org>.
dweiss commented on code in PR #15252:
URL: https://github.com/apache/lucene/pull/15252#discussion_r2388080358
##########
build-tools/build-infra/src/main/java/org/apache/lucene/gradle/plugins/ide/EclipseSupportPlugin.java:
##########
@@ -172,23 +153,57 @@ private void configureEclipseIdeSettings(Project project, String eclipseJavaVers
task.dependsOn(luceneEclipseJdt);
});
+ // Add gradle plugin portal to the source repository list and
+ // apply any ecj source repository hackery the same way as everywhere.
+ project.getRepositories().gradlePluginPortal();
+ project.apply(conf -> conf.from(project.file("build-tools/build-infra/ecj-source.gradle")));
+
tasks
.withType(GenerateEclipseClasspath.class)
.named("eclipseClasspath")
.configure(
task -> {
+ var classpath = task.getClasspath();
+ classpath.setDefaultOutputDir(project.file("build/eclipse"));
+ classpath.setDownloadJavadoc(false);
+ classpath.setDownloadSources(true);
+
+ // Collect dependencies from selected configurations
+ // and copy them over to a local configuration.
+ List<Dependency> subdependencies = new ArrayList<>();
Review Comment:
I think you can theoretically imagine a situation with two configurations having a transitive dependency in different versions - then it would resolve this differently... I think. I wouldn't worry about it though, it's a hack already.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Try to fix eclipse configuration after upgrading to gradle 9.1.0. [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on PR #15252:
URL: https://github.com/apache/lucene/pull/15252#issuecomment-3347094091
It looks like this works. It creates a new one-time configuration by copying all config entries into it. It's then its own config and can resolve it as wanted. Nice!
Now I see 2 new errors in Eclipse next to the heisenbug with LeafReaderContext:
<img width="1846" height="214" alt="image" src="https://github.com/user-attachments/assets/81cc99c5-13a7-4f73-9057-a48b1c5ea324" />
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Try to fix eclipse configuration after upgrading to gradle 9.1.0. [lucene]
Posted by "dweiss (via GitHub)" <gi...@apache.org>.
dweiss merged PR #15252:
URL: https://github.com/apache/lucene/pull/15252
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Try to fix eclipse configuration after upgrading to gradle 9.1.0. [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on PR #15252:
URL: https://github.com/apache/lucene/pull/15252#issuecomment-3347181135
We don't see the bug in the Gradle build, because we have ECJ I20250926-1800, which has the fix already.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Try to fix eclipse configuration after upgrading to gradle 9.1.0. [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on PR #15252:
URL: https://github.com/apache/lucene/pull/15252#issuecomment-3347151238
There's already a bug open at ECJ and fixed already: https://github.com/eclipse-jdt/eclipse.jdt.core/issues/4416
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org