-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
Required fixes for future Groovy 4 compatibility #21986
Merged
Merged
Conversation
This file contains 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
DPUkyle
force-pushed
the
km/groovy-4-safe-changes
branch
5 times, most recently
from
September 13, 2022 16:04
182646f
to
387ae22
Compare
DPUkyle
added a commit
that referenced
this pull request
Sep 13, 2022
octylFractal
requested changes
Sep 14, 2022
...t/groovy/org/gradle/api/plugins/quality/codenarc/CodeNarcPluginVersionIntegrationTest.groovy
Outdated
Show resolved
Hide resolved
subprojects/launcher/src/test/groovy/org/gradle/launcher/cli/WelcomeMessageActionTest.groovy
Show resolved
Hide resolved
...model-core/src/test/groovy/org/gradle/internal/reflect/JavaPropertyReflectionUtilTest.groovy
Outdated
Show resolved
Hide resolved
...integTest/groovy/org/gradle/api/reporting/plugins/BuildDashboardPluginIntegrationTest.groovy
Outdated
Show resolved
Hide resolved
...s/smoke-test/src/smokeTest/groovy/org/gradle/smoketests/GradleVersionsPluginSmokeTest.groovy
Show resolved
Hide resolved
...ting-jvm/src/integTest/groovy/org/gradle/testing/testsuites/TestSuitesIntegrationTest.groovy
Outdated
Show resolved
Hide resolved
octylFractal
approved these changes
Sep 14, 2022
DPUkyle
force-pushed
the
km/groovy-4-safe-changes
branch
from
September 14, 2022 03:49
8e41d0a
to
df14364
Compare
DPUkyle
force-pushed
the
km/groovy-4-safe-changes
branch
from
September 14, 2022 18:44
df14364
to
562cc53
Compare
See MetaBeanProperty for a very slow-path of getModifiers
octylFractal
force-pushed
the
km/groovy-4-safe-changes
branch
from
September 15, 2022 16:49
27a7fe3
to
1a0767d
Compare
OK, I've already triggered a build for you. |
Pre-tested commit build failed. |
@bot-gradle test and merge |
OK, I've already triggered a build for you. |
32 tasks
bot-gradle
added a commit
that referenced
this pull request
Jan 4, 2023
This is a cleaned up version of #18552. Building with `-DbundleGroovy4=true` on the CLI will use Groovy 4.0.7 libs. An additional Gradleception job is already in place to invoke this code path. If we choose to unconditionally upgrade to Groovy 4, we should revert this PR followed by setting the Groovy version value in `ExternalModulesExtension.kt`. Alternatively, we could modify this PR to test forward with Groovy 5. This would likely also need temporary inclusion of apache snapshot repositories; see #20972. ## Preparation PRs - #18665 - #20037 - #21504 - #21497 - #21986 - #22097 - #22130 - #22133 - #22151 - #22157 - #22158 - #22178 - #22208 - #22213 ## TODO - [x] allow configuration-cache instrumentation to handle `INVOKEDYNAMIC` - #20795 - #20799 - #20616 - [x] fix capabilities - [ ] mention relevant breaking changes in release notes/upgrade guide - [x] `is*()` getters are not supported for `Boolean` properties anymore; see #22218 - [ ] `INVOKEDYNAMIC` is the only way forward - [x] upgrade Spock to Groovy 4-compatible version – spockframework/spock#1382 - [x] upgrade to Spock 2.2 GA - [x] upgrade to Spock 2.2-M1 - [x] upgrade CodeNarc – #20655 - [x] CodeNarc/CodeNarc#678 - this prevents running CodeNarc because it depends on the now-removed `groovy.utils.XmlParser` - it makes `IsolatedAntBuilderMemoryLeakIntegrationTest.CodeNarc does not fail with PermGen space error` fail - [x] CodeNarc/CodeNarc#682 - [x] upgrade to Groovy 4 - [x] upgrade to Groovy 4.0.7 - [x] [GROOVY-10765](https://issues.apache.org/jira/browse/GROOVY-10765) _STC: Closure implementation of Java @FunctionalInterface loses type information_ - Can workaround using a cast in UnitOfWorkBuilder - Fix coming in 4.0.6 - [x] [GROOVY-10731](https://issues.apache.org/jira/browse/GROOVY-10731) _Exceptions thrown from MarkupTemplateEngine when map accessors and GString interpolation are used_ - fixed in 4.0.5 - [ ] [GROOVY-10709](https://issues.apache.org/jira/browse/GROOVY-10709) _Performance regression in Gradle with Groovy 4_ - no clear cause; mitigation/investigation is ongoing - [x] [GROOVY-10708](https://issues.apache.org/jira/browse/GROOVY-10708) _Property access for wrapped vs. primitive boolean_ - Groovy team will not fix - @big-guy has suggested a workaround in Gradle to prevent breaking legacy plugins/tasks, to be implemented as #22218 - [x] [GROOVY-10772](https://issues.apache.org/jira/browse/GROOVY-10772) _Possible memory leak, CacheableCallSite retains objects across invocations_ - Causes OOME-related flakiness in `o.g.w.i.WorkerExecutorIntegrationTest#does not leak project state across multiple builds`, and OOME mostly happens with Java 8 - [x] [GROOVY-10707](https://issues.apache.org/jira/browse/GROOVY-10707) _Regression in property access for conflicting isXxx and getXxx accessors_ - Groovy team will not fix - Our tests are refactored to accommodate the breaking change - [x] [GROOVY-10591](https://issues.apache.org/jira/browse/GROOVY-10591) _Static method not found on Java interface_ - no fix planned yet - [x] [GROOVY-10543](https://issues.apache.org/jira/browse/GROOVY-10543) _Problem with groovy-all Gradle module metadata_ - fixed in 4.0.2 - [x] [GROOVY-10514](https://issues.apache.org/jira/browse/GROOVY-10514) _Class method is not called anymore from inside closure_ - apparently works as designed, added workarounds - [x] [GROOVY-10555](https://issues.apache.org/jira/browse/GROOVY-10555) _MetaClass.getProperites() returns package private fields_ - no plan to fix yet, but added a workaround - [x] [GROOVY-10521](https://issues.apache.org/jira/browse/GROOVY-10521) _Compiler complains about abstract method not implemented when implementing trait_ - not fixed yet, but we added a workaround - [x] ~~[GROOVY-10466](https://issues.apache.org/jira/browse/GROOVY-10466) _Compilation error on Spock expectation_~~ - To be fixed in apache/groovy#1698 - Fixed in 4.0.2-SNAPSHOT - [x] ~~[GROOVY-10467](https://issues.apache.org/jira/browse/GROOVY-10467) _Compilation fails with method detected as transient_~~ - doesn't seem to be a problem with `4.0.1` - [x] ~~[GROOVY-10299](https://issues.apache.org/jira/browse/GROOVY-10299) _Groovy compiler generates invalid Java stubs_~~ - already fixed in `4.0.0-beta-2` - [x] ~~[GROOVY-10290](https://issues.apache.org/jira/browse/GROOVY-10290) _Dynamic Groovy code in Gradle doesn't compile because of $getLookup() method is not static_~~ - fixed in `4.0.1` - [x] fix build scripts being compiled with binary compatibility (=class format version) of the runtime Java version - this makes the following tests fail: - `WorkerDaemonIntegrationTest` - `ConfigureRuntimeClasspathNormalizationIntegrationTest` - `CheckstylePluginToolchainsIntegrationTest` - `BuildEnvironmentIntegrationTest` - [x] use non-deprecated Groovy `AntBuilder` for the super-class of our own `AntBuilder` - [x] upgrade Groovy version in `AbstractSourcesAndJavadocJarsIntegrationTest` - [x] use `org.apache.groovy` group ID for Groovy versions > 4 in `GroovyParametersMetadataIntegrationTest` (and probably in many other places) Co-authored-by: Octavia Togami <otogami@gradle.com>
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.
Extracted from #20038