-
Notifications
You must be signed in to change notification settings - Fork 193
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
Unable to switch groovy compiler version. Error in the UI (red elements) #981
Comments
This has been discussed at length in #317. If you close all your editors and disable auto build, the compiler switcher may work better. Otherwise the workaround available is to uninstall any compiler versions newer than the one you want to use. This is a timing-based issue, so it is hard to make much progress on it without a high effort investment. |
I read some stuff in issue #317. Is the issue in eclipse, M2E or the groovy plugin? I know timing issues are a pain to fix but I get this error all the time without any editor opened. |
Also, if the quick work-around is to remove the newer version, could there not be a UI thing that does this or better yet, why cannot it be removed automatically. This leaves a really sour experience to the unaware user. It took me a few try to understand that the switch was causing the issue. This is intended as a constructive not bashing comment. |
Sorry that #317 and the linked issues are not light reading. I can sum up and say that the compiler switcher feature is desirable for those that use different Groovy versions between different projects or want to try out pre-releases like Groovy 3. The switcher uses some OSGi "tricks" to unload the unused Groovy compiler/runtime bundles just after the I am reluctant to remove the switching feature because it does work in some cases -- sorry I can't be more specific about when it works for sure and when it breaks down. I am also reluctant to add a warning message to the feature. There are other known issues in the tooling and my opinion is that an issue ticket here is the proper course of action. I do sympathize that this issue can become quite a blocker to using Groovy and Java as well. I have done some investigation and made some changes to try and reduce the number of bundles that get reloaded. What needs to happen next is some investigation to understand what GDT/JDT components are loading before the |
Here is an example of the "-debug" output that includes the Groovy compiler switcher:
At the end you can see "Starting Groovy-Eclipse compiler resolver." This is followed by a list of the bundles it is choosing from and finally a list of the bundles that got refreshed (that is, bundles that had a link to the Groovy compiler/runtime bundle). In this case, since all refreshed bundles were still in the STARTING state, the bundle switch completed successfully and I am able to use the Java and Groovy editors normally. Update: Even when I leave a Groovy Editor and the Package Explorer open, I am able to restart and have Groovy 2.4 switched on without issue. So there must be something that is not in my JavaEE workspace that is starting a GDT/JDT component earlier. |
|
I am approaching a fix from 3 angles:
|
I installed greclipse in eclipse 2019-09 from https://dist.springsource.org/snapshot/GRECLIPSE/e4.13. When I look at the groovy compiler preferences it is using 3.0.0-rc-1. If I click the switch to 2.5.8.v201910292244-e1909 then when eclipse restarts I get errors in the user interface: (red circles with X in them and messages such as: Failed to create the part's controls in Enterprise Explorer and invalid registry object in a text editor window).
If I switch back to version 3.0.0-rc-1 then everything gets back to normal. The net effect is that I cannot switch version.
I have attached the .log in the .metadata workspace folder
.log
The text was updated successfully, but these errors were encountered: