Skip to content

Allow OrderedCollections 2 (and Parameters 0.13) - #53

Open
matthew-liu-1 wants to merge 1 commit into
StanJulia:masterfrom
jahan-open:compat/orderedcollections-2
Open

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

Conversation

@matthew-liu-1

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

Copy link
Copy Markdown

Summary

Widens two compat bounds so StanBase can be used in environments that need
OrderedCollections 2, and bumps the patch version to 4.12.5.

-OrderedCollections = "1.4.1"
-Parameters = "0.12"
+OrderedCollections = "1.4.1, 2"
+Parameters = "0.12, 0.13"

Parameters has to move together with OrderedCollections: every Parameters
0.12.x release caps OrderedCollections to 1.x, so 0.13.1 is the only release in
the 0.12–0.13 range that admits OrderedCollections 2. That indirection is why
this looked like a StanSample-only problem at first.

Motivation

@bparbhu — for context on why we're asking for this: we're trying to run
MLJLinearModels at head, which needs OrderedCollections 2 in the resolved
environment. StanBase and StanSample are currently the StanJulia-side pins that
prevent our environment from getting there (together with StanOptimize, which has
the same Parameters = "0.12" cap — companion PR filed there too).

Why no code changes are needed

StanBase's entire surface against these two packages is:

Usage File Affected by the 2.0 break?
typeof(input) <: OrderedCollections.OrderedDict src/common/update_json_files.jl:53 No
@unpack cmdstan_home, exec_path = m src/common/common_definitions.jl:91 No

OrderedCollections 2.0's breaking changes are: removal of the deprecated
similar(::OrderedDict) / similar(::OrderedSet) / sort(::Dict) methods,
removal 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 (new live, firstlive, lastlive fields). StanBase touches none of them.

Parameters 0.13's only breaking change is dropping the deprecated @pack alias
(@pack! stays). StanBase uses @unpack only.

Testing

Julia 1.10.12, Linux x86_64, CmdStan 2.36.0.

  • StanBase precompiles cleanly against OrderedCollections 2.0.1 + Parameters 0.13.1.
  • Downstream StanSample (with the companion compat PR) runs its full test suite
    green under OrderedCollections 2.0.1: 260 passed, 0 failed.
  • Control run: the same suite under OrderedCollections 1.8.2 behaves identically,
    so nothing here is OrderedCollections-2-specific.

OrderedCollections 2.0.1 is available. Parameters 0.13.1 is the first
Parameters release that allows it. This change widens both compat
entries and bumps the patch version.

StanBase uses only OrderedDict and @unpack. Both are unchanged in the
new major versions.
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.

1 participant