Open MarkNahabedian opened 1 year ago
Thanks for the interest in the package! That's a good suggestion, but it'd require a bit of redesign which may add more complexity, because many mktempdir
a are used to create directories which are passed as arguments to other functions, so the life of those directories isn't confined to a single scope.
Thanks for your quick response.
I took a quick look at the code and appreciate the amount of refactoring that would be needed. All of the mktempdir calls would need to be lifter to scopes that encompass the complete lifetime of their respective temporary directories and those directory paths passed down to where they're needed.
I might take a deeper look and maybe write a PR when I finish up with other projects.
I believe they can mostly or entirely be avoided by passing a root
directory to analyze
to store the package code in. If that's not the case, I would prefer PRs fixing or documenting that (i.e. letting those be configurable directories) rather than big refactorings
If one runs the PackageAnalyzer on many packages, for example the entirity of the General Registry, it takes that JUlia session a really long time to exit because of all of the defered cleanup.
This also would release disk space sooner, giving a much smaller file system footprint for such large runs.