Skip to content

Loss of type stability in 1.12 for group_varnames_by_symbol #1099

@penelopeysm

Description

@penelopeysm
using DynamicPPL, Test
vns_tuple = (@varname(x), @varname(y[1]), @varname(x.a), @varname(z[15]), @varname(y[2]))
@inferred DynamicPPL.group_varnames_by_symbol(vns_tuple)

This passes on 1.11 but fails on 1.12.

This test is also in our test suite so I'm completely stumped as to why CI hasn't been failing. I discovered this when running the test suite locally.

I compared the Manifest of my local test environment vs the one from this job and it's exactly the same.

DynamicPPL.jl/test/utils.jl

Lines 198 to 211 in 2020741

@testset "group_varnames_by_symbol" begin
vns_tuple = (
@varname(x), @varname(y[1]), @varname(x.a), @varname(z[15]), @varname(y[2])
)
vns_vec = collect(vns_tuple)
vns_nt = (;
x=[@varname(x), @varname(x.a)],
y=[@varname(y[1]), @varname(y[2])],
z=[@varname(z[15])],
)
vns_vec_single_symbol = [@varname(x.a), @varname(x.b), @varname(x[1])]
@inferred DynamicPPL.group_varnames_by_symbol(vns_tuple)
@test DynamicPPL.group_varnames_by_symbol(vns_tuple) == vns_nt
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions