Skip to content

SpecsIo: OS-created temp directory and OS cache folder helpers - #33

Closed
lm-sousa wants to merge 1 commit into
masterfrom
clava-simplification
Closed

lm-sousa wants to merge 1 commit into
masterfrom
clava-simplification

Conversation

@lm-sousa

Copy link
Copy Markdown
Member

Adds two helpers to SpecsIo so callers stop hand-rolling temporary directory names (UUID concat, nanoTime+threadId, fixed cwd-relative names) and stop hardcoding OS cache conventions:

  • SpecsIo.createTempDirectory(prefix): unique directory allocated by the OS under the user temp folder (/tmp/tmp_<user> on Linux), registered for deletion on exit as a backstop; owners are expected to delete it when their lifecycle ends
  • SpecsIo.getOsCacheFolder(): user-level cache folder following OS conventions ($XDG_CACHE_HOME or ~/.cache, ~/Library/Caches, %LOCALAPPDATA%), created if missing
  • SpecsSystem.isMac()

Consumed by specs-feup/clava (stacked work): the parser/weaver/tester now use OS-allocated folders with per-instance ownership (clava #251, #264, #248, #249) and the clang-dumper cache root is unified on getOsCacheFolder() (clava #250).

Note: the branch also carries the earlier jOptions GuiHelper-coupling removal commit (5fafd1ae).

Tests: new cases in SpecsIoTest (uniqueness, OS temp parent, cache folder stability).

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@lm-sousa
lm-sousa force-pushed the clava-simplification branch from 410eaa4 to 5fafd1a Compare September 25, 2026 16:09
@lm-sousa

Copy link
Copy Markdown
Member Author

Superseded: this work moves to a dedicated dir-fixes branch stacked on clava-simplification, to keep the simplification PR untouched.

@lm-sousa lm-sousa closed this Sep 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant