objectionary / eoc

Command-line toolkit for parsing, compiling, transpiling, optimizing, linking, dataizing, and running EOLANG programs
https://www.npmjs.com/package/eolang
MIT License
17 stars 13 forks source link

Can't generate PHI expressions #359

Closed deemp closed 1 week ago

deemp commented 1 week ago

@maxonfjvipon, @yegor256

I used the Java program from here.

I converted .java to .class using openjdk 21.0.3 2024-04-16:

javac org/eolang/streams/Main.java

I converted .class to .xmir:

npx eoc jeo:disassemble --classes org

I tried to convert .xmir to .phi:

npx eoc phi --phi-input target

I got an error

EO objects registered in .eoc/eo-foreign.json
Assembling into .eoc
[ERROR] There is no 'DISCOVERED_AT' attribute in the tojo
[ERROR] 'org.eolang.maven.PullMojo@8aa1cd8' execution failed
[ERROR] There is no 'DISCOVERED_AT' attribute in the tojo
[ERROR] Failed to execute goal org.eolang:eo-maven-plugin:0.39.2:assemble (default-cli) on project eoc: 'org.eolang.maven.AssembleMojo@3a2d3909' execution failed: java.lang.IllegalStateException: org.apache.maven.plugin.MojoFailureException: 'org.eolang.maven.PullMojo@8aa1cd8' execution failed: org.eolang.maven.tojos.AttributeNotFoundException: There is no 'DISCOVERED_AT' attribute in the tojo -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
The command "/home/eyjafjallajokull/Desktop/gh/normalizer/node_modules/eolang/mvnw/mvnw eo:assemble -Deo.version=0.39.2 -Deo.tag=0.38.2 --quiet -Deo.sourcesDir=/home/eyjafjallajokull/Desktop/gh/normalizer/program -Deo.targetDir=/home/eyjafjallajokull/Desktop/gh/normalizer/program/.eoc -Deo.outputDir=/home/eyjafjallajokull/Desktop/gh/normalizer/program/.eoc/classes -Deo.generatedDir=/home/eyjafjallajokull/Desktop/gh/normalizer/program/.eoc/generated-sources -Deo.placed=/home/eyjafjallajokull/Desktop/gh/normalizer/program/.eoc/eo-placed.csv -Deo.placedFormat=csv --batch-mode --color=never --update-snapshots --fail-fast --strict-checksums" exited with objectionary/eo#1 code
yegor256 commented 1 week ago

@deemp please, try to update the version of eolang (you need to have version 0.23.0):

npm update eolang

then, run it with the --alone flag:

npx eoc phi --alone --phi-input target
deemp commented 1 week ago

@yegor256, yes, it worked.