Skip to content

Commit

Permalink
Merge #458
Browse files Browse the repository at this point in the history
458: Registry consistency tests: the compress roundtrip check should compare `VersionRange`s (not `String`s) r=DilumAluthge a=DilumAluthge

Fixes #457

Will likely fail until JuliaRegistries/General#65997 is merged.

Co-authored-by: Dilum Aluthge <dilum@aluthge.com>
  • Loading branch information
bors[bot] and DilumAluthge committed Aug 14, 2022
2 parents b98ce77 + 88f772c commit ceddfce
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "RegistryCI"
uuid = "0c95cc5f-2f7e-43fe-82dd-79dbcba86b32"
authors = ["Dilum Aluthge <dilum@aluthge.com>", "Fredrik Ekre <ekrefredrik@gmail.com>", "contributors"]
version = "7.4.0"
version = "7.5.0"

[deps]
Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
Expand Down
9 changes: 7 additions & 2 deletions src/registry_testing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -218,11 +218,16 @@ function test(path=pwd(); registry_deps::Vector{<:AbstractString}=String[])
end
# Test that the way Pkg loads this data works
Test.@test load_compat(compatfile, vnums)
# Make sure the content roundtrips through decompression/compression
# Make sure the content roundtrips through decompression/compression.
# However, before we check for equality, we change the compat ranges
# from `String`s to `VersionRanges`.
compressed = RegistryTools.Compress.compress(
compatfile, RegistryTools.Compress.load(compatfile)
)
Test.@test compressed == compat
mapvalues = (f, dict) -> Dict(k => f(v) for (k, v) in dict)
f_inner = v -> Pkg.Types.VersionRange.(v)
f_outer = dict -> mapvalues(f_inner, dict)
Test.@test mapvalues(f_outer, compressed) == mapvalues(f_outer, compat)
end
end
# Make sure all paths are unique
Expand Down

2 comments on commit ceddfce

@DilumAluthge
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/66210

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v7.5.0 -m "<description of version>" ceddfceefea24d5990dc5998949632867e5244a8
git push origin v7.5.0

Please sign in to comment.