Skip to content

Load Last-Used Compiler Version on Startup #1229

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

Closed
hankolerd opened this issue Feb 18, 2021 · 4 comments
Closed

Load Last-Used Compiler Version on Startup #1229

hankolerd opened this issue Feb 18, 2021 · 4 comments

Comments

@hankolerd
Copy link

Using the 4.0.0 release in Eclipse 4.18, every time I start Eclipse it defaults back to the 4.0.0 compiler. I would like to see the ability for the plugin to remember the last used version on the workspace, and always start with that version. This way I can use different workspaces for different projects or branches that require specific versions of Groovy, without having to always double-start the workspace to get the correct compiler version selected, i.e.:

  1. Start Eclipse and select a workspace
  2. Go to Preferences->Groovy->Compiler and select "Switch to ..." action and restart the workspace again
@eric-milles
Copy link
Member

Can you try this: #1224 (comment)

@hankolerd
Copy link
Author

Can you try this: #1224 (comment)

Oh my - yes that was it. Sorry for the duplicate bug, I searched but guessed I missed it. Thanks!

@hankolerd
Copy link
Author

Actually @eric-milles, I may have spoken too soon. I found that compiler level still gets reset to 4.0 each time even without Preference Recording enabled.

I see my workspace has:
.metadata/org.eclipse.core.runtime/.settings/org.codehaus.groovy.eclipse.compilerResolver.prefs:

eclipse.preferences.version=1
groovy.compiler.level=24

After manually changing this file to have groovy.compiler.level=25 then workspace starts with 2.5 as expected. But for some reason when using the Groovy Preferences to switch to a different compiler, it does not appear to update this preference file on disk.

If I create a fresh workspace, it looks the preference file gets set to 25 correctly when switching the compiler level through Preferences, so not sure if a permission issue or what exactly is going on.

@hankolerd
Copy link
Author

I spoke too soon again - even with groovy.compiler.level=25 in the preference file, even still most times the workspace will start with 4.0 as the default. It seems only way to be sure is just to check preference on each workspace startup and use the Switch To Compiler action in the Preferences page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants