grails / grails-core

The Grails Web Application Framework
http://grails.org
Apache License 2.0
2.78k stars 950 forks source link

Groovy 4 / Spring Boot 3 branch #13334

Open codeconsole opened 9 months ago

codeconsole commented 9 months ago

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.

tubbynl commented 8 months ago

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

codeconsole commented 8 months ago

@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).

rainboyan commented 8 months ago

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.

ndruet commented 8 months ago

The most worrying points are :

codeconsole commented 8 months ago

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?

rainboyan commented 8 months ago

@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.

codeconsole commented 8 months ago

@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?

rainboyan commented 8 months ago

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.

codeconsole commented 8 months ago

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

boardbloke commented 6 months ago

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

rainboyan commented 6 months ago

@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?

boardbloke commented 6 months ago

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

codeconsole commented 6 months ago

@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

rainboyan commented 6 months ago

@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.

rlconst commented 3 months ago

@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

matrei commented 3 months ago

@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.

rainboyan commented 3 months ago

@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.

tubbynl commented 1 month ago

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