Skip to content

Commit

Permalink
Try #525:
Browse files Browse the repository at this point in the history
  • Loading branch information
bors[bot] authored Oct 28, 2023
2 parents 64d788e + 7d83570 commit a5240f9
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions src/registry_testing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,32 @@ function test(path=pwd(); registry_deps::Vector{<:AbstractString}=String[])
else
@debug "Compat.toml file does not exist" compatfile
end

# https://github.com/JuliaRegistries/RegistryCI.jl/issues/522
# For every version, each compat entry has a corresponding deps entry.
#
# Note: it is legal for a package to have Compat.toml but not have
# Deps.toml. Specifically, this is legal if (and only if) the package
# does not have any dependencies, and does have a compat entry for `julia`.
if isfile(compatfile)
compat_uncompressed = RegistryTools.Compress.load(compatfile)
deps_uncompressed = isfile(depsfile) ? RegistryTools.Compress.load(depsfile) : Dict()
for v in keys(vers)
compat_for_this_v = get(compat_uncompressed, v, Dict())
deps_for_this_v = get(deps_uncompressed, v, Dict())
Test.@test compat_for_this_v isa AbstractDict
Test.@test deps_for_this_v isa AbstractDict
for compat_pkgname in keys(compat_for_this_v)
# If the package has a compat entry for `julia`, there
# is no need to have `julia` listed in Deps.toml.
# However, every other compat entry needs to be listed
# in Deps.toml.
if compat_pkgname != "julia"
Test.@test haskey(deps_for_this_v, compat_pkgname)
end
end
end
end
end
# Make sure all paths are unique
path_parts = [splitpath(data["path"]) for (_, data) in reg["packages"]]
Expand Down

0 comments on commit a5240f9

Please sign in to comment.