Skip to content
Open
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
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "StatsBase"
uuid = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
version = "0.34.10"
version = "0.34.11"
authors = ["JuliaStats"]

[deps]
Expand All @@ -23,7 +23,7 @@ AliasTables = "1"
DataAPI = "1"
DataStructures = "0.10, 0.11, 0.12, 0.13, 0.14, 0.17, 0.18, 0.19"
IrrationalConstants = "0.2.6"
JET = "0.9.18, 0.10"
JET = "0.9.18, 0.10, 0.11"
LinearAlgebra = "<0.0.1, 1"
LogExpFunctions = "0.3"
Missings = "0.3, 0.4, 1.0"
Expand Down
2 changes: 1 addition & 1 deletion src/pairwise.jl
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function check_vectors(x, y, skipmissing::Symbol)
end
end
if m > 1 && n > 1
indsx == indsy ||
keys(first(x)) == keys(first(y)) ||
throw(ArgumentError("All input vectors must have the same indices"))
end
end
Expand Down
33 changes: 17 additions & 16 deletions test/jet.jl
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
using StatsBase, Test
import JET

# JET has only experimental support for Julia 1.12 currently
# It throws an internal `AssertionError` in the tests below
if VERSION < v"1.12-"
@testset "JET" begin
# Check that there are no undefined global references and undefined field accesses
JET.test_package("StatsBase"; target_defined_modules = true, mode = :typo)
@testset "JET" begin
# Check that there are no undefined global references and undefined field accesses
JET.test_package(StatsBase; target_modules = (StatsBase,), mode = :typo)

# Default error analysis for common problem fails since JET errors on interface definitions
# The (deprecated) `model_response(::StatisticalModel)` calls the interface
# function `response(::StatisticalModel)` for which no method exists yet
# Note: This analysis is not enough strict to guarantee that there are no runtime errors!
# Ref https://github.com/aviatesk/JET.jl/issues/495
res = JET.report_package("StatsBase"; target_defined_modules = true, mode = :basic, toplevel_logger = nothing)
println(res)
reports = JET.get_reports(res)
@test_broken isempty(reports)
@test length(reports) <= 1
# Default error analysis
# Note: This analysis is not enough strict to guarantee that there are no runtime errors!
kwargs = if isdefined(JET, :LastFrameModuleExact) # JET@0.11
(; target_modules = (StatsBase,))
else
(; target_defined_modules = true)
end
# The (deprecated) `model_response(::StatisticalModel)` calls the interface
# function `response(::StatisticalModel)` for which no method exists yet
# Ref https://github.com/aviatesk/JET.jl/issues/495
res = JET.report_package(StatsBase; kwargs..., mode = :basic, toplevel_logger = nothing)
println(res)
reports = JET.get_reports(res)
@test_broken isempty(reports)
@test length(reports) <= 1
end
Loading