objectionary / eo

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

Attribute @line is absent #3189

Open volodya-lombrozo opened 5 months ago

volodya-lombrozo commented 5 months ago

I'm still trying to convert at least something from xmir to phi. At this time I faced with the problem related to line attribute in the xmir.

I have the following part in my xmir file:

 <o base="string" data="bytes" name="descriptor">4C 6F 72 67 2F 73 70 72 69 6E 67 66 72 61 6D 65 77 6F 72 6B 2F 62 6F 6F 74 2F 61 75 74 6F 63 6F 6E 66 69 67 75 72 65 2F 53 70 72 69 6E 67 42 6F 6F 74 41 70 70 6C 69 63 61 74 69 6F 6E 3B</o>

I run the xmir->phi transformation using the following configuration:

<plugin>
  <groupId>org.eolang</groupId>
  <artifactId>eo-maven-plugin</artifactId>
  <version>0.38.0</version>
  <executions>
    <execution>
      <id>convert-xmir-to-phi</id>
      <phase>generate-test-sources</phase>
      <goals>
        <goal>xmir-to-phi</goal>
      </goals>
      <configuration>
        <phiInputDir>${project.build.directory}/generated-sources/opeo-decompile-modified-xmir</phiInputDir>
        <phiOutputDir>${project.build.directory}/generated-sources/opeo-decompile-modified-phi</phiOutputDir>
      </configuration>
    </execution>
  </executions>
</plugin>

And get the following error:

[ERROR] net.sf.saxon.style.XSLMessage@17ce9dbf: Attribute @line is absent at "descriptor"
[ERROR] #fatalError(): Processing terminated by xsl:message at line 65 in add-refs.xsl; SystemID: file:///org/eolang/parser/add-refs.xsl; Line#: 65; Column#: 42

The entire file which I'm trying to convert: FactorialApplication.xmir.txt

The entire log output I get: build.log


I believe we have to remove this coupling with line numbers because we can generate xmir files not only from eo source code, so we just might not have lines.

volodya-lombrozo commented 5 months ago

@yegor256 What do you think?

volodya-lombrozo commented 4 months ago

I'll take this issue

yegor256 commented 4 weeks ago

@volodya-lombrozo still a bug or we can close this one?

volodya-lombrozo commented 4 weeks ago

@yegor256 I strongly believe that it's a bug. The IR shouldn't contain the lines attribute as a mandatory element.

volodya-lombrozo commented 4 weeks ago

Blocks https://github.com/objectionary/jeo-maven-plugin/issues/635