Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Conversation

@gsartori
Copy link
Contributor

@CLAassistant
Copy link

CLAassistant commented Feb 13, 2025

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@matrei matrei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, why are we injecting something that is not used?
Why are we even having a BootStrap class that does nothing?

@jdaugherty
Copy link
Contributor

We generate a bootstrap class by default. Maybe we should do what spring does and just combine bootstrap with he application class @matrei

@gsartori
Copy link
Contributor Author

I've used the code as generated by the (newly refactored) Grails 7 BootStrap template. The injection is not used but it documents how to inject the ServletContext. True it may be removed in those BootStraps that actually contain code.

@matrei
Copy link
Contributor

matrei commented Feb 13, 2025

We generate a bootstrap class by default.

@jdaugherty I think it's fine when we generate starter apps. But why keep it around if it is not used?

The BootStrap vs Application is also another discussion. Right now, the Application class is almost always just a boilerplate that adds nothing other than that is has to be there.

@jdaugherty
Copy link
Contributor

My only concern with removing classes that we generate is we diverge from how people are likely setting up grails apps. There are a lot of ASTs and injecting of functionality in grails. This has the potential to not be testing what people are using. I'd leave bootstrap so we stay true to what most grails apps look like - even if it is empty.

@jdaugherty
Copy link
Contributor

@matrei per discussion, I've taken this discussion to a ticket longer term: apache/grails-core#14021

@jdaugherty
Copy link
Contributor

@gsartori please feel free to merge this in the mean time.

@gsartori gsartori closed this Feb 19, 2025
@gsartori gsartori reopened this Feb 19, 2025
@gsartori
Copy link
Contributor Author

I cannot see the merge button, I may not have the rightrs to merge the PR (?)

@jdaugherty jdaugherty merged commit 8c0dd17 into grails:9.0.x Feb 19, 2025
13 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants