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 PureScript's, Bower's and aider's caches in Build Artifacts
Țugui Dragoș13c87b7e6b45
diff --git a/Packages/PeelCore/Sources/PeelCore/Developer/ProjectArtifacts.swift b/Packages/PeelCore/Sources/PeelCore/Developer/ProjectArtifacts.swiftindex fa6fa140..81805c82 100644--- a/Packages/PeelCore/Sources/PeelCore/Developer/ProjectArtifacts.swift+++ b/Packages/PeelCore/Sources/PeelCore/Developer/ProjectArtifacts.swift@@ -477,6 +477,34 @@ public enum ProjectArtifacts {name: "elm-stuff", markers: ["elm.json"], tool: "Elm", isGeneric: false,source: "https://github.com/elm/compiler/blob/1c278bf5ecf4136f122ce1cba436783c7f561dac/builder/src/Reporting/Exit.hs#L1994-L2001"),+ Definition(+ name: ".pulp-cache", markers: ["bower.json", "psc-package.json"], tool: "Pulp", isGeneric: false,+ source: "https://github.com/purescript-contrib/pulp/blob/78f7aa6ae76337ea6f8362cac03fb1c8ee1858cd/src/Pulp/Project.purs#L57-L62"+ ),+ Definition(+ name: ".psc-package", markers: ["psc-package.json"], tool: "psc-package", isGeneric: false,+ source: "https://github.com/purescript/psc-package/blob/2817cfd7bbc29de790d2ab7bee582cd6167c16b5/docs/faq.md#L11-L20"+ ),+ Definition(+ name: ".spago", markers: ["spago.yaml", "spago.dhall"], tool: "Spago", isGeneric: false,+ source: "https://github.com/purescript/spago/blob/b9ea21cb1416acb724977cba08f1e9325fae358d/README.md#L1589-L1593"+ ),+ // Not beside `bower.json` alone, which projects that never compile PureScript carry too.+ Definition(+ name: "output", markers: ["spago.yaml", "spago.dhall", "psc-package.json"], tool: "PureScript",+ isGeneric: true,+ source: "https://github.com/purescript/purescript/blob/cb3c4965c8468d26c9b14cf0319db6dbd06ee4ff/app/Command/Compile.hs#L81-L85"+ ),+ Definition(+ name: "bower_components", markers: ["bower.json"], tool: "Bower", isGeneric: false,+ source: "https://github.com/bower/bower/blob/4e0c3c1181c21624c5b3ab5bdf5d3becdb172b5a/packages/bower-config/lib/util/defaults.js#L23-L25"+ ),+ // aider runs in any repository, so its tags cache is known by the database diskcache keeps in it.+ Definition(+ name: ".aider.tags.cache.v*", markers: [], tool: "aider", isGeneric: false,+ source: "https://github.com/Aider-AI/aider/blob/5dc9490bb35f9729ef2c95d00a19ccd30c26339c/aider/repomap.py#L33-L43",+ proof: .holds("cache.db")+ ),Definition(name: ".reco-work", markers: ["main.go"], tool: "reco", isGeneric: false,source: "https://github.com/ReconfigureIO/reco/blob/1aaa5f0874528e5da8ce549071aad6e03e1cc3bb/helper.go#L117-L143"diff --git a/Packages/PeelCore/Tests/PeelCoreTests/ProjectArtifactsTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/ProjectArtifactsTests.swiftindex 53ade04d..c4492e4f 100644--- a/Packages/PeelCore/Tests/PeelCoreTests/ProjectArtifactsTests.swift+++ b/Packages/PeelCore/Tests/PeelCoreTests/ProjectArtifactsTests.swift@@ -338,6 +338,14 @@ struct ProjectArtifactsTests {Kind(artifact: ".reco-work", marker: "main.go", tool: "reco", isGeneric: false),Kind(artifact: "elm-stuff", marker: "elm.json", tool: "Elm", isGeneric: false),Kind(artifact: "elm-stuff", marker: "elm-package.json", tool: "Elm", isGeneric: false, isEnvironment: true),+ Kind(artifact: ".pulp-cache", marker: "bower.json", tool: "Pulp", isGeneric: false),+ Kind(artifact: ".pulp-cache", marker: "psc-package.json", tool: "Pulp", isGeneric: false),+ Kind(artifact: ".psc-package", marker: "psc-package.json", tool: "psc-package", isGeneric: false),+ Kind(artifact: ".spago", marker: "spago.yaml", tool: "Spago", isGeneric: false),+ Kind(artifact: ".spago", marker: "spago.dhall", tool: "Spago", isGeneric: false),+ Kind(artifact: "output", marker: "spago.yaml", tool: "PureScript", isGeneric: true),+ Kind(artifact: "output", marker: "psc-package.json", tool: "PureScript", isGeneric: true),+ Kind(artifact: "bower_components", marker: "bower.json", tool: "Bower", isGeneric: false),Kind(artifact: ".cxx", marker: "build.gradle.kts", tool: "Android Gradle plugin", isGeneric: false),Kind(artifact: ".stack-work", marker: "stack.yaml", tool: "Stack", isGeneric: false),Kind(artifact: "dist-newstyle", marker: "app.cabal", tool: "Cabal", isGeneric: false),@@ -350,6 +358,20 @@ struct ProjectArtifactsTests {])}+ @Test func findsAidersTagsCacheOnlyWithItsDatabase() async throws {+ let directory = try TemporaryDirectory()+ try directory.file("tool/main.py", bytes: 16)+ try directory.file("tool/.aider.tags.cache.v4/cache.db", bytes: 400_000)+ try directory.file("tool/.aider.chat.history.md", bytes: 16)+ try directory.file("notes/.aider.tags.cache.v3/notes.txt", bytes: 400_000)+ try age(directory.url, days: 60)++ let found = await ProjectArtifacts.scan(roots: [directory.url]).artifacts++ #expect(found.map { "\($0.project.lastPathComponent)/\($0.name)" } == ["tool/.aider.tags.cache.v4"])+ #expect(found.allSatisfy { $0.tool == "aider" && $0.isRecommended })+ }+@Test func findsEveryBuildFolderCLionNamesForItsProfiles() async throws {let directory = try TemporaryDirectory()try directory.file("engine/CMakeLists.txt", bytes: 16)