Skip to content
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

Merge sitemesh3 grails plugin into grails-gsp #562

Merged
merged 141 commits into from
Jan 15, 2025
Merged

Conversation

jdaugherty
Copy link
Contributor

grails/grails-core#13552

Merges the sitemesh3 grails plugin written by @codeconsole that replaced the sitemesh2 plugin.

When comparing this PR, look at the last commit only to make it easier to check.

A significant amount of rework went into this PR:

  • split sitemesh plugin & example application
  • adopt plugin configuration similar to grails gsp-plugin
  • add tests for sitemesh example application
  • fix API docs for classes not hosted in this project (see PageRenderer -> ApplicationContext)
  • simplify documentation generation
  • repackage org.sitemesh.grails.plugins to org.grails.plugins
  • adopt grails-bom
  • remove common-build usage
  • various doc cleanup after simplification
  • update minimum grails version in gsp plugin
  • composite build switch
  • adopt newer gradle features such as source jars, project.layout, moving away from ant, etc
  • update for grails-gradle plugin features in 7.0
  • remove unneeded, repeated documentation scopes

… grails and grails once sitemesh has been decoupled.

implementation platform("org.grails:grails-bom:$grailsVersion")

api project(':grails-taglib'), { // GrailsTagLibClass
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@matrei jsp isn't even included here now. can you explain why?

Copy link
Contributor

@matrei matrei Jan 13, 2025

Choose a reason for hiding this comment

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

Why was it included before? From what I could find, there is no dependency on that library in this module.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I assume it was so JSPs could use tags. I'm hesitant to change this one unless we write some tests to ensure it doesn't break anything.

Copy link
Contributor Author

@jdaugherty jdaugherty Jan 13, 2025

Choose a reason for hiding this comment

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

I guess what I'm saying is if we don't know why it was included, and we know it's working, I don't think now is the time to be removing it. We should leave it for now and fix that on a second pass. Otherwise we could unintentionally break downstream projects.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm planning to add apps testing JSP (with JSTL) and GSP (with taglibs) in the examples folder. Then we will get clarity about the dependencies.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you @matrei That's my main concern!

This commit removes (comments out) the excluded transitive dependencies. They were used to visualize the true direct dependencies of these modules. The commented out exclusions are kept in the build files to assist with further decoupling going forward.
After the revert in the last commit FastStringWriter is also used from `grails-encoder`.
exclude group: 'org.springframework', module: 'spring-core'
*/
}
implementation project(':grails-web-gsp-taglib'), { // RenderTagLib
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Doesn't this still need to be API?

Since the project now relies on the BOM for the `groovyVersion` instead of specifying it explicitly, the version must be resolved dynamically to ensure guide links point to the correct Groovy API documentation.
Add `grails-plugin-codecs` as it is required at runtime by `grails-plugin-sitemesh3` for the `CodecLookup` bean.
To get rid of warning message.
Add `grails-plugin-codecs` as it is required at runtime by `grails-plugin-gsp` for the `CodecLookup` bean.
Add `grails-plugin-rest` as the app uses `respond()`.
@jdaugherty
Copy link
Contributor Author

Per grails/grails-core#13678 , I'm going to go ahead and merge this and let @matrei add the test scenarios we've previously agreed on.

@jdaugherty jdaugherty merged commit 8222bd1 into grails:7.0.x Jan 15, 2025
5 checks passed
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

Successfully merging this pull request may close these issues.

4 participants