fasten-project / fasten

Analyse package dependency networks at the call graph level
https://www.fasten-project.eu
Apache License 2.0
91 stars 28 forks source link

MavenResolverIO assumes dep_graph directory is present and crashes if it isn't #464

Closed MagielBruntink closed 2 years ago

MagielBruntink commented 2 years ago

I'm assuming this is related to recent changes to the REST API / Maven Resolver implementation there.

Repo: with DC:

2022-05-30 13:31:44.030  INFO 1 --- [nio-8080-exec-1] e.f.c.maven.resolution.MavenResolverIO   : Saving poms to /mnt/fasten/dep_graph/poms.json ...
2022-05-30 13:31:44.035 ERROR 1 --- [nio-8080-exec-1] e.f.a.restapiplugin.api.ResolutionApi    : Error constructing dependency graph maven resolver

java.lang.RuntimeException: java.io.FileNotFoundException: /mnt/fasten/dep_graph/poms.json-tmp (No such file or directory)
at eu.fasten.core.maven.resolution.MavenResolverIO.saveToDisk(Unknown Source) ~[core-0.0.8.jar!/:na]
at eu.fasten.core.maven.resolution.MavenResolverIO.loadResolver(Unknown Source) ~[core-0.0.8.jar!/:na]
MagielBruntink commented 2 years ago

It doesn't crash and seems to work if you create the dep_graph directory manually first.

mir-am commented 2 years ago

I also experienced this issue. It can be solved by manually creating the dep_graph directory.

MagielBruntink commented 2 years ago

The proper solution is that the code creates the necessary directories if they are not there.

mir-am commented 2 years ago

The issue is addressed in #467.