intellij-platform-gradle-plugin
intellij-platform-gradle-plugin copied to clipboard
NoSuchMethodError on snakeyaml parser in unit tests since 1.13.3
Describe the bug
Since bump to 1.13.3, some unit tests fail with following error NoSuchMethodError: 'void org.yaml.snakeyaml.parser.ParserImpl.<init>(org.yaml.snakeyaml.reader.StreamReader, org.yaml.snakeyaml.LoaderOptions)'
.
'void org.yaml.snakeyaml.parser.ParserImpl.<init>(org.yaml.snakeyaml.reader.StreamReader, org.yaml.snakeyaml.LoaderOptions)'
java.lang.NoSuchMethodError: 'void org.yaml.snakeyaml.parser.ParserImpl.<init>(org.yaml.snakeyaml.reader.StreamReader, org.yaml.snakeyaml.LoaderOptions)'
at com.fasterxml.jackson.dataformat.yaml.YAMLParser.<init>(YAMLParser.java:193)
at com.fasterxml.jackson.dataformat.yaml.YAMLFactory._createParser(YAMLFactory.java:504)
at com.fasterxml.jackson.dataformat.yaml.YAMLFactory.createParser(YAMLFactory.java:406)
at com.fasterxml.jackson.dataformat.yaml.YAMLFactory.createParser(YAMLFactory.java:15)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3714)
at io.github.fstaudt.helm.idea.service.HelmChartService.aggregate(HelmChartService.kt:47)
To Reproduce Issue can be reproduced in PR created by dependabot for bump of gradle intellij plugin to 1.13.3: https://github.com/fstaudt/helm-values/pull/74
Expected behavior Unit tests run correctly with version of jackson-databind & snakeyaml defined in Gradle dependencies.
Environment:
- OS: Windows
- Gradle IntelliJ Plugin Version: 1.13.3
- Gradle Version: 8.0.2
Additional context N/A
SnakeYaml Libraryh has been updated, please always make sure to use Plugin Verifier to check for binary compatibility problems https://plugins.jetbrains.com/docs/intellij/verifying-plugin-compatibility.html
Hello @YannCebron ,
I'm already using plugin verifier for my plugin and it pass for all supported versions (221 -> 231).
My issue is not that plugin is not working with some versions of IntelliJ.
When running gradle task "runIde", the plugin works fine with IntelliJ IC 2022.1.4.
Issue with snakeyaml library only appear in unit tests of my plugin.
IMO, it is related to this change: https://github.com/JetBrains/gradle-intellij-plugin/issues/473
Could you consider reopening the issue ?
For information, I managed to workaround the issue by enforcing snakeyaml 2.2 in testRuntime dependencies of helm-values-intellij-plugin module:
https://github.com/fstaudt/helm-values/blob/0.8.1/helm-values-intellij-plugin/build.gradle.kts#L37
Version 2.2 of snakeyaml should already be transitively provided by dependency jackson-dataformat-yaml set in helm-values-shared module but it seems to be overridden with an older version by dependencies of IntelliJ platform 2022.1.4.
@fstaudt Could you please verify if this issue is still valid in 2.0?