-
Notifications
You must be signed in to change notification settings - Fork 949
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
InteillJ stucks in recompiling with Grails 6.2.0 once groovy file changes #13525
Comments
I can't say if this is something that should be fixed by JetBrains or Grails, but I did figure out a workaround. Instead of creating a Run/Debug Configuration using a Grails or Micronaut template, use a Gradle template and enter "bootRun" as the task. |
Also, you do of course still need |
Thanks so much. This setting really fixed this issue. BTW. Since some time IntelliJ cannot recognize grails project and we have to use gradle - application - bootRun. And also ctrl + alt + G cannot open grails command prompt. Any clues? Thanks in advance. |
Some of what we're talking about here probably belongs in the discussions section rather than issues section, or even the JetBrains YouTrack issue tracker. With Grails 6.2.0, the current IntelliJ Grails plugin (version 241.14494.158) stopped working. This is why the Run Grails Command dialog doesn't appear when you press CTRL + ALT + G. A workaround for this is to add However, the Run Grails Command still won't work. It hasn't worked since 6.0.0. The dialog will appear when you press CTRL + ALT + G, but the commands won't run successfully. If you run "--version" from Run Grails Command, it will report "Grails Version: 6.1.2", but you'll see it's running the commands like this There's a workaround for running Grails commands as well. The Run/Debug workaround is pretty transparent, however this workaround will be a bit disruptive to your workflow. This will involve running the commands manually from the terminal. Since there's no longer Grails wrapper, you'll have to install the new Grails CLI (https://grails.org/blog/2023-03-29-grails-6-m2.html). If you're able to use SDKMan this is pretty trivial. If for whatever reason you're not able to, this is actually pretty annoying as it's a more manual process and I haven't seen any guidance on how to automatically switch CLI versions per project. If you're in this situation it seems like it's up to you to decide on a way to change your GRAILS_HOME environment variable to the correct path. The disruptive part for you will be initially installing the new CLI and getting accustomed to running the commands from somewhere else. Using "Run Grails Command" or for example right clicking on the services folder to generate a new Grails service from the context menu was pretty convenient, but I'd say running commands from the terminal is as fast or faster. |
Thanks so much again for such detailed explanations. |
Related issues #13512 IDEA-353327 |
Give it a try on the Grails 6.2.1 release: https://grails.org/blog/2024-10-03-introducing-grails-6-2-1.html |
Hi James,
Thanks for your kindly reminder. I've already upgraded my Grails 6.2.0 project to 6.2.1. The new cli works great. But it still needs org.springframework.boot:spring-boot-devtools to auto re-comiple my code once change detected.
I love Grails framework and thanks for your work.
Best Regards,
Hui
…________________________________
From: James Fredley ***@***.***>
Sent: Friday, October 4, 2024 21:00
To: grails/grails-core ***@***.***>
Cc: ghostfox911 ***@***.***>; Author ***@***.***>
Subject: Re: [grails/grails-core] InteillJ stucks in recompiling with Grails 6.2.0 once groovy file changes (Issue #13525)
Give it a try on the Grails 6.2.1 release: https://grails.org/blog/2024-10-03-introducing-grails-6-2-1.html
—
Reply to this email directly, view it on GitHub<#13525 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAQ3HPLT7RGV4DA3JKJTXYTZZ2GPBAVCNFSM6AAAAABJPWKPGCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOJTGY2TKMZTGI>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
@ghostfox911 Doesn't your app restart automatically after auto-recompile code with Spring-dev-tool? We are facing alot issue due to this even minor change in controller or service restarting whole app in the background automatically. |
spring-boot-devtools is the route for Grails 4, 5 and 6. Grails 7 SNAPSHOTS are currently working with https://github.com/HotswapProjects/HotswapAgent You also need groovy hotswap: https://andrewclement.blogspot.com/2010/03/groovy-eclipse-groovy-hotswap-support.html |
Issue description
Environment
Previous with grails-6.1.2 everything works. When running grails-6.1.2 project in IntelliJ in debug mode IDE can auto recompile and re-run project once groovy file updates.
But after upgraded to grails-6.2.0 once groovy file updated IDE stucked in recompiling and never restarted project. You have to manully click on re-run button.
I tried to clear all caches and rebuild project but nothing helped.
Does anyone have same issue?
The text was updated successfully, but these errors were encountered: