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

Update Ktlint to v0.46.1 #1374

Merged
merged 3 commits into from
Jun 22, 2022
Merged

Update Ktlint to v0.46.1 #1374

merged 3 commits into from
Jun 22, 2022

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jun 20, 2022

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
com.pinterest.ktlint:ktlint-reporter-baseline 0.45.2 -> 0.46.1 age adoption passing confidence
com.pinterest.ktlint:ktlint-reporter-html 0.45.2 -> 0.46.1 age adoption passing confidence
com.pinterest.ktlint:ktlint-reporter-json 0.45.2 -> 0.46.1 age adoption passing confidence
com.pinterest.ktlint:ktlint-reporter-sarif 0.45.2 -> 0.46.1 age adoption passing confidence
com.pinterest.ktlint:ktlint-reporter-plain 0.45.2 -> 0.46.1 age adoption passing confidence
com.pinterest.ktlint:ktlint-core 0.45.2 -> 0.46.1 age adoption passing confidence

Configuration

📅 Schedule: Branch creation - "before 4am on Monday" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Renovate will not automatically rebase this PR, because other commits have been found.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, click this checkbox. ⚠ Warning: custom changes will be lost.

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

@github-actions
Copy link
Contributor

github-actions bot commented Jun 20, 2022

JUnit Tests (macOS, EnricoMi/publish-unit-test-result-action@v1)

1 262 tests   1 246 ✔️  9m 5s ⏱️
   151 suites       16 💤
   151 files           0

Results for commit 20ee9bd.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented Jun 20, 2022

JUnit Tests (Windows, EnricoMi/publish-unit-test-result-action@v1)

1 262 tests   1 246 ✔️  8m 59s ⏱️
   151 suites       16 💤
   151 files           0

Results for commit 20ee9bd.

♻️ This comment has been updated with latest results.

@nulls
Copy link
Member

nulls commented Jun 20, 2022

@nulls nulls self-assigned this Jun 20, 2022
@nulls nulls added this to the 1.2.0 milestone Jun 20, 2022
@renovate renovate bot force-pushed the renovate/ktlint branch from 3ed2677 to d83a4aa Compare June 20, 2022 07:06
@nulls
Copy link
Member

nulls commented Jun 20, 2022

ktlink 0.46.0 migrated to Kotlin K2 compiler: pinterest/ktlint#1490
Looks like if a library is built on this compiler, the application which uses this library should be built also on this compiler.
We get the following errors:

Class 'com.pinterest.ktlint.core.Rule' is compiled by the new Kotlin compiler frontend and cannot be loaded by the old compiler

But we can't migrate to K2 compiler, since we use serialization plugin which doesn't support K2 compiler: https://youtrack.jetbrains.com/issue/KT-49508/Stabilize-the-K2-Compiler-Plugin-API

Also,
We get the compiler error in the following scenario:
File A with extension method, file B which uses this method -- Overload resolution ambiguity between candidates

TODO:

  • check using non K2 library from K2 and enable K2 only when ktlink is in used
  • write reproduce scratch for imports issue

@nulls
Copy link
Member

nulls commented Jun 21, 2022

check using non K2 library from K2 and enable K2 only when ktlink is in used
works

write reproduce scratch for imports issue
created https://github.com/nulls/kotlin-k2-import-issue --the problem is in kotlin-maven-plugin

@renovate renovate bot force-pushed the renovate/ktlint branch 4 times, most recently from 6ddef3c to 9554ec6 Compare June 21, 2022 23:25
@renovate renovate bot changed the title Update Ktlint to v0.46.0 Update Ktlint to v0.46.1 Jun 21, 2022
@renovate renovate bot force-pushed the renovate/ktlint branch from 9554ec6 to f9e9208 Compare June 22, 2022 08:58
@codecov
Copy link

codecov bot commented Jun 22, 2022

Codecov Report

Merging #1374 (0fb80d7) into master (76033d4) will increase coverage by 0.08%.
The diff coverage is 61.53%.

@@             Coverage Diff              @@
##             master    #1374      +/-   ##
============================================
+ Coverage     83.29%   83.37%   +0.08%     
+ Complexity     2552     2538      -14     
============================================
  Files           107      106       -1     
  Lines          7571     7617      +46     
  Branches       2092     2089       -3     
============================================
+ Hits           6306     6351      +45     
- Misses          374      375       +1     
  Partials        891      891              
Flag Coverage Δ
unittests 83.37% <61.53%> (+0.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...fn/diktat/common/config/rules/RulesConfigReader.kt 32.20% <ø> (ø)
...qfn/diktat/plugin/gradle/DiktatJavaExecTaskBase.kt 86.53% <ø> (ø)
...cqfn/diktat/ruleset/rules/DiktatRuleSetProvider.kt 97.52% <ø> (+0.02%) ⬆️
...lin/org/cqfn/diktat/plugin/maven/DiktatBaseMojo.kt 52.94% <20.00%> (+1.39%) ⬆️
...tlin/org/cqfn/diktat/ruleset/utils/AstNodeUtils.kt 83.14% <83.33%> (+0.34%) ⬆️
.../kotlin/org/cqfn/diktat/plugin/maven/DiktatMojo.kt 92.30% <100.00%> (+8.97%) ⬆️
...otlin/org/cqfn/diktat/ruleset/utils/StringUtils.kt 82.85% <0.00%> (-5.03%) ⬇️
...cqfn/diktat/ruleset/utils/PositionInTextLocator.kt 92.50% <0.00%> (-2.50%) ⬇️
...g/cqfn/diktat/ruleset/rules/chapter3/EmptyBlock.kt 74.57% <0.00%> (-1.70%) ⬇️
...kotlin/org/cqfn/diktat/ruleset/rules/DiktatRule.kt 65.21% <0.00%> (-1.45%) ⬇️
... and 44 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 76033d4...0fb80d7. Read the comment docs.

@nulls nulls force-pushed the renovate/ktlint branch from 677a0ca to ab0af85 Compare June 22, 2022 12:05
@nulls nulls requested review from petertrr and orchestr7 June 22, 2022 13:33
renovate bot and others added 3 commits June 22, 2022 17:27
* Update Ktlint to v0.46.1
* enabled K2 compiler where it's require (after v0.46.0)
* supported removed classes and fields

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@nulls nulls force-pushed the renovate/ktlint branch from 20ee9bd to 0fb80d7 Compare June 22, 2022 14:29
@nulls nulls enabled auto-merge (squash) June 22, 2022 14:29
@nulls nulls merged commit a34c513 into master Jun 22, 2022
@nulls nulls deleted the renovate/ktlint branch June 22, 2022 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants