MarkMojo.java:80-83: The mojo doesn't update program...
The puzzle 1062-6d8a2439 from #1062 has to be resolved:
https://github.com/objectionary/eo/blob/2bb6d7d2680d2e526e80f0d87a79e6a6cdedcd8d/eo-maven-plugin/src/main/java/org/eolang/maven/MarkMojo.java#L80-L83
The puzzle was created by rultor on 15-Sep-22.
Estimate: 30 minutes, role: DEV.
If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.
@yegor256 any objection on the tasks?
@mximp no objections, let's do it
@OlesiaSub Please assist with this
@mximp could you please give me a quick overview of what is going on in foreign catalog? And what exactly "program version" is? I thought is it +version meta, but apparently it is something else. Maybe you can tell me where I can find an example to reproduce this issue?
@OlesiaSub you can check the logic behind usage of AssembleMojo.ATTR_VERSION.
In short: the version attribute is set in several phases: register, discover and mark. Actual value is set in mark phase and is taken from resolved dependencies (06-resolve folder).
The issue is that it's set conditionally and the condition is not always correct.
You can think of foreign catalog as a global index of compilation artifacts during EO build.
@yegor256 can you please help, it is true that to solve this issue I'll have to add a replace method to Tojo in your lib or maybe there is another solution that I didn't think of?
@OlesiaSub you can simply use Tojo#set() method. Why not?
@yegor256 as you stated: "It's illegal to use #set() to change '%s' attribute" and I need to change the version attribute, so it won't work, right?... or am I missing smth
@OlesiaSub it's illegal to change id attribute
@yegor256 as you stated: "It's illegal to use #set() to change '%s' attribute" and I need to change the
versionattribute, so it won't work, right?... or am I missing smth
@OlesiaSub Tojo::set() is used exactly for setting foreign attributes. Check MarkMojo class: actual version attribute is set there.