Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Home.java:44-46: create load function (it has to be able... #1246

Closed
0pdd opened this issue Sep 20, 2022 · 8 comments
Closed

Home.java:44-46: create load function (it has to be able... #1246

0pdd opened this issue Sep 20, 2022 · 8 comments
Assignees

Comments

@0pdd
Copy link

0pdd commented Sep 20, 2022

The puzzle 1105-4c34ccb4 from #1105 has to be resolved:

* @todo #1105:30min create load function (it has to be able read by path)
* It should be able to load data from file
* We also need to add new unit test

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.

@yegor256
Copy link
Member

@mximp please, take care of this one

@mximp mximp assigned yasamprom and unassigned mximp Sep 20, 2022
@yasamprom
Copy link
Contributor

yasamprom commented Sep 23, 2022

@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?

@yegor256
Copy link
Member

@yasamprom it seems logical to me to have Home class like this:

class Home {
  load();
  save();
  exists();
}

@yasamprom
Copy link
Contributor

@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?

@yasamprom
Copy link
Contributor

@yegor256 what do you think?

@yasamprom
Copy link
Contributor

@yegor256

@mximp mximp assigned mximp and unassigned yasamprom Oct 18, 2022
@mximp
Copy link
Contributor

mximp commented Oct 18, 2022

@volodya-lombrozo please assist

volodya-lombrozo pushed a commit to volodya-lombrozo/eo that referenced this issue Oct 18, 2022
volodya-lombrozo pushed a commit to volodya-lombrozo/eo that referenced this issue Oct 18, 2022
volodya-lombrozo pushed a commit to volodya-lombrozo/eo that referenced this issue Oct 18, 2022
volodya-lombrozo pushed a commit to volodya-lombrozo/eo that referenced this issue Oct 18, 2022
volodya-lombrozo pushed a commit to volodya-lombrozo/eo that referenced this issue Oct 18, 2022
volodya-lombrozo pushed a commit to volodya-lombrozo/eo that referenced this issue Oct 19, 2022
volodya-lombrozo pushed a commit to volodya-lombrozo/eo that referenced this issue Oct 19, 2022
volodya-lombrozo pushed a commit to volodya-lombrozo/eo that referenced this issue Oct 19, 2022
volodya-lombrozo pushed a commit to volodya-lombrozo/eo that referenced this issue Oct 19, 2022
volodya-lombrozo pushed a commit to volodya-lombrozo/eo that referenced this issue Oct 19, 2022
volodya-lombrozo pushed a commit to volodya-lombrozo/eo that referenced this issue Oct 19, 2022
volodya-lombrozo pushed a commit to volodya-lombrozo/eo that referenced this issue Oct 19, 2022
volodya-lombrozo pushed a commit to volodya-lombrozo/eo that referenced this issue Oct 19, 2022
volodya-lombrozo pushed a commit to volodya-lombrozo/eo that referenced this issue Oct 19, 2022
volodya-lombrozo pushed a commit to volodya-lombrozo/eo that referenced this issue Oct 19, 2022
volodya-lombrozo pushed a commit to volodya-lombrozo/eo that referenced this issue Oct 19, 2022
volodya-lombrozo pushed a commit to volodya-lombrozo/eo that referenced this issue Oct 19, 2022
volodya-lombrozo pushed a commit to volodya-lombrozo/eo that referenced this issue Oct 19, 2022
volodya-lombrozo pushed a commit to volodya-lombrozo/eo that referenced this issue Oct 19, 2022
@0pdd
Copy link
Author

0pdd commented Oct 20, 2022

The puzzle 1105-4c34ccb4 has disappeared from the source code, that's why I closed this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants