objectionary / eo

EOLANG, an Experimental Pure Object-Oriented Programming Language Based on 𝜑-calculus
https://www.eolang.org
MIT License
1.02k stars 127 forks source link

Invalid content was found starting with element 'comments' #3527

Closed volodya-lombrozo closed 13 hours ago

volodya-lombrozo commented 1 day ago

I'm trying to update eo-parser library in the jeo-maven-plugin to 0.42.0 version and got the following exception:

Invalid content was found starting with element 'comments'  

For the XMIR (excerpt):

<program>
   ....
   <objects>
   ....
   </objects>
   <comments>
      <comment line="4">This is the default 64+ symbols comment in front of named abstract object.</comment>
      <comment line="26">This is the default 64+ symbols comment in front of named abstract object.</comment>
      <comment line="44">This is the default 64+ symbols comment in front of named abstract object.</comment>
   </comments>
</program>

This XMIR was received after the following modifications:

  1. Disassemble Java bytecode to XMIR
  2. Translate XMIR to PHI
  3. Translate PHI back to XMIR ( unphi)
  4. Then I get this XMIR, convert it to EO new Xmir.Default(this.canonical).toEO(), then parse it again new EoSyntax(this.name, new InputOf(eoprog)).parsed();

And on the (4) step I get the exception, I showed above.
Expected behaviour: when we transform XMIR to EO and back it shouldn't produce errors.

volodya-lombrozo commented 1 day ago

@yegor256 @maxonfjvipon Take a look, please. It's a blocker.

yegor256 commented 1 day ago

@volodya-lombrozo probably you used an old version of XSD. Are you sure you don't have your own copy of it and uses just eo-parser package with the XSD inside?

volodya-lombrozo commented 13 hours ago

@yegor256 It seems to have helped. Thank you! I had a duplicate of XMIR.xsd in my resources, and removing it solved the problem.