diktat icon indicating copy to clipboard operation
diktat copied to clipboard

Update all non-major dependencies (except core Kotlin)

Open renovate[bot] opened this issue 3 years ago β€’ 2 comments

Mend Renovate

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 age adoption passing confidence
org.apache.maven.plugins:maven-shade-plugin (source) 3.3.0 -> 3.4.0 age adoption passing confidence
org.apache.maven.plugins:maven-jar-plugin (source) 3.2.2 -> 3.3.0 age adoption passing confidence
com.charleskorn.kaml:kaml-jvm 0.47.0 -> 0.48.0 age adoption passing confidence
org.apache.logging.log4j:log4j-slf4j-impl (source) 2.18.0 -> 2.19.0 age adoption passing confidence
org.apache.logging.log4j:log4j-core (source) 2.18.0 -> 2.19.0 age adoption passing confidence
org.junit.platform:junit-platform-suite-engine (source) 1.9.0 -> 1.9.1 age adoption passing confidence
org.junit.jupiter:junit-jupiter (source) 5.9.0 -> 5.9.1 age adoption passing confidence
org.junit.vintage:junit-vintage-engine (source) 5.9.0 -> 5.9.1 age adoption passing confidence

Release Notes

charleskorn/kaml

v0.48.0

Compare Source

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

renovate[bot] avatar Sep 12 '22 03:09 renovate[bot]

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.

github-actions[bot] avatar Sep 12 '22 03:09 github-actions[bot]

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.

github-actions[bot] avatar Sep 12 '22 03:09 github-actions[bot]

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.

github-actions[bot] avatar Oct 22 '22 10:10 github-actions[bot]

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.

github-actions[bot] avatar Oct 22 '22 10:10 github-actions[bot]

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)

nulls avatar Oct 24 '22 15:10 nulls

Migrated from shade plugin to assembly -- it didn't help. The problem can be not only in test

nulls avatar Oct 24 '22 16:10 nulls

General suggestion migrated integration tests to diktat-ruleset to test final diktat.jar instead of testing a test artifact

nulls avatar Oct 24 '22 16:10 nulls

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)

nulls avatar Oct 29 '22 10:10 nulls

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

nulls avatar Oct 29 '22 19:10 nulls

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

nulls avatar Oct 30 '22 09:10 nulls

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

nulls avatar Oct 31 '22 08:10 nulls

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.

codecov[bot] avatar Oct 31 '22 09:10 codecov[bot]