Skip to content

Commit a22def9

Browse files
committed
Add Maintenance.clear_sources_cache()
This is a maintenance command that clears out the sources caches that we use to speed up build environment construction. It's mostly useful for debugging.
1 parent e8a1c19 commit a22def9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Maintenance.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ module Maintenance
33
# This file will collect entrypoints for maintenance of a build system.
44
using Ccache_jll
55
import ..BinaryBuilder2: ccache_cache
6+
import ..BinaryBuilderSources: generated_source_cache, jll_resolve_cache
67

78
function ccache_env(cmd::Cmd)
89
return addenv(cmd, "CCACHE_DIR" => ccache_cache())
@@ -33,6 +34,11 @@ function ccache_show_stats()
3334
run(ccache_env(`$(ccache()) --show-stats --show-compression --verbose`))
3435
end
3536

37+
function clear_sources_cache()
38+
rm(generated_source_cache("."); recursive=true, force=true)
39+
rm(jll_resolve_cache("."); recursive=true, force=true)
40+
end
41+
3642
# TODO:
3743
# - artifact LRU trimming?
3844
# - Old universe deletion?

0 commit comments

Comments
 (0)