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

fix(deps): update kotlin monorepo to v1.9.20 #6572

Merged
merged 4 commits into from Nov 9, 2023
Merged

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Oct 30, 2023

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
org.jetbrains.kotlin:kotlin-reflect (source) 1.9.10 -> 1.9.20 age adoption passing confidence
org.jetbrains.kotlin:kotlin-stdlib-jdk8 (source) 1.9.10 -> 1.9.20 age adoption passing confidence
org.jetbrains.kotlin:kotlin-main-kts (source) 1.9.10 -> 1.9.20 age adoption passing confidence
org.jetbrains.kotlin:kotlin-gradle-plugin-api (source) 1.9.10 -> 1.9.20 age adoption passing confidence
org.jetbrains.kotlin:kotlin-gradle-plugin (source) 1.9.10 -> 1.9.20 age adoption passing confidence
org.jetbrains.kotlin:kotlin-compiler-embeddable (source) 1.9.10 -> 1.9.20 age adoption passing confidence
org.jetbrains.kotlin:kotlin-compiler (source) 1.9.10 -> 1.9.20 age adoption passing confidence

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.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot added the dependencies Pull requests that update a dependency file label Oct 30, 2023
@renovate renovate bot changed the title fix(deps): update dependency org.jetbrains.kotlin:kotlin-compiler-embeddable to v1.9.20 fix(deps): update kotlin monorepo to v1.9.20 Oct 30, 2023
@3flex 3flex added pick request Marker for PRs that should be ported to the 1.0 release branch blocked labels Nov 1, 2023
Copy link
Contributor Author

renovate bot commented Nov 1, 2023

Edited/Blocked Notification

Renovate 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.

3flex
3flex previously approved these changes Nov 1, 2023
Copy link

codecov bot commented Nov 1, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (9da42d0) 85.10% compared to head (80e8427) 85.11%.
Report is 1 commits behind head on main.

❗ Current head 80e8427 differs from pull request most recent head 6eb9280. Consider uploading reports for the commit 6eb9280 to get more accurate results

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     
Files Coverage Δ
...h/detekt/rules/naming/InvalidPackageDeclaration.kt 100.00% <ø> (+5.55%) ⬆️

... and 3 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@detekt-ci detekt-ci added the rules label Nov 1, 2023
@detekt-ci
Copy link
Collaborator

detekt-ci commented Nov 1, 2023

Warnings
⚠️ It looks like this PR contains functional changes without a corresponding test.

Generated by 🚫 dangerJS against 6eb9280

@3flex
Copy link
Member

3flex commented Nov 2, 2023

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.

@3flex 3flex added the blocked label Nov 2, 2023
@detekt-ci detekt-ci added the build label Nov 3, 2023
renovate bot and others added 4 commits November 8, 2023 18:12
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
@3flex 3flex dismissed their stale review November 8, 2023 07:18

There are now changes other than version bump & checksum update which must be reviewed by others

@3flex
Copy link
Member

3flex commented Nov 8, 2023

@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
Copy link
Member

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?

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

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?

Copy link
Member

@3flex 3flex Nov 8, 2023

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.

Copy link
Member

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.

Copy link
Member

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)

Copy link
Member

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:

Full diff screenshot (long image)

image

However the actual runtime classpath: AutoCorrectLevelSpec::class.java.classLoader.ucp.path has significant differences, look for the order of the highlighted (blue) lines:
image

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)
Copy link
Member

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?

Copy link
Member

@3flex 3flex Nov 8, 2023

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

Copy link
Member

@BraisGabin BraisGabin left a 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.

@3flex 3flex merged commit 12bb998 into main Nov 9, 2023
21 checks passed
@3flex 3flex deleted the renovate/kotlin-monorepo branch November 9, 2023 21:06
@cortinico cortinico added the notable changes Marker for notable changes in the changelog label Nov 23, 2023
cortinico pushed a commit that referenced this pull request Nov 25, 2023
* 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>
mgroth0 pushed a commit to mgroth0/detekt that referenced this pull request Feb 11, 2024
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build dependencies Pull requests that update a dependency file notable changes Marker for notable changes in the changelog pick request Marker for PRs that should be ported to the 1.0 release branch rules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants