Skip to content

Allow OrderedCollections 2 - #190

Closed
matthew-liu-1 wants to merge 1 commit into
TuringLang:mainfrom
jahan-open:compat/orderedcollections-2
Closed

matthew-liu-1 wants to merge 1 commit into
TuringLang:mainfrom
jahan-open:compat/orderedcollections-2

Conversation

@matthew-liu-1

@matthew-liu-1 matthew-liu-1 commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Allows OrderedCollections 2 by widening the one compat bound, with a patch
version bump and a HISTORY.md entry.

 # Project.toml
-OrderedCollections = "1.8.1"
+OrderedCollections = "1.8.1, 2"
-version = "0.15.6"
+version = "0.15.7"

 # test/Project.toml
-OrderedCollections = "1"
+OrderedCollections = "1, 2"

Relationship to #188

Dependabot's #188 already proposes this same widening, but bundles it with a JET
0.9, 0.10, 0.11 → +0.12 bump and several stdlib compat entries, and it has two
failing jobs (test (1.11, ubuntu-latest), test (min, ubuntu-latest)) — so the
OrderedCollections part is stuck behind the rest of the group.

This PR isolates just the OrderedCollections change so it can be evaluated and
merged on its own. Happy to close it if you'd rather fix and land #188 instead —
the goal is only to unblock OrderedCollections 2, not to bypass your process.

What is actually failing in #188

The two failing jobs are the bundled JET bump, not OrderedCollections.
julia-actions/julia-runtest's force_latest_compatible_version defaults to
auto, which becomes true for Dependabot and CompatHelper PRs. That forces
every [compat] entry to its newest allowed version, so
JET = "0.9, 0.10, 0.11, 0.12" pins JET to 0.12.2 — which requires Julia 1.12 —
and the min (1.10.12) and 1.11 (1.11.9) matrix rows become unsatisfiable:

├─restricted to versions 0.12 by an explicit requirement, leaving only versions: 0.12.0-0.12.2
└─restricted by julia compatibility requirements to versions: 0.8.22-0.9.18 or uninstalled — no versions left

The three passing rows all run Julia >= 1.12. So #188 needs the JET bound handled
separately (it cannot be satisfied on 1.10/1.11 while forcing latest); the
OrderedCollections part of it is fine. This PR changes no JET bound and, not being
a Dependabot PR, is not subject to that forcing.

Why no code changes are needed

AbstractPPL's only non-docstring use of OrderedCollections is constructing one:

# src/varname/serialize.jl:185
dict_to_varname(JSON.parse(str; dicttype=OrderedDict{String,Any}))

OrderedCollections 2.0's breaking changes are all outside that: removal of the
deprecated similar(::OrderedDict) / similar(::OrderedSet) / sort(::Dict)
methods and of deprecated OrderedSet indexing; convert(OrderedDict, ::AbstractDict)
on an unordered dict now throwing ArgumentError instead of warning; first/last
on an empty collection throwing ArgumentError; and a changed internal OrderedDict
struct layout (new live, firstlive, lastlive fields). None is reachable from
plain construction.

Testing

Julia 1.10.12, Linux x86_64, per AGENTS.md:

GROUP=Tests julia --project=test test/runtests.jl

with OrderedCollections pinned to 2.0.1:

Test Summary:  | Pass  Total     Time
AbstractPPL.jl | 1500   1500  1m17.2s

1500 passed, 0 failed, exit code 0. Resolved test environment:
OrderedCollections 2.0.1, JET 0.9.18, Aqua 0.8.18, DimensionalData 0.30.2.
Pkg.update() was run first, per AGENTS.md.

Motivation

We're trying to run MLJLinearModels at head, which needs OrderedCollections 2
in the resolved environment. After widening the StanJulia side
(StanJulia/StanSample.jl#87, StanJulia/StanBase.jl#53, StanJulia/StanOptimize.jl#39
— all compat-only, Parameters = "0.12" transitively pins OrderedCollections to
1.x), AbstractPPL is the last remaining cap in our dependency graph. With this
change applied locally, our full environment resolves at OrderedCollections 2.0.1
while keeping Turing 0.49.0 and DynamicPPL 0.42.14 unchanged.

Widens the OrderedCollections compat bound to "1.8.1, 2" in Project.toml
and "1, 2" in test/Project.toml, bumps the patch version to 0.15.7, and
adds the corresponding HISTORY.md entry.

No code changes are needed. AbstractPPL's only non-docstring use of
OrderedCollections is constructing one, in src/varname/serialize.jl:

    dict_to_varname(JSON.parse(str; dicttype=OrderedDict{String,Any}))

OrderedCollections 2.0's breaking changes are all outside that: removal of
the deprecated similar(::OrderedDict)/similar(::OrderedSet)/sort(::Dict)
methods and of deprecated OrderedSet indexing; convert(OrderedDict,
::AbstractDict) on an unordered dict now throwing instead of warning;
first/last on an empty collection throwing ArgumentError; and a changed
internal OrderedDict struct layout. None is reachable from plain
construction.

Verified with GROUP=Tests on Julia 1.10.12 against OrderedCollections
2.0.1: 1500 passed, 0 failed.

This isolates the OrderedCollections part of TuringLang#188, which bundles the same
widening with a JET bump and stdlib compat entries and currently has two
failing jobs.
@codecov

codecov Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.11%. Comparing base (ed1cc28) to head (8cbedb1).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #190   +/-   ##
=======================================
  Coverage   92.11%   92.11%           
=======================================
  Files          17       17           
  Lines        2106     2106           
=======================================
  Hits         1940     1940           
  Misses        166      166           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@shravanngoswamii

Copy link
Copy Markdown
Member

Thank you @matthew-liu-1, this PR is superseded by #192

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants