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
fix(deps): update kotlin monorepo to v1.9.20 #6572
Conversation
9c058aa
to
062ad62
Compare
Edited/Blocked NotificationRenovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR. You can manually request rebase by checking the rebase/retry box above. ⚠ Warning: custom changes will be lost. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6572 +/- ##
============================================
+ Coverage 85.10% 85.11% +0.01%
+ Complexity 4083 4079 -4
============================================
Files 570 570
Lines 13376 13373 -3
Branches 2406 2405 -1
============================================
- Hits 11384 11383 -1
+ Misses 792 791 -1
+ Partials 1200 1199 -1
☔ View full report in Codecov by Sentry. |
5faa05d
to
586435b
Compare
May be due to KT-60813. Further investigation required but the strack trace looks like it matches. Strangely though the original issue was opened with 1.9.0, but it seems seeing it when updating 1.9.10 to 1.9.20. Target fix is 2.0.0-beta2 which won't be for a while. In the meantime we may need to disable formatting tests. |
ddf48ac
to
c9329e3
Compare
c9329e3
to
80e8427
Compare
This is due to detekt-main-kts embedding an old version of SLF4J which conflicts with the version used in detekt-formatting. This dependency isn't required for formatting tests as ktlint only requires the AST for its analysis and doesn't need to be compiled. See https://youtrack.jetbrains.com/issue/KT-60813
80e8427
to
6eb9280
Compare
There are now changes other than version bump & checksum update which must be reviewed by others
@detekt/maintainers this builds now, can I please get a review on the workarounds & fixes? Thanks! |
@@ -12,7 +12,14 @@ dependencies { | |||
|
|||
runtimeOnly(libs.slf4j.api) | |||
|
|||
testImplementation(projects.detektTest) | |||
testImplementation(projects.detektTest) { | |||
/* Workaround for https://youtrack.jetbrains.com/issue/KT-60813. Required due to detekt-main-kts embedding an |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue is reported for 1.9.0, how come it just came out in 1.9.10-20 bump?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, #6572 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you check/diff the 10 and 20 jar contents?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not in any detail. I've spent a lot of time trying to figure out what's going on come up with the right workaround though so if you want to take over and try to find a better solution I'd be grateful - I'm just glad it's unblocked at this point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, it seems an ok trade-off. I might have a look later if I find some time, but no point blocking.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#6636 for a potentially better solution (allows for running compiled tests)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had a deeper look and found the differences.
Adding a previous version on the classpath didn't work, because the 1.9.10 and 1.9.20 versions have exactly the same Logger
class in the jar, so the trigger must be something else.
I had a look at the dependency tree gradlew :d-f:dep --configuration=testRuntimeClasspath
, and they look almost identical:
However the actual runtime classpath: AutoCorrectLevelSpec::class.java.classLoader.ucp.path
has significant differences, look for the order of the highlighted (blue) lines:
I cannot explain why the order changed so much, while the dependency tree didn't. My only hunch is that somewhere in Gradle there's a hash-ordered collection, and the hashed values so far always yielded a "good" order, with "1.9.20" string in the mix, this changed.
|
||
tasks.withType<Test>().configureEach { | ||
// Required due to exclusion of kotlin-main-kts dependency above | ||
systemProperty("compile-test-snippets", false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than disabling the compilation, how about adding the previous version of kotlin-main-kts to the classpath? Would that enable (keep) compilation ability in tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried but it didn't work, though I might have done something wrong
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As commented on the comments. This is clearly not ideal but I don't think that should block this PR.
* fix(deps): update kotlin monorepo to v1.9.20 * Update Kotlin compiler checksum * Fix 'Extension is shadowed by a member' warning * Exclude kotlin-main-kts from detekt-formatting testRuntimeClasspath This is due to detekt-main-kts embedding an old version of SLF4J which conflicts with the version used in detekt-formatting. This dependency isn't required for formatting tests as ktlint only requires the AST for its analysis and doesn't need to be compiled. See https://youtrack.jetbrains.com/issue/KT-60813 --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Matthew Haughton <3flex@users.noreply.github.com>
* fix(deps): update kotlin monorepo to v1.9.20 * Update Kotlin compiler checksum * Fix 'Extension is shadowed by a member' warning * Exclude kotlin-main-kts from detekt-formatting testRuntimeClasspath This is due to detekt-main-kts embedding an old version of SLF4J which conflicts with the version used in detekt-formatting. This dependency isn't required for formatting tests as ktlint only requires the AST for its analysis and doesn't need to be compiled. See https://youtrack.jetbrains.com/issue/KT-60813 --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Matthew Haughton <3flex@users.noreply.github.com>
This PR contains the following updates:
1.9.10
->1.9.20
1.9.10
->1.9.20
1.9.10
->1.9.20
1.9.10
->1.9.20
1.9.10
->1.9.20
1.9.10
->1.9.20
1.9.10
->1.9.20
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR has been generated by Mend Renovate. View repository job log here.