Repository navigation
v0.17.0
Two Go analysis caches
golangci-lint and gopls keep an analysis cache that they rebuild on the
next run. Exodrive moves the folder and puts a symbolic link in its place.
| Provider | What moves | Variable |
|---|---|---|
golangci-lint |
The analysis cache | GOLANGCI_LINT_CACHE |
gopls |
The analysis cache | none; the system cache folder |
The golangci-lint row refuses while golangci-lint runs, because a lint run
writes the cache. The gopls row names no process: an editor keeps gopls
running, so the lock would stop a move on every machine with an open editor.
The window rail shows both rows in the Go group.
Evidence on this Mac
$ exodrive migrate --target=/Volumes/PHD/… --tools=golangci-lint
✅ Migrated golangci-lint Cache.
Migration completed. Reclaimed 17.2 MB on the local disk.
$ ls -ld ~/Library/Caches/golangci-lint
lrwxr-xr-x golangci-lint -> /Volumes/PHD/…/go-tools/golangci-lint
$ golangci-lint run ./...
golangci-lint: No issues found (2.0s, a warm cache)
$ exodrive verify --all
[ok] golangci-lint.cache: … (54317 files, 17.2 MB)
A file created through the link landed in the copy on the drive, so the link
carries writes as well as reads. exodrive rollback golangci-lint.cache
restored a real folder, and golangci-lint cache status read 17.2 MiB again.
What this release does not prove
The gopls cache was not moved on this Mac: five gopls processes hold it, and
the row has no lock by design. The move itself uses the same code as the
golangci-lint row, and a test covers it.