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

NoSuchMethodError on snakeyaml parser in unit tests since 1.13.3 #1359

Open
fstaudt opened this issue Apr 2, 2023 · 4 comments
Open

NoSuchMethodError on snakeyaml parser in unit tests since 1.13.3 #1359

fstaudt opened this issue Apr 2, 2023 · 4 comments

Comments

@fstaudt
Copy link

fstaudt commented Apr 2, 2023

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: fstaudt/helm-values#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

@YannCebron
Copy link
Member

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

@YannCebron YannCebron closed this as not planned Won't fix, can't repro, duplicate, stale Apr 3, 2023
@fstaudt
Copy link
Author

fstaudt commented Apr 3, 2023

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: #473

Could you consider reopening the issue ?

@fstaudt
Copy link
Author

fstaudt commented Mar 3, 2024

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.

@hsz
Copy link
Member

hsz commented Jul 19, 2024

@fstaudt Could you please verify if this issue is still valid in 2.0?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants