Configuration-as-code-plugin: Shade snakeyaml

Created on 2 Aug 2018  路  15Comments  路  Source: jenkinsci/configuration-as-code-plugin

snakeyaml is used in few plugins and is known for compatibility breaks, so we can't just rely on an API plugin. Preferable the shade this dependency to avoid classpath conflicts.

cc @abayer

Most helpful comment

@ewelinawilkosz I have marked it as a must-have for now. Taking the known incompatibilities across releases, it is critical to have it in place for the final release

All 15 comments

If we do that, it must be done before the final release.
Some SnakeYaml classes are exposed to API

indeed, org.jenkinsci.plugins.casc.yaml.* as one can expect, also a minor reference from org.jenkinsci.plugins.casc.model.Scalar#tag

@ewelinawilkosz I have marked it as a must-have for now. Taking the known incompatibilities across releases, it is critical to have it in place for the final release

I understand @oleg-nenashev, will make sure we have it merged before 1.0

removed references tu snakeyaml in APIs by 69c5262
this lowers priority for this to be implemented.

I tried applying same layout as https://github.com/jenkinsci/docker-traceability-plugin
but doing so, as I'm changing import to use shaded classes, I can't get my IDE (Jetbrains Idea) to find the matching classes, and this mostly make it impossible to work on plugin's codebase.

I get the same issue importing docker-traceability-plugin's codebase in my IDE. Did I miss something ? I welcome any suggestion on how maintainer do with such plugins.

@oleg-nenashev IIUC you're maintainer on docker-traceability-plugin. How do you manage to handle this challenge within your IDE ?

@ndeloof I have transferred ownership to @alexanderrtaylor 1 year ago or so. Back then I was using NetBeans which was working well

ok. I'd prefer I don't have to switch to another IDE just to workaround jenkins' lack of plugin isolation.

Tried proposed workaround without success :'(
Are all plugins developers using netbeans ?

I expected I can include this in RC3 but can't find a fix.
I welcome suggestions

No, I use intellij as well!

I managed to shade it in a way so that IntelliJ knows.

See this lovely comment https://youtrack.jetbrains.com/issue/IDEA-126596#focus=streamItem-27-3046897.0-0

Was this page helpful?
0 / 5 - 0 ratings