You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use modello fairly often. But ffor years, I have never successfully gotten the snakeyaml-* plugins to work for me. I've tried several times with several versions of the plugin and the parser library, so I thought I'd give it a try modello-2.x.
The plugin produces generated code [for me] that won't compile with any 2.0+ version of snakeyaml. I ran an integration test build on a checkout of modello-2.1.2, and there appear to be no generated test executions for snakeyaml. Without such test executions, it seems reasonable that API changes would get missed.
Numerous issues exist within my generated code, such as
Snakeyaml's Parser constructor (in ParserImpl) requires a LoaderOptions object to use a Reader. Other options were @Deprecated at least as of snakeyaml-1.33. Adding a default new LoaderOptions() there would probably solve this.
Java5-based Map models (which gen as <String,String>) are processed as <String,Object> which cannot be compiled due to mistyping
The plugin generates this line for the Map for ( java.util.Map.Entry<String, String> entry : generatedProcessExecution.getExy().entrySet() ) where .getExy() returns a Map which is <String,Object> which the compiler (correctly) reports as cannot convert from element type Map.Entry<Object,String> to Map.Entry<String,String>
The relevant <field> in my model for exy (above) is
If I fall back to snakeyaml-1.33, then the only failure is the <String,Object> relative to the Map field. Even if that weren't the case, this would not be parity with modello-2.1.2's listed dependencies.
If I'm configuring something incorrectly that's triggering some of this, I'd love to hear what that is.
But they do not work. Hopefully someone picks it up.
Basically following comments should not have been accepted:
198388f998c45c6cf6da8
As Snakeyaml 1.x to 2.x migration is not simple and currently
this modello plugin is busted: it generates uncompilable
code (sue Snakeyaml breaking changes).
I use modello fairly often. But ffor years, I have never successfully gotten the
snakeyaml-*
plugins to work for me. I've tried several times with several versions of the plugin and the parser library, so I thought I'd give it a trymodello-2.x
.The plugin produces generated code [for me] that won't compile with any
2.0+
version ofsnakeyaml
. I ran an integration test build on a checkout ofmodello-2.1.2
, and there appear to be no generated test executions forsnakeyaml
. Without such test executions, it seems reasonable that API changes would get missed.Numerous issues exist within my generated code, such as
Parser
constructor (inParserImpl
) requires aLoaderOptions
object to use aReader
. Other options were@Deprecated
at least as ofsnakeyaml-1.33
. Adding a defaultnew LoaderOptions()
there would probably solve this.SequenceStartEvent
has a constructor whose last argument is aDumperOptions.FlowStyle
, not aboolean
. Also deprecated in 1.33.PROBABLY should be
FlowStyle.BLOCK
.Java5
-basedMap
models (which gen as<String,String>
) are processed as<String,Object>
which cannot be compiled due to mistypingfor ( java.util.Map.Entry<String, String> entry : generatedProcessExecution.getExy().entrySet() )
where
.getExy()
returns aMap
which is<String,Object>
which the compiler (correctly) reports as
cannot convert from element type Map.Entry<Object,String> to Map.Entry<String,String>
The relevant
<field>
in my model forexy
(above) isIf I fall back to
snakeyaml-1.33
, then the only failure is the<String,Object>
relative to theMap
field. Even if that weren't the case, this would not be parity withmodello-2.1.2
's listed dependencies.If I'm configuring something incorrectly that's triggering some of this, I'd love to hear what that is.
Attaching my model for reference.
The text was updated successfully, but these errors were encountered: