Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions src/deps_compat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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),
)
Expand Down
15 changes: 0 additions & 15 deletions src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
22 changes: 14 additions & 8 deletions test/test_deps_compat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion test/test_smoke.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module TestSmoke
using Aqua

# test defaults
Aqua.test_all(Aqua;)
Aqua.test_all(Aqua)

# test everything else
Aqua.test_all(
Expand Down