diktat
diktat copied to clipboard
Update all non-major dependencies (except core Kotlin)
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| org.codehaus.mojo:versions-maven-plugin (source) | 2.11.0 -> 2.12.0 |
||||
| org.apache.maven.plugins:maven-shade-plugin (source) | 3.3.0 -> 3.4.0 |
||||
| org.apache.maven.plugins:maven-jar-plugin (source) | 3.2.2 -> 3.3.0 |
||||
| com.charleskorn.kaml:kaml-jvm | 0.47.0 -> 0.48.0 |
||||
| org.apache.logging.log4j:log4j-slf4j-impl (source) | 2.18.0 -> 2.19.0 |
||||
| org.apache.logging.log4j:log4j-core (source) | 2.18.0 -> 2.19.0 |
||||
| org.junit.platform:junit-platform-suite-engine (source) | 1.9.0 -> 1.9.1 |
||||
| org.junit.jupiter:junit-jupiter (source) | 5.9.0 -> 5.9.1 |
||||
| org.junit.vintage:junit-vintage-engine (source) | 5.9.0 -> 5.9.1 |
Release Notes
charleskorn/kaml
v0.48.0
-
Updated: use snakeyaml-engine 2.4.
This improves support for some older versions of Android, amongst other improvements.
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: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
π» Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
- [ ] If you want to rebase/retry this PR, click this checkbox.
This PR has been generated by Mend Renovate. View repository job log here.
JUnit Tests (Windows, EnricoMi/publish-unit-test-result-action@v1)
1β934 testsβββ1β904 :heavy_check_mark:ββ1m 30s :stopwatch: βββ158 suitesβββββββ15 :zzz: βββ158 filesβββββββββ15 :x:
For more details on these failures, see this check.
Results for commit 0f873d2a.
:recycle: This comment has been updated with latest results.
JUnit Tests (macOS, EnricoMi/publish-unit-test-result-action@v1)
1β923 testsβββ1β908 :heavy_check_mark:ββ1m 17s :stopwatch: βββ159 suitesβββββββ15 :zzz: βββ159 filesβββββββββββ0 :x:
Results for commit 0f873d2a.
:recycle: This comment has been updated with latest results.
JUnit Tests (Windows, EnricoMi/publish-unit-test-result-action@v2)
1β942 testsβββ1β912 :heavy_check_mark:ββ2m 44s :stopwatch: βββ160 suitesβββββββ15 :zzz: βββ160 filesβββββββββ15 :x:
For more details on these failures, see this check.
Results for commit e6c684c7.
:recycle: This comment has been updated with latest results.
JUnit Tests (macOS, EnricoMi/publish-unit-test-result-action@v2)
1β923 testsβββ1β908 :heavy_check_mark:ββ1m 27s :stopwatch: βββ159 suitesβββββββ15 :zzz: βββ159 filesβββββββββββ0 :x:
Results for commit e6c684c7.
:recycle: This comment has been updated with latest results.
The main problem is in
kotlinx.serialization.modules.SerializersModule kotlinx.serialization.modules.SerializersModuleBuildersKt.EmptySerializersModule()
[DEBUG]: stderr of `java -jar ktlint -R diktat.jar --disabled_rules=standard -F /tmp/FixPlugin--1213102867/src/main/kotlin/script/SimpleRunInScriptTest.kts`: Exception in thread "main" java.lang.NoSuchMethodError: 'kotlinx.serialization.modules.SerializersModule kotlinx.serialization.modules.SerializersModuleBuildersKt.EmptySerializersModule()'
at com.charleskorn.kaml.Yaml.<init>(Yaml.kt:39)
at com.charleskorn.kaml.Yaml.<clinit>(Yaml.kt:98)
at org.cqfn.diktat.common.config.rules.RulesConfigReader$yamlSerializer$2.invoke(RulesConfigReader.kt:79)
at org.cqfn.diktat.common.config.rules.RulesConfigReader$yamlSerializer$2.invoke(RulesConfigReader.kt:79)
at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
at org.cqfn.diktat.common.config.rules.RulesConfigReader.getYamlSerializer(RulesConfigReader.kt:79)
at org.cqfn.diktat.common.config.rules.RulesConfigReader.parseResource(RulesConfigReader.kt:89)
at org.cqfn.diktat.common.config.rules.RulesConfigReader.parseResource(RulesConfigReader.kt:78)
at org.cqfn.diktat.common.config.reader.JsonResourceConfigReader.readResource(JsonResourceConfigReader.kt:34)
at org.cqfn.diktat.ruleset.rules.DiktatRuleSetProvider.get(DiktatRuleSetProvider.kt:133)
at com.pinterest.ktlint.internal.LoadRuleSetsKt.reportWhenMissingCustomRuleSetProvider(LoadRuleSets.kt:66)
at com.pinterest.ktlint.internal.LoadRuleSetsKt.loadRuleSets(LoadRuleSets.kt:34)
at com.pinterest.ktlint.internal.KtlintCommandLine.run(KtlintCommandLine.kt:216)
at com.pinterest.ktlint.Main.main(Main.kt:31)
kaml migrates to it from deprecated EmptySerializersModule. The method there is. It's not clear the root of issue
The problem is reproduced on WSL with Java 11 (we built diktat on Java 8)
Migrated from shade plugin to assembly -- it didn't help. The problem can be not only in test
General suggestion migrated integration tests to diktat-ruleset to test final diktat.jar instead of testing a test artifact
Tested directly:
nulls@DESKTOP-3T90OGI MINGW64 /c/projects/diktat/diktat-ruleset/target/tmp (feature/renovate/all-minor-patch)
$ java -jar ktlint -R diktat.jar
13:46:03.501 [main] INFO com.pinterest.ktlint.internal.KtlintCommandLine - Enable default patterns [**/*.kt, **/*.kts]
13:46:03.542 [main] WARN org.cqfn.diktat.ruleset.rules.DiktatRuleSetProvider - Configuration file not found in directory where diktat is run (diktat-analysis.yml) or in the directory where diktat.jar is stored (C:\projects\diktat\diktat-ruleset\target\tmp\diktat-analysis.yml) or in system property <diktat.config.path> (null), the default file included in jar will be used. Some configuration options will be disabled or substituted with defaults. Custom configuration file should be placed in diktat working directory if run from CLI or provided as configuration options in plugins.
Exception in thread "main" java.lang.NoSuchMethodError: 'kotlinx.serialization.modules.SerializersModule kotlinx.serialization.modules.SerializersModuleBuildersKt.EmptySerializersModule()'
at com.charleskorn.kaml.Yaml.<init>(Yaml.kt:39)
at com.charleskorn.kaml.Yaml.<clinit>(Yaml.kt:98)
at org.cqfn.diktat.common.config.rules.RulesConfigReader$yamlSerializer$2.invoke(RulesConfigReader.kt:79)
at org.cqfn.diktat.common.config.rules.RulesConfigReader$yamlSerializer$2.invoke(RulesConfigReader.kt:79)
at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
at org.cqfn.diktat.common.config.rules.RulesConfigReader.getYamlSerializer(RulesConfigReader.kt:79)
at org.cqfn.diktat.common.config.rules.RulesConfigReader.parseResource(RulesConfigReader.kt:89)
at org.cqfn.diktat.common.config.rules.RulesConfigReader.parseResource(RulesConfigReader.kt:78)
at org.cqfn.diktat.common.config.reader.JsonResourceConfigReader.readResource(JsonResourceConfigReader.kt:34)
at org.cqfn.diktat.ruleset.rules.DiktatRuleSetProvider.get(DiktatRuleSetProvider.kt:138)
at com.pinterest.ktlint.internal.LoadRuleProvidersKt.getLegacyRuleProvidersFromJar(LoadRuleProviders.kt:91)
at com.pinterest.ktlint.internal.LoadRuleProvidersKt.getRuleProvidersFromJar(LoadRuleProviders.kt:60)
at com.pinterest.ktlint.internal.LoadRuleProvidersKt.loadRuleProviders(LoadRuleProviders.kt:32)
at com.pinterest.ktlint.internal.KtlintCommandLine.run(KtlintCommandLine.kt:229)
at com.pinterest.ktlint.Main.main(Main.kt:27)
It works if run it
/c/Users/nulls/.jdks/temurin-11/bin/java.exe -cp "kotlinx-serialization-core-jvm-1.4.1.jar;ktlint" com.pinterest.ktlint.Main -R diktat.jar src/main/kotlin/Example1Test.kt
added to DiktatRuleSetProvider.kt:
override fun get(): RuleSet {
@Suppress("TooGenericExceptionCaught", "DEBUG_PRINT")
try {
val serializer = EmptySerializersModule()
println("touched serializer: $serializer")
} catch (e: Exception) {
println("failed to touch EmptySerializersModule(): ${e.message}")
}
Now it fails here
So, the main problem is in ktlint:
| \--- io.github.detekt.sarif4k:sarif4k:0.0.1
| +--- org.jetbrains.kotlinx:kotlinx-serialization-json:1.1.0
| | \--- org.jetbrains.kotlinx:kotlinx-serialization-json-jvm:1.1.0
| | +--- org.jetbrains.kotlin:kotlin-stdlib:1.4.30 -> 1.7.20 (*)
| | +--- org.jetbrains.kotlin:kotlin-stdlib-common:1.4.30 -> 1.7.20
| | \--- org.jetbrains.kotlinx:kotlinx-serialization-core:1.1.0
| | \--- org.jetbrains.kotlinx:kotlinx-serialization-core-jvm:1.1.0
| | +--- org.jetbrains.kotlin:kotlin-stdlib:1.4.30 -> 1.7.20 (*)
| | \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.4.30 -> 1.7.20
It uses https://github.com/detekt/sarif4k which uses the old kotlinx serialization.
There is a PR to upgrade it: https://github.com/detekt/sarif4k/pull/4
After it, need to upgrade it in ktlint
Codecov Report
Merging #1518 (b00b607) into master (da68f98) will not change coverage. The diff coverage is
n/a.
@@ Coverage Diff @@
## master #1518 +/- ##
=========================================
Coverage 82.09% 82.09%
Complexity 2306 2306
=========================================
Files 112 112
Lines 7793 7793
Branches 2011 2011
=========================================
Hits 6398 6398
Misses 481 481
Partials 914 914
| Flag | Coverage Ξ | |
|---|---|---|
| unittests | 82.09% <ΓΈ> (ΓΈ) |
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.