Do not execute spotless in Java 21#11670
Merged
Jackie-Jiang merged 1 commit intoapache:masterfrom Sep 25, 2023
Merged
Conversation
Merged
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## master #11670 +/- ##
=============================================
- Coverage 63.10% 14.45% -48.66%
+ Complexity 1121 201 -920
=============================================
Files 2343 2343
Lines 125693 125691 -2
Branches 19310 19310
=============================================
- Hits 79315 18163 -61152
- Misses 40728 105991 +65263
+ Partials 5650 1537 -4113
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Jackie-Jiang
approved these changes
Sep 25, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The reason to be of this PR is to be able to progress on #11656.
Spotless does not support Java 21 yet (see diffplug/spotless#1822) so this PR moves the spotless usage to its own profile, which is active automatically if and only if the JVM being used is not 21. Once Spotless support Java 21 (probably when diffplug/spotless#1822 is merged) we could just remove this profile and move the spotless config to the build->pluginManagement section.
Why don't just disable spotless with
-Dspotless.skip?IT would be a great, but spotless doesn't work in that way. Even with that property set, spotless actually executes. What the flag controls is whether the pipeline should fail or not if spotless detects an issue in the code (like importing something that is not being used). When using Java 21, spotless throws an exception that is not caught, so it always aborts the maven execution, even if
-Dspotless.skipis set.This changes are included in #11672, so we can decide to merge this alone or merge everything together.