-
Notifications
You must be signed in to change notification settings - Fork 492
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8335218: Eclipse Config: Remove Gradle Integration #1491
8335218: Eclipse Config: Remove Gradle Integration #1491
Conversation
👋 Welcome back angorya! A progress list of the required criteria for merging this PR into |
@andy-goryachev-oracle This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 12 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
Reviewers: @nlisker This will need discussion among and review by the Eclipse users on the list. /reviewers 2 |
@kevinrushforth |
+1 for this change from me. I use VS Code for development, on the marketplace most popular and recommended Java support extension is the Red Hat extension which is essentially repackaged Eclipse. It was always frustrating to try and open JFX only to find out that something doesn't load correctly because the plugin overwrote .project and .classpath files. I checked this PR and with default extension settings it loads properly. All regular features also work fine, so the plugin definitely works correctly after this PR. I only noticed that there are still modified |
@lukostyra thank you for testing! there should be no changes made to the .project or any other files. could you reset your workspace and maybe try again? if the changes do appear, what are they? |
Continuing the mailing list discussion with more technical details. Gradle tries to configure Eclipse based on its build file. This includes things like source folders, compiler settings, dependencies and others. In the cases that I have tried in my projects, this works well. One problem that still remains with this configuration is that it's not aware of the locations of the modules. This causes missing module errors when launching, which require This tends to be the preferred way to do things from my experience since you don't need to push eclipse-specific files to the repo. The gradle files need to be there anyway, so it makes sense to configure eclipse from them and you maintain uniformity between the different development environments. Where this fails is with OpenJFX projects. The monolithic and old gradle file uses conventions from old gradle versions. This causes faulty generation of the eclipse files with and without the eclipse plugin. For example, all the source folders ( The problem presented in the issue has 2 solutions:
I'm fine with either since I find the one-time action to be cheap. By the way, with this change you will also have to update the wiki page to a state where the Java import is the standard and there's an opt-in for the Gradle integration. @hjohn Do you have any remarks? |
I personally don't launch build tools from the IDE (neither Gradle, nor Maven) but only use such tools to import projects; after the import I expect the IDE to be able to build and run tests without intervention of any build tool. I will use the build tooling (usually on the command line) only as a last resort if I can't get it to work that way (which is sometimes the case for a complicated project like JavaFX, especially when I need to run a non-headless test). Importing and working this way works for almost any project, but never has worked for me with JavaFX (which was a big barrier for me when I first tried contributing to FX -- I even tried switching IDE's, but it wasn't much better there either). What annoys me the most with the FX project is the inability to run certain tests directly from the IDE by right clicking and selecting I doubt however this change will make this any better or worse :) So, I'm fine with either solution here. As I don't use Gradle integration, I'd lean slightly to just removing it, or alternatively, fixing the problems in the gradle build so Buildship recognizes it properly. Since I suspect the latter is not an easy task, removing the Gradle nature seems like a good alternative. |
@andy-goryachev-oracle I tried it again after clearing the workspace folder and they do appear again. I also had some old git index settings applied which hid most of .project changes. Turns out that basically all All of <filteredResources>
<filter>
<id>1720448829339</id>
<name></name>
<type>30</type>
<matcher>
<id>org.eclipse.core.resources.regexFilterMatcher</id>
<arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
</matcher>
</filter>
</filteredResources> Regardless, the change does prevent the plugin from modifying |
Thank you @lukostyra for checking!
This change looks innocuous enough - at least it does not break the build. Why VSCode does it is a mystery, but I suppose that's a bug in VSCode plugin. |
Yep, same issue here, and same workaround. I wonder if it is possible to create a separate project(s) for tests that will have all the necessary dependencies added (as a separate issue). For example, headless tests require addition of these vm args:
while system tests are slightly different:
|
thank you @nlisker for your thoughts!
so this is a non-standard setup, meaning it is not described in the https://wiki.openjdk.org/display/OpenJFX/Using+an+IDE#UsinganIDE-UsingEclipse wiki page. Still, I would like to propose we proceed with this change even if it is a temporary one (until the Buildship plug-in gets mature enough to be able to import the gradle configuration cleanly) because it prevents the said Buildship from messing up the project files and breaking the build every time the project(s) are imported or reopened. |
The
Yes, #1232 should be part of the effort to simplify the gradle build file. It will take several iterations on that file to modernize OpenJFX's build.
Yes, it's not described in the wiki because it can't read the gradle file properly to begin with.
I'm fine with this. Just noting that we're not waiting on Buildship to catch up, we need our |
thank you for reviewing! will integrate after the fork. |
/integrate |
Going to push as commit 0ce4e6f.
Your commit was automatically rebased without conflicts. |
@andy-goryachev-oracle Pushed as commit 0ce4e6f. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
This might be controversial. I am proposing to remove the Gradle integration in the Eclipse config files.
Problem
Eclipse Gradle integration (Buildship) cannot import the OpenJFX build.gradle cleanly. Every time the project is imported into a new workspace (or re-opened after being closed) it executes Gradle, creates and modifies a number of Eclipse .project and .classpath files, all of which need to be reverted for Eclipse workspace to become usable again.
Solution
Remove Gradle nature from the Eclipse project files. This change only affects Eclipse config files and does not impact build.gradle or other IDEs.
Advantages
NOTES:
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jfx.git pull/1491/head:pull/1491
$ git checkout pull/1491
Update a local copy of the PR:
$ git checkout pull/1491
$ git pull https://git.openjdk.org/jfx.git pull/1491/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 1491
View PR using the GUI difftool:
$ git pr show -t 1491
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jfx/pull/1491.diff
Webrev
Link to Webrev Comment