Uninstall Mac apps with every file they leave behind, and see why each belongs. Free up space, fine-tune macOS, and set up Terminal.
Swift cache-cleanercleanerclideveloper-toolsdisk-cleanupdisk-spaceduplicate-finderhomebrewliquid-glassmac-cleanermacosmacos-appmacos-golden-gatemacos-tahoemacos-tweaksswiftswiftuiterminal-themesuninstalluninstaller
List what MobileBuildMCP keeps for each workspace
Țugui Dragoș2b410ef7b832
diff --git a/Packages/PeelCore/Sources/PeelCore/Developer/DeveloperCaches.swift b/Packages/PeelCore/Sources/PeelCore/Developer/DeveloperCaches.swiftindex fa42cd3a..6abe8725 100644--- a/Packages/PeelCore/Sources/PeelCore/Developer/DeveloperCaches.swift+++ b/Packages/PeelCore/Sources/PeelCore/Developer/DeveloperCaches.swift@@ -385,6 +385,20 @@ public enum DeveloperCaches {rowsDepth: 2, rowEnding: ".xcarchive", movedBy: .xcodeSetting("IDECustomDistributionArchivesLocation")),]),+ // MobileBuildMCP was XcodeBuildMCP before it was renamed: each name's folders as each version wrote them, never+ // its state or locks.+ Definition(id: "mobilebuildmcp", name: "MobileBuildMCP", systemImage: "hammer", appBundleIdentifiers: [], folders: [+ Folder("Library/Developer/MobileBuildMCP/workspaces/*/DerivedData", .buildData, source: "https://github.com/getsentry/MobileBuildMCP/blob/d13ff0c707b0681769cf31da0eb42c4f94ceafff/src/utils/log-paths.ts#L55-L62"),+ Folder("Library/Developer/MobileBuildMCP/workspaces/*/result-bundles", .buildData, source: "https://github.com/getsentry/MobileBuildMCP/blob/d13ff0c707b0681769cf31da0eb42c4f94ceafff/src/utils/log-paths.ts#L55-L62"),+ Folder("Library/Developer/MobileBuildMCP/workspaces/*/test-products", .buildData, source: "https://github.com/getsentry/MobileBuildMCP/blob/d13ff0c707b0681769cf31da0eb42c4f94ceafff/src/utils/log-paths.ts#L55-L62"),+ Folder("Library/Developer/MobileBuildMCP/workspaces/*/logs", .logs, source: "https://github.com/getsentry/MobileBuildMCP/blob/d13ff0c707b0681769cf31da0eb42c4f94ceafff/src/utils/log-paths.ts#L55-L62"),+ Folder("Library/Developer/XcodeBuildMCP/workspaces/*/DerivedData", .buildData, source: "https://github.com/getsentry/MobileBuildMCP/blob/e21bf437b923d9717624b6c97c9d367dbf210dff/src/utils/log-paths.ts#L55-L62"),+ Folder("Library/Developer/XcodeBuildMCP/workspaces/*/result-bundles", .buildData, source: "https://github.com/getsentry/MobileBuildMCP/blob/e21bf437b923d9717624b6c97c9d367dbf210dff/src/utils/log-paths.ts#L55-L62"),+ Folder("Library/Developer/XcodeBuildMCP/workspaces/*/test-products", .buildData, source: "https://github.com/getsentry/MobileBuildMCP/blob/e21bf437b923d9717624b6c97c9d367dbf210dff/src/utils/log-paths.ts#L55-L62"),+ Folder("Library/Developer/XcodeBuildMCP/workspaces/*/logs", .logs, source: "https://github.com/getsentry/MobileBuildMCP/blob/e21bf437b923d9717624b6c97c9d367dbf210dff/src/utils/log-paths.ts#L55-L62"),+ Folder("Library/Developer/XcodeBuildMCP/DerivedData", .buildData, source: "https://github.com/getsentry/MobileBuildMCP/blob/8ad1a781cb6145acc176965dede823ed245357ac/src/utils/log-paths.ts#L4-L7"),+ Folder("Library/Developer/XcodeBuildMCP/logs", .logs, source: "https://github.com/getsentry/MobileBuildMCP/blob/8ad1a781cb6145acc176965dede823ed245357ac/src/utils/log-paths.ts#L4-L7"),+ ]),Definition(id: "swiftpm", name: "Swift Package Manager", systemImage: "swift", appBundleIdentifiers: [], folders: [Folder("Library/Caches/org.swift.swiftpm", .downloads, source: "https://github.com/swiftlang/swift-package-manager/blob/708c2736d671a3c32a6a058cd3ee331b36852876/Sources/Basics/FileSystem/FileSystem+Extensions.swift#L246-L253"),]),diff --git a/Packages/PeelCore/Tests/PeelCoreTests/DeveloperCachesTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/DeveloperCachesTests.swiftindex d6d7a365..16cc871d 100644--- a/Packages/PeelCore/Tests/PeelCoreTests/DeveloperCachesTests.swift+++ b/Packages/PeelCore/Tests/PeelCoreTests/DeveloperCachesTests.swift@@ -764,6 +764,33 @@ struct DeveloperCachesTests {#expect(locations.first?.isRecommended == true)}+ @Test func listsWhatTheXcodeBuildServerKeepsForEachWorkspaceAndNeverItsState() async throws {+ let directory = try TemporaryDirectory()+ let workspaces = [+ "Library/Developer/MobileBuildMCP/workspaces/app-1234", "Library/Developer/XcodeBuildMCP/workspaces/app-5678",+ ]+ for workspace in workspaces {+ for part in ["DerivedData/Build/x", "result-bundles/r.xcresult/x", "test-products/p/x", "logs/build.log",+ "state/marker", "locks/lock"] {+ try directory.file("\(workspace)/\(part)", bytes: 4_096)+ }+ }+ try directory.file("Library/Developer/XcodeBuildMCP/DerivedData/Build/x", bytes: 4_096)+ try directory.file("Library/Developer/XcodeBuildMCP/logs/build.log", bytes: 4_096)++ let locations = await scanned(directory.url).flatMap(\.locations)++ let listed = Set(locations.map {+ $0.url.pathComponents.drop { $0 != "Developer" }.dropFirst().joined(separator: "/")+ })+ let kept = ["DerivedData", "result-bundles", "test-products", "logs"]+ let expected = Set(workspaces.flatMap { workspace in+ kept.map { "\(workspace.dropFirst("Library/Developer/".count))/\($0)" }+ } + ["XcodeBuildMCP/DerivedData", "XcodeBuildMCP/logs"])+ #expect(listed == expected)+ #expect(locations.allSatisfy { $0.isRecommended })+ }+@Test func neverSelectsMavensRepositoryAndOffersWhatOtherBuildToolsDownloadAgain() async throws {let directory = try TemporaryDirectory()try directory.file(".m2/repository/org/example/app/1.0/app-1.0.jar", bytes: 400_000)