Skip to content

armgit / peel

Public Imported from GitHub
0

Uninstall Mac apps with every file they leave behind, and see why each belongs. Free up space, fine-tune macOS, and set up Terminal.

List the registry cache Hex keeps since version 2.6

Țugui Dragoșbb813b5fea10
diff --git a/Packages/PeelCore/Sources/PeelCore/Developer/DeveloperCaches.swift b/Packages/PeelCore/Sources/PeelCore/Developer/DeveloperCaches.swift
index 40fc89ae..e2be0de1 100644
--- a/Packages/PeelCore/Sources/PeelCore/Developer/DeveloperCaches.swift
+++ b/Packages/PeelCore/Sources/PeelCore/Developer/DeveloperCaches.swift
@@ -780,6 +780,7 @@ public enum DeveloperCaches {
Definition(id: "hex", name: "Hex", systemImage: "shippingbox", appBundleIdentifiers: [], folders: [
Folder(".hex/packages", .downloads, source: "https://github.com/hexpm/hex/blob/8ce21f32a72de3995ae142d57ca3dffb0d46e645/lib/hex/scm.ex#L8"),
Folder(".hex/cache.ets", .cache, source: "https://github.com/hexpm/hex/blob/8ce21f32a72de3995ae142d57ca3dffb0d46e645/lib/hex/registry/server.ex#L8"),
+ Folder(".hex/cache.bin", .cache, source: "https://github.com/hexpm/hex/blob/edec2dda0968d5a6babd202bad17fcea2d1640bb/lib/hex/registry/server.ex#L8"),
]),
Definition(id: "rebar3", name: "rebar3", systemImage: "shippingbox", appBundleIdentifiers: [], folders: [
Folder(".cache/rebar3/hex", .downloads, source: "https://github.com/erlang/rebar3/blob/f23f21b5166613b555cead1fc43135a411e90451/apps/rebar/src/rebar_packages.erl#L159-L160"),
diff --git a/Packages/PeelCore/Tests/PeelCoreTests/DeveloperCachesTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/DeveloperCachesTests.swift
index 66d76e36..299df790 100644
--- a/Packages/PeelCore/Tests/PeelCoreTests/DeveloperCachesTests.swift
+++ b/Packages/PeelCore/Tests/PeelCoreTests/DeveloperCachesTests.swift
@@ -997,6 +997,15 @@ struct DeveloperCachesTests {
#expect(locations.allSatisfy { $0.kind == .deviceSupport && !$0.isRecommended })
}
+ @Test func findsTheRegistryCacheHexKeepsSinceItsVersion26() async throws {
+ let directory = try TemporaryDirectory()
+ try directory.file(".hex/cache.bin", bytes: 4_000)
+
+ let locations = await scanned(directory.url).filter { $0.id == "hex" }.flatMap(\.locations)
+
+ #expect(locations.map(\.url.lastPathComponent) == ["cache.bin"])
+ }
+
@Test func listsEachJetBrainsProductsLogsOnTheirOwn() async throws {
let directory = try TemporaryDirectory()
try directory.file("Library/Logs/JetBrains/IntelliJIdea2026.2/idea.log", bytes: 4_000)