Catching string `yanked` in RegistryCI
https://github.com/JuliaRegistries/General/pull/137817 needed to be followed up with https://github.com/JuliaRegistries/General/pull/137826 because `yanked = "true"` led to issues like:
```
ERROR: TypeError: non-boolean (String) used in boolean context
Stacktrace:
[1] (::Pkg.Registry.var"#9#14")(::Pair{String, Any})
@ Pkg.Registry ./none:0
[2] iterate
@ ./generator.jl:48 [inlined]
[3] Dict{VersionNumber, Pkg.Registry.VersionInfo}(kv::Base.Generator{Dict{String, Any}, Pkg.Registry.var"#9#14"})
@ Base ./dict.jl:95
[4] init_package_info!(pkg::Pkg.Registry.PkgEntry)
@ Pkg.Registry ~/.julia/juliaup/julia-1.11.6+0.aarch64.apple.darwin14/share/julia/stdlib/v1.11/Pkg/src/Registry/registry_instance.jl:200
[5] registry_info
@ ~/.julia/juliaup/julia-1.11.6+0.aarch64.apple.darwin14/share/julia/stdlib/v1.11/Pkg/src/Registry/registry_instance.jl:184 [inlined]
...
```
The true issue though is that the Registry CI did not catch this, i.e. it gave all green check marks and everything passed the registry consistency checks, so I had merged thinking it was fine. To prevent this issue in the future, the consistency checks should ensure that any `yanked` values are boolean.
Though I'm not sure why the registry consistency checks were able to pass without this, because adding a package while this was in the registry seemed to just error any package downstream 😅 , so things should've failed. Something about yanking has a blind spot though.
1 条评论