Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Upgrade io.github.detekt.sarif4k:sarif4k:0.2.0 #1701

Closed
nulls opened this issue Nov 8, 2022 · 1 comment · Fixed by #1703
Closed

Upgrade io.github.detekt.sarif4k:sarif4k:0.2.0 #1701

nulls opened this issue Nov 8, 2022 · 1 comment · Fixed by #1703
Milestone

Comments

@nulls
Copy link
Contributor

nulls commented Nov 8, 2022

io.github.detekt.sarif4k:sarif4k:0.0.1 uses the old kotlinx-serialization which leads to error in diktat (on runtime):

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's due to that dependencies from ktlint take preference.

Version of kotlinx-serialization upgraded in detekt/sarif4k#3.

Can we upgrade version of sarif4k to this version?

@paul-dingemans paul-dingemans added this to the 0.48.0 milestone Nov 8, 2022
@paul-dingemans
Copy link
Collaborator

You're just in time for the 0.48 release.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants