eo
eo copied to clipboard
Home.java:44-46: create load function (it has to be able...
The puzzle 1105-4c34ccb4
from #1105 has to be resolved:
https://github.com/objectionary/eo/blob/f037ce68a9f1d9e7f46ea638739c134400809555/eo-maven-plugin/src/main/java/org/eolang/maven/Home.java#L44-L46
The puzzle was created by @rultor on 20-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.
@mximp please, take care of this one
@yegor256 Do we really need load
function? I suggest implementing this by replacing all path
with new Home().path(path)
. It allows us to get all files by corrected path. What do you think about this idea?
@yasamprom it seems logical to me to have Home
class like this:
class Home {
load();
save();
exists();
}
@yegor256 I still have some questions. For example, we have this code in PlaceMojo.java
:
final Path home = this.targetDir.toPath().resolve(ResolveMojo.DIR);
if (new Home().exists(home)) {
final Collection<String> deps = new DepDirs(home);
I guess we will have to replace DepDirs(home)
with DepDirs(new Home().path(home))
. Am I right? If yes, we will also have to do the same in many other places. Then I don't understand why having load
function is better than usage of path(path)
everywhere we use simple path
. If we do that, we will use new Home().path(path)
almost always except places where we use load
. Is it good?
@yegor256 what do you think?
@yegor256
@volodya-lombrozo please assist
The puzzle 1105-4c34ccb4
has disappeared from the source code, that's why I closed this issue.