From 99bf99c419af9a3210ebefbbb472e5f2306be691 Mon Sep 17 00:00:00 2001 From: Charles Kawczynski Date: Wed, 5 Oct 2022 11:27:41 -0700 Subject: [PATCH] Add aqua test --- test/runtests.jl | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/test/runtests.jl b/test/runtests.jl index dd84fcb6f2..8c6c566c40 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -26,6 +26,24 @@ using Aqua # This tests that we don't accidentally run into # https://github.com/JuliaLang/julia/issues/29393 Aqua.test_unbound_args(ClimaAtmos) + + # See: https://github.com/SciML/OrdinaryDiffEq.jl/issues/1750 + # Test that we're not introducing method ambiguities across deps + ambs = Aqua.detect_ambiguities(ClimaAtmos; recursive = true) + pkg_match(pkgname, pkdir::Nothing) = false + pkg_match(pkgname, pkdir::AbstractString) = occursin(pkgname, pkdir) + filter!(x -> pkg_match("ClimaAtmos", pkgdir(last(x).module)), ambs) + for method_ambiguity in ambs + @show method_ambiguity + end + # If the number of ambiguities is less than the limit below, + # then please lower the limit based on the new number of ambiguities. + # We're trying to drive this number down to zero to reduce latency. + @info "Number of method ambiguities: $(length(ambs))" + @test length(ambs) ≤ 118 + + # returns a vector of all unbound args + # ua = Aqua.detect_unbound_args_recursively(ClimaCore) end nothing