grails-core icon indicating copy to clipboard operation
grails-core copied to clipboard

Groovy 4 / Spring Boot 3 branch

Open codeconsole opened this issue 1 year ago • 18 comments
trafficstars

Feature description

Any chance you can create a Groovy 4 / Spring Boot 3 branch?

It is long overdue and it is better to have broken branch that can be worked on and contributed to.

Please merge the work you already did somewhere: https://github.com/grails/grails-core/pull/12491

Otherwise it is just going to keep diverging with more and more conflicts otherwise.

Spring Boot 3 was released November 24, 2022.

If there are no plans to upgrade Grails to support it, please let us know and provide some sort of realistic guidance if/when it will occur.

codeconsole avatar Jan 04 '24 21:01 codeconsole

these are different things; updating to Spring-Boot 3 will raise the minimal Java version to 17 (and probably break stuff), the Groovy update doesn't have that.

both probably only make sense for a major version increment

tubbynl avatar Jan 12 '24 10:01 tubbynl

@tubbynl that was the point of requesting a branch. Both these things are long overdue as well as upgrading to JDK 17 (which was implied).

codeconsole avatar Jan 12 '24 17:01 codeconsole

We've waited too long, and maybe they've done their best. I have spent a lot of time last year going to the upgrade on my own, and after more than six months of hard work, it was all done. Now that GoBoots has been renamed to Grace Framework and is publicly available on GitHub, I think it's time for it to be accessible to anyone who loves Grails.

rainboyan avatar Jan 13 '24 03:01 rainboyan

The most worrying points are :

  • the lack of official communication on the subject
  • at least a response to this thread
  • the end of free support for Spring 2.x (https://spring.io/blog/2023/11/23/spring-boot-2-7-18-available-now/)

ndruet avatar Jan 17 '24 10:01 ndruet

yeah, end of open source support for 2.x was 11/23/23 so we are running on fumes and it's been a major stress point for me.

I've been willing to help out, but there is no branch to commit to. @rainboyan what's the process to switching over to what you got?

codeconsole avatar Jan 17 '24 18:01 codeconsole

@codeconsole Please follow me on Twitter/X: rainboyan, I will release a version later, v2022.0.0 is just the beginning, 2023.0.0 version will support Spring Boot 3, all the features are already done.

rainboyan avatar Jan 17 '24 18:01 rainboyan

@rainboyan were you able to get rid of all the micronaut dependencies since they are all old, don't really do anything and just make the jar file larger?

codeconsole avatar Jan 18 '24 02:01 codeconsole

Yes, I make Micronaut dependencies optional for the Grails application, if we do not need Micronaut as the parent application context. Micronaut Spring has already supports more options to integrate with Spring and Spring Boot, we can choose it when we want.

rainboyan avatar Jan 18 '24 03:01 rainboyan

Exciting 👍 7.0 🥇 https://github.com/grails/grails-core/tree/7.0.x Groovy 4: https://github.com/grails/grails-core/pull/12491 JDK 17: https://github.com/grails/grails-core/pull/13352

codeconsole avatar Jan 26 '24 00:01 codeconsole

Hi @codeconsole - I seem to remember us having this conversation back in Sept on https://github.com/grails/grails-core/issues/12914 :-)

For our part - the lack of any communication of a roadmap beyond "it'll be in Grails 7" - and no comms about tentative dates etc. has made the decision for us. We're actively working on moving off Grails to vanilla Boot for a number of components.

Found this - which is helping to organise the effort - https://medium.com/whozapp/moving-from-grails-to-spring-boot-part-1-the-man-in-the-middle-strategy-8d6a68ccb25f

boardbloke avatar Mar 13 '24 09:03 boardbloke

@boardbloke I'm interested in migrating your project from Grails to Spring Boot, how is it going, how long has it taken, and are there any lessons you can share with us?

rainboyan avatar Mar 13 '24 17:03 rainboyan

It's at the planning stage at the moment. Waiting for available resources. But I can probably post more about it when we get into it.

The plan is to attack it like the article above suggests. Do it in stages, replace gorm and config first, then services then controllers. We have very few views so not much to do there. We plan to keep using groovy in boot to avoid significant rewrites of class implementations.

I suspect the hardest part will be unit test translation

boardbloke avatar Mar 14 '24 05:03 boardbloke

@boardbloke

If you are interested in using gsp, I would take a look at https://github.com/grails/grails-boot I think gorm should be separable as well

codeconsole avatar Mar 14 '24 15:03 codeconsole

@codeconsole There is also a Grace version used to demonstrate how to use GSP with Spring Boot, https://github.com/grace-guides/gs-spring-boot-gsp

In the Grace version, grace-boot is just a Spring Boot starter which can load any plugins include GSP, Hibernate. Grails should not create a separate project contains Spring AutoConfiguration for every plugin.

If you only want use Grace plugins in Spring Boot, you can check out the other guide: https://github.com/grace-guides/gs-spring-boot. In addition to that, Grace 2020.1.0 introduces Dynamic Modules to create modular application and plugins.

rainboyan avatar Mar 16 '24 17:03 rainboyan

@rainboyan sorry, but "one-person" framework is by definition not enterprise-grade. It should be backed by organization. You'd better put your efforts to upgrading grails

rlconst avatar Jun 20 '24 06:06 rlconst

@rlconst I don't think the definition of "One Person Framework" is that it is developed by only one person.

https://world.hey.com/dhh/the-one-person-framework-711e6318

A toolkit so powerful that it allows a single individual to create modern applications upon which they might build a competitive business.

But I agree with you, it would be good if all efforts converged.

matrei avatar Jun 20 '24 07:06 matrei

@rlconst Thanks for your comments. If you like it, please give a star. If you don't like it, you can give your suggestions as well. Anyway, I'd very much welcome you talking about it and bringing it to the attention of more people. This will let me know that someone needs it before I consider contributing further to the framework.

rainboyan avatar Jun 21 '24 00:06 rainboyan

i think there's some activity :) https://github.com/orgs/grails/discussions/13561

tubbynl avatar Aug 14 '24 10:08 tubbynl