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

it's impossible to use PHI/UNPHI programatically (outside of Mojos) #3383

Open volodya-lombrozo opened 1 month ago

volodya-lombrozo commented 1 month ago

Currently, in order to apply phi/unphi transformations I must call xmir-to-phi and phi-to-xmir goals. It's fine for most of the integration pipelines. However, I faced with the following problem: I need to use these transformations in one of my unit tests. And it's almost impossible to do.

What I suggest:

  1. Create Phi#unphi() and Xmir#toPhi() methods
  2. Use them in PhiMojo and UnphiMojo

Benefits:

  1. The ability to use these transformations programmatically, without the need to call xmir-to-phi and phi-to-xmir goals
  2. We will be able to test phi/unphi transformations through unit tests inside eo-maven-plugin (Now we use integration tests with FakeMaven)
  3. We will reduce coupling between internal components of PhiMojo and UnphiMojo and simplify them significantly
volodya-lombrozo commented 1 month ago

@yegor256 @maxonfjvipon Could you take a look, please?

volodya-lombrozo commented 1 month ago

Blocks https://github.com/objectionary/jeo-maven-plugin/pull/720

yegor256 commented 1 month ago

@maxonfjvipon I think it's a good idea, let's do it?

0crat commented 1 month ago

@volodya-lombrozo Hey there, bug hunter! 🐛 Great job spotting that new bug - you've just bagged yourself 8 points! It's awesome how you're helping us level up our project's quality. Keep your eyes peeled for anything else that doesn't quite hit the mark. Remember, we're always keen to hear about any issues you come across. Your keen eye has pushed your balance up to +101 points. Keep up the great work!