PkgFsck.jl
No description available
Install / Use
/learn @KristofferC/PkgFsck.jlREADME
PkgFsck.jl
PkgFsck.jl is a package to find corrupted packages and artifacts in depots and fix them.
Packages
To show how it works we download a package and corrupt it:
(jl_qgafe7) pkg> add Example
julia> example_path = Base.find_package("Example")
"/home/kc/.julia/packages/Example/aqsx3/src/Example.jl"
julia> touch(joinpath(dirname(example_path), "corruption"))
"/home/kc/.julia/packages/Example/aqsx3/src/corruption"
julia> import PkgFsck
julia> failures = PkgFsck.fsck_packages();
julia> filter!(x->!x.has_build_file, failures) # See Caveats below
1-element Vector{PkgFsck.PkgFsckFailure}:
PkgFsck.PkgFsckFailure("/home/kc/.julia/packages/Example/aqsx3", UUID("7876af07-990d-54b4-ab0e-23690620f79a"), SHA1("46e44e869b4d90b96bd8ed1fdcf32244fddfb6cc"), false)
julia> foreach(PkgFsck.redownload, failures) # Removes the corrupted folder and redownloads the package
Caveats
Build
Packages using the deps/build.jl file often give false positives since they
tend to create files into the package directory and there is no way
to know which files are part of the original download. These packages
have the has_build_file property set to true in the returned
objects of fsck_packages allowing them to be filtered out.
Coverage files
The coverage system in Julia tend to put .cov file into the package
directories. By default, fsck will try to clean these out, this can be set
with the remove_cov_files::Bool keyword to fsck.
Artifacts
Detecting and fixing corrupted artifacts work in the same way. Run fsck_artifacts() and then redownload on the items in the returned vector.
Related Skills
node-connect
342.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
85.3kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
342.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
342.5kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
