diff --git a/Project.toml b/Project.toml index 3bc0c2a..7d89e15 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "LogDensityProblems" uuid = "6fdf6af0-433a-55f7-b3ed-c6c6e0b8df7c" authors = ["Tamas K. Papp "] -version = "2.1.2" +version = "2.2.0" [deps] ArgCheck = "dce04be8-c92d-5529-be00-80e4d2c0e197" diff --git a/src/LogDensityProblems.jl b/src/LogDensityProblems.jl index 2cea958..650fb44 100644 --- a/src/LogDensityProblems.jl +++ b/src/LogDensityProblems.jl @@ -16,6 +16,21 @@ using ArgCheck: @argcheck using DocStringExtensions: SIGNATURES, TYPEDEF using Random: AbstractRNG, default_rng +# https://github.com/JuliaLang/julia/pull/50105 +@static if VERSION >= v"1.11.0-DEV.469" + eval( + Expr( + :public, + :capabilities, + :LogDensityOrder, + :dimension, + :logdensity, + :logdensity_and_gradient, + :logdensity_gradient_and_hessian, + ) + ) +end + #### #### interface for problems #### diff --git a/test/runtests.jl b/test/runtests.jl index 45875e8..bd04938 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -90,3 +90,18 @@ end @test 50 ≤ length(failures) ≤ 100 @test all(x -> all(x .< 0), failures) end + +#### +#### public API +#### + +@testset "public API" begin + if isdefined(Base, :ispublic) + @test Base.ispublic(LogDensityProblems, :capabilities) + @test Base.ispublic(LogDensityProblems, :LogDensityOrder) + @test Base.ispublic(LogDensityProblems, :dimension) + @test Base.ispublic(LogDensityProblems, :logdensity) + @test Base.ispublic(LogDensityProblems, :logdensity_and_gradient) + @test Base.ispublic(LogDensityProblems, :logdensity_gradient_and_hessian) + end +end