Description
Summary
When running graphify update . on Windows in a Java project, Graphify unexpectedly creates a nested graphify-out/cache directory inside the source tree instead of using the project-level graphify-out/cache.
Expected cache directory:
<repo-root>/graphify-out/cache/
Actual cache directory:
<repo-root>/src/main/java/<package-prefix>/graphify-out/cache/
The command then fails while writing a temporary cache file:
[graphify watch] Rebuild failed: [WinError 5] Access is denied: 'src\\main\\java\\<package-prefix>\\graphify-out\\cache\\<hash>.tmp'
Nothing to update or rebuild failed ? check output above.
Environment
OS: Windows
Shell: PowerShell
Project type: Java / Spring Boot / Maven
Command: graphify update .
Graphify output directory expected by docs: graphify-out/
I am running the command from the repository root.
Steps to Reproduce
-
Use a Java project with a standard Maven-style source layout:
src/main/java/<package-prefix>/<app-files>.java -
Ensure there is no nested Graphify output directory inside the source tree:
src/main/java/<package-prefix>/graphify-out/ -
From the repository root, run:
graphify update .
-
Observe that Graphify creates a nested cache directory under the Java source tree:
src/main/java/<package-prefix>/graphify-out/cache/ -
The command fails with
WinError 5while writing a.tmpcache file under that nested directory.
Actual Behavior
Graphify writes AST cache files to a nested source-tree path:
src/main/java/<package-prefix>/graphify-out/cache/<hash>.json
src/main/java/<package-prefix>/graphify-out/cache/<hash>.tmp
The generated cache JSON corresponds to a normal Java source file under:
src/main/java/<package-prefix>/<app-file>.java
So the cache content itself appears to be normal AST extraction output, but the cache location appears wrong.
Expected Behavior
Graphify should write incremental cache files to the project-level output directory:
graphify-out/cache/
It should not create a nested graphify-out directory inside src/main/java/....
Why This Looks Like a Bug
The documented Graphify output structure places all generated artifacts under the root-level graphify-out/ directory, including cache/.
In this case, the cache path appears to be resolved relative to an intermediate Java package/source directory rather than the repository root or the existing root-level Graphify output directory.
The issue is reproducible even after manually deleting the nested directory:
src/main/java/<package-prefix>/graphify-out/
Running graphify update . recreates it.
Workaround
Adding ignore rules prevents the generated nested cache files from being committed:
src/main/java/**/graphify-out/
**/graphify-out/cache/However, this only hides the generated files from Git. It does not prevent graphify update . from creating the nested directory or failing with WinError 5.
Requested Fix
Please ensure that graphify update . resolves its cache/output directory from the repository root or configured Graphify output directory, rather than from a Java source/package parent directory.
It would also help if temporary cache writes on Windows handled atomic replacement failures more gracefully, so failed runs do not leave .tmp files in unexpected locations.
Activity
[-]graphify update creates nested src/main/java graphify-out cache on Windows[/-][+]graphify update creates nested graphify-out cache under Java source folders on Windows[/+]Fix 5 issues: .mjs import edges (Graphify-Labs#414), cache root path (G…
v0.4.19: fix #390 #298 #410 #401 #385, team workflow docs, Windows/pi…
safishamsi commentedon Apr 17, 2026
Fixed in v0.4.19 —
cache_dirand_rebuild_codeinwatch.pynow call.resolve()on the root path, preventing the nestedgraphify-out/graphify-outdirectory on Windows.v0.4.19: fix #390 #298 #410 #401 #385, team workflow docs, Windows/pi…
fix #374 #401 #410 #413 #385: vscode install cmd, core.hooksPath, abs…
v0.4.19: fix Graphify-Labs#390 Graphify-Labs#298 Graphify-Labs#410 Gr…