Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

build: improve perf parse of versions plugin #2479

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

Closed
kingg22 wants to merge 1 commit into hibernate:main from kingg22:perf/version-parse-plugin

Conversation

Copy link

@kingg22 kingg22 commented Aug 30, 2025

Hi, based on configuration cache valid inputs I do a refactor on versions plugins in your local plugins.

Other suggestions, but out of scope of this PR:

In root build.gradle can use libs, explicit () and "":

plugins {
 id( "local.versions" )
 id( "java-library" )
 id( "maven-publish" )
 alias( libs.plugins.com.diffplug.spotless )
 alias( libs.plugins.org.asciidoctor.jvm.convert ) apply false
}
group = "org.hibernate.reactive"
// leverage the ProjectVersion which comes from the `local.versions` plugin
version = project.projectVersion.fullName
rootProject.afterEvaluate {
 logger.lifecycle( "ORM version: ${libs.versions.hibernateOrmVersion.get()}" )
 logger.lifecycle( "ORM Gradle plugin version: ${libs.versions.hibernateOrmGradlePluginVersion.get()}" )
 logger.lifecycle( "Vert.x SQL Client version: ${libs.versions.vertxSqlClientVersion.get()}" )
}

In root gradle.properties adding those reduce to 30s build time, similar to hibernate orm (properties, not build time xD)

# asciidoctor gradle plugin and local plugins don't support configuration cache
org.gradle.configuration-cache=false
# run test in parallel, caution with it **
org.gradle.parallel=true
org.gradle.caching=true
org.gradle.daemon=true

I recommend use version catalog for jdks version, like hibernate orm do.

Without further ado, if you can try it and give me feedback :)

Copy link
Member

@DavideD DavideD left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution. It looks very interesting.

There are a couple of things to keep in mind when you send a PR, though:

  1. Please, apply our code templates. You can find them here: https://github.com/hibernate/hibernate-reactive
    We use the same one as ORM.
  2. Try to keep the changes in a commit to a minimum, this makes it easier for me to review them.
    In particular, don't change the code format, and try to keep the non important changes in a separate commit. For example, you have changed the indentation from tab to spaces, and some variable types from Object to var. These are all stylistic choice that don't affect the actual fix. They should, at the very least, be in a separate commit.
  3. Try to explain in the commit messages why that commit is required or improves the build
  4. We usually don't add the @author tag anymore in the javadocs. With multiple people working on the same code base, it becomes obsolete quickly and we would end up with a huge list of names in every class. We get the same information by checking the author in the commit

Thanks again!

kingg22 reacted with heart emoji
With this change remove manual parser of libs.versions.toml file and use java Properties API. Additional retrieve data of the file with PropertiesSource of gradle to be ready with configuration cache.
@kingg22 kingg22 force-pushed the perf/version-parse-plugin branch from 27f3523 to 0ce1b0a Compare September 1, 2025 16:01
Copy link
Author

kingg22 commented Sep 1, 2025

Fixes, I forgot applying project code style in IJ IDEA, I think is already in the idea folder. I rollback the use of var.

Copy link
Member

DavideD commented Sep 2, 2025

Thanks a lot, much better. I decided to apply a few changes, can you have a look at them and let me know what you think?
They are in this commit: DavideD@5414a2b

Nothing major, just some stylistic changes and some refactoring to remove duplicated code.

Copy link
Member

DavideD commented Sep 2, 2025

Superseded by #2479

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@DavideD DavideD DavideD requested changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants

AltStyle によって変換されたページ (->オリジナル) /