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

Enable compilation avoidance #34100

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jprinet
Copy link
Contributor

@jprinet jprinet commented Jun 16, 2023

The Gradle Enterprise extension can improve build performances by using compilation avoidance.

This feature is enabled if the compiler is hinted not to use annotation processors (<proc>none</proc>) or if all annotation processors found on the classpath are listed as part of the annotationProcessorPaths.

This PR aims to fix this. Please note that I collected all the modules for which the compilation avoidance was disabled by running locally the build on all projects with tests:
./mvnw clean install

It is then easy to spot the console output for compilation goals containing:

[WARNING] The following annotation processors were found on the classpath: [...].
Compile avoidance has been deactivated.
Please use the maven-compiler-plugin version 3.5 or above and use the <annotationProcessorPaths> configuration element to declare the processors instead.
If you did not intend to use the processors above (e.g. they were leaked by a dependency), you can use the <proc>none</proc> option to disable annotation processing.

@quarkus-bot quarkus-bot bot added area/agroal area/amazon-lambda area/arc Issue related to ARC (dependency injection) area/cache area/cli Related to quarkus cli (not maven/gradle/etc.) area/context-propagation area/core area/dependencies Pull requests that update a dependency file area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/documentation area/elasticsearch area/flyway area/google-cloud-functions area/gradle Gradle area/graphics area/graphql area/grpc gRPC area/health area/hibernate-validator Hibernate Validator area/hibernate-orm Hibernate ORM area/hibernate-search Hibernate Search / Elasticsearch area/infinispan Infinispan area/jackson Issues related to Jackson (JSON library) area/kafka area/kafka-streams area/keycloak area/kotlin area/kubernetes labels Jun 16, 2023
Comment on lines +184 to +186
<version.sisu.inject>0.3.5</version.sisu.inject>
<version.hibernate-jpamodelgen>6.2.4.Final</version.hibernate-jpamodelgen>
<version.stork-configuration-generator>2.2.0</version.stork-configuration-generator>
Copy link
Member

Choose a reason for hiding this comment

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

I need to have a look at that but we probably need to adjust how the version are defined as they need to be consistent with the one in the BOM.
Don't change anything, I'll think about it and talk to @aloubyansky too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, there are some duplications but I didn't want to introduce an even more complex change.

@gsmet gsmet self-assigned this Jun 23, 2023
@gsmet
Copy link
Member

gsmet commented Aug 21, 2023

Hey @jprinet ,

What sort of benefits would this one have? I'm asking because it's quite intrusive and also things could be easily missed in the future.

For now, I haven't included this work in the big Build cache PR.

@jprinet
Copy link
Contributor Author

jprinet commented Aug 21, 2023

What sort of benefits would this one have? I'm asking because it's quite intrusive and also things could be easily missed in the future.

You can find the details in the documentation there @gsmet
Basically, running compilation only when it is strictly necessary (ABI change in dependencies).

The benefit then depends on the type of change, it is difficult to estimate. The gain is expected to happen on the compilation goal, subsequent goals may also benefit if recompiling change their inputs.

@gsmet
Copy link
Member

gsmet commented Aug 6, 2024

@jprinet FYI, I plan to revisit this once the new annotation processor is in.

The Panache annotation processor is also gone so it should simplify things even further. I'll start from your commit and simplify things from there.

@jprinet
Copy link
Contributor Author

jprinet commented Aug 7, 2024

To be honest I am not happy with the changeset but I could not find a way to set it programmatically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants