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.

Wait for every channel of Zed before moving its folders

Țugui Dragoș618ddabadcf3
diff --git a/Packages/PeelCore/Sources/PeelCore/Developer/DeveloperCaches.swift b/Packages/PeelCore/Sources/PeelCore/Developer/DeveloperCaches.swift
index 67f516eb..626258fc 100644
--- a/Packages/PeelCore/Sources/PeelCore/Developer/DeveloperCaches.swift
+++ b/Packages/PeelCore/Sources/PeelCore/Developer/DeveloperCaches.swift
@@ -948,7 +948,11 @@ public enum DeveloperCaches {
Definition(id: "nova", name: "Nova", systemImage: "curlybraces", appBundleIdentifiers: ["com.panic.Nova"], folders: [
Folder("Library/Caches/com.panic.Nova", .cache, source: "https://developer.apple.com/documentation/foundation/filemanager/searchpathdirectory/cachesdirectory"),
]),
- Definition(id: "zed", name: "Zed", systemImage: "curlybraces", appBundleIdentifiers: ["dev.zed.Zed"], folders: [
+ // Every channel of Zed keeps the same folders (`APP_NAME` in paths.rs) under an identifier of its own, the
+ // `bundle-*` entries of crates/zed/Cargo.toml at the same commit.
+ Definition(id: "zed", name: "Zed", systemImage: "curlybraces", appBundleIdentifiers: [
+ "dev.zed.Zed", "dev.zed.Zed-Preview", "dev.zed.Zed-Nightly", "dev.zed.Zed-Dev",
+ ], folders: [
Folder("Library/Caches/Zed", .cache, source: "https://github.com/zed-industries/zed/blob/a84689073d296dfd39987bc7dd478e43ef76d83a/crates/paths/src/paths.rs#L192-L199"),
Folder("Library/Logs/Zed", .logs, source: "https://github.com/zed-industries/zed/blob/a84689073d296dfd39987bc7dd478e43ef76d83a/crates/paths/src/paths.rs#L228-L235"),
Folder("Library/Application Support/Zed/node/node-*/cache", .cache, source: "https://github.com/zed-industries/zed/blob/a84689073d296dfd39987bc7dd478e43ef76d83a/crates/node_runtime/src/node_runtime.rs#L721-L724"),
diff --git a/Packages/PeelCore/Tests/PeelCoreTests/DeveloperCachesTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/DeveloperCachesTests.swift
index 621e17a6..1d2a8eab 100644
--- a/Packages/PeelCore/Tests/PeelCoreTests/DeveloperCachesTests.swift
+++ b/Packages/PeelCore/Tests/PeelCoreTests/DeveloperCachesTests.swift
@@ -101,6 +101,12 @@ struct DeveloperCachesTests {
#expect(androidStudio.appBundleIdentifiers.contains("com.google.android.studio-EAP"))
}
+ @Test func everyChannelOfZedKeepsItsFoldersWhileItRuns() throws {
+ let zed = try #require(DeveloperCaches.definitions.first { $0.id == "zed" })
+
+ #expect(zed.appBundleIdentifiers == ["dev.zed.Zed", "dev.zed.Zed-Preview", "dev.zed.Zed-Nightly", "dev.zed.Zed-Dev"])
+ }
+
/// Space asks about a folder however it was spelled, so another spelling of the same folder (another case, or
/// the home folder through a link) must still find what the table lists inside it. Finding nothing, Space
/// would move Coursier's folder whole, the JVMs beside its cache included.