diff --git a/CHANGELOG.md b/CHANGELOG.md index c1c75fba..1d579814 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - The minimum requirement for julia was raised from `1.0` to `1.4`. ([#221](https://github.com/JuliaTesting/Aqua.jl/pull/221)) - In `test_deps_compat`, the two subtests `check_extras` and `check_weakdeps` are now run by default. ([#202](https://github.com/JuliaTesting/Aqua.jl/pull/202)) [BREAKING] +- `test_deps_compat` now reqiures compat entries for all dependencies. Stdlibs no longer get ignored. This change is motivated by similar changes in the General registry. ([#215](https://github.com/JuliaTesting/Aqua.jl/pull/215)) [BREAKING] ## [0.7.4] - 2023-10-24 diff --git a/src/deps_compat.jl b/src/deps_compat.jl index 6176d0ce..8cbebc18 100644 --- a/src/deps_compat.jl +++ b/src/deps_compat.jl @@ -88,11 +88,10 @@ function find_missing_deps_compat( deps = get(prj, deps_type, Dict{String,Any}()) compat = get(prj, "compat", Dict{String,Any}()) - stdlibs = get_stdlib_list() missing_compat = sort!( [ d for d in map(d -> PkgId(UUID(last(d)), first(d)), collect(deps)) if - !(d.name in keys(compat)) && !(d in stdlibs) && !(d.name in String.(ignore)) + !(d.name in keys(compat)) && !(d.name in String.(ignore)) ]; by = (pkg -> pkg.name), ) diff --git a/src/utils.jl b/src/utils.jl index 91def2d6..cb4bdd83 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -84,21 +84,6 @@ function checked_repr(obj) return code end - - -function get_stdlib_list() - result = Pkg.Types.stdlibs() - - @static if VERSION >= v"1.8-" - # format: Dict{Base.UUID, Tuple{String, Union{Nothing, VersionNumber}}} - libs = [PkgId(first(entry), first(last(entry))) for entry in result] - else - # format Dict{Base.UUID, String} - libs = [PkgId(first(entry), last(entry)) for entry in result] - end - return libs -end - const _project_key_order = [ "name", "uuid", diff --git a/test/test_deps_compat.jl b/test/test_deps_compat.jl index fe3dd2b1..acb8558c 100644 --- a/test/test_deps_compat.jl +++ b/test/test_deps_compat.jl @@ -12,14 +12,6 @@ const DictSA = Dict{String,Any} "deps", ) @test isempty(result) - result = find_missing_deps_compat( - DictSA( - "deps" => DictSA("SHA" => "ea8e919c-243c-51af-8825-aaa63cd721ce"), - "compat" => DictSA("julia" => "1"), - ), - "deps", - ) - @test isempty(result) result = find_missing_deps_compat( DictSA( "deps" => DictSA("PkgA" => "229717a1-0d13-4dfb-ba8f-049672e31205"), @@ -69,6 +61,20 @@ const DictSA = Dict{String,Any} @test length(result) == 1 @test [pkg.name for pkg in result] == ["PkgB"] end + + @testset "does not specify `compat` for stdlib" begin + result = find_missing_deps_compat( + DictSA( + "deps" => DictSA( + "LinearAlgebra" => "37e2e46d-f89d-539d-b4ee-838fcccc9c8e", + ), + "compat" => DictSA("julia" => "1"), + ), + "deps", + ) + @test length(result) == 1 + @test [pkg.name for pkg in result] == ["LinearAlgebra"] + end end end diff --git a/test/test_smoke.jl b/test/test_smoke.jl index c6aff662..3a3f5a00 100644 --- a/test/test_smoke.jl +++ b/test/test_smoke.jl @@ -3,7 +3,7 @@ module TestSmoke using Aqua # test defaults -Aqua.test_all(Aqua;) +Aqua.test_all(Aqua) # test everything else Aqua.test_all(