Create new temporary directory/resource extension
See original GitHub issueAfter Marc Philipp implemented the @TempDir
extension in Pioneer, it was later also added to Jupiter. It didn’t (and as of September 2020 doesn’t) support custom file systems, but other than that is more feature-rich than Pioneer’s variant. This creates an unpleasant situation where there are two extensions that solve the same problem with the same approach, but slightly different feature sets (and an identical name to boot).
That said, there are a lot of feature requests for Jupiter’s variant (⚠️ some of these are already implemented! ⚠️):
- Multiple declarations of
@TempDir
in same parameter list or class declaration should fail - Support @TempDir on constructor parameters
- Introduce cleanup mode in @TempDir
- Multiple @TempDirs should result in multiple directories
- Provide support for setting a custom parent directory for @TempDir
- Support disabling cleanup for @TempDir
- Support custom file system for
@TempDir
- Make
@TempDir
restore mint permissions before closing context to avoidAccessDeniedException
After evaluating the situation in #277, we decided to remove the extension before the 1.0 release with the goal to look for a better solution to the problem in the future (i.e. this issue). So the task is to come up with a temporary directory (or, more generally temporary resource) extension that covers more than what Jupiter does, possibly with an approach that makes different trade-offs (so users of Jupiter and Pioneer have more choices to solve their specific problem).
One interesting proof of concept to look at is @sormuras’: 1, 2
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:32 (31 by maintainers)
Top GitHub Comments
I’ve been on @nipafx’s Twitch stream tonight, doing some remote pair programming - thank you very much for your help, Nicolai! - but I now have to solve some other seemingly concurrency-related bugs that have cropped up (noted in my uber TODO list further up). I’ll report back when I have the time to delve into things further.
Great news, I’ve fixed the illusive bug! So now the only thing I think I have to do is address the thread safety.