Repository navigation
Move registry cache to XDG cache directory - #34
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a machine-local project registry at
$XDG_CACHE_HOME/lnk/registry.json, moving it out of the lnk repo so relocating or renaming the repo no longer orphans the mapping. Complements the existing project-scope work.What's new
<repo>/.lnkprojectcacheto$XDG_CACHE_HOME/lnk/registry.json, falling back to~/.cache/lnk/registry.jsonand then the OS temp directory.LNK_REGISTRYoverride - redirect the registry file anywhere, matching theTODO_REGISTRYescape hatch in the todo CLI.RegistryPath()resolves the location, the cache directory is created on demand, and writes go through a temp file plus rename.project cache,project sync --all, and the doctor messages now describe the registry; README and AGENTS.md are updated.Behavior changes / guardrails
<repo>/.lnkprojectcacheis ignored; runlnk project cache --scan <dir>to rebuild the registry.{"projects":[...]}), so consumers only need the new path.Testing
RegistryPath()(override, XDG, home fallback) and that saves create the registry directory and leave no temp file behind.sync --all, and doctor tests resolve the registry throughservice.RegistryPath(), andTestHomepinsXDG_CACHE_HOMEfor hermetic runs.make checkruns fmt, vet, lint, unit, and integration suites; all green.