From 83bfa78808ef43b9b78c4398e24647089b8a965d Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 1 Aug 2025 08:51:28 -0400 Subject: [PATCH 1/3] Update DataStructures.jl compatibility to include v0.19 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 79b499748c..b10e99b015 100644 --- a/Project.toml +++ b/Project.toml @@ -99,7 +99,7 @@ CommonSolve = "0.2.4" Compat = "3.42, 4" ConstructionBase = "1" DataInterpolations = "7, 8" -DataStructures = "0.17, 0.18" +DataStructures = "0.17, 0.18, 0.19" DeepDiffs = "1" DelayDiffEq = "5.50" DiffEqBase = "6.170.1" From 3c1b06ecf3cd0d1f888b42fda116d698472983a6 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 1 Aug 2025 10:26:28 -0400 Subject: [PATCH 2/3] Fix deprecated DataStructures.jl functions for v0.19 compatibility MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Replace enqueue! with push! - Replace dequeue! with popfirst! - Replace IntDisjointSets with IntDisjointSet - Import IntDisjointSet to fix compilation 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- src/ModelingToolkit.jl | 1 + src/systems/alias_elimination.jl | 6 +++--- src/systems/connectiongraph.jl | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/ModelingToolkit.jl b/src/ModelingToolkit.jl index 2c259058b0..af4bc5deed 100644 --- a/src/ModelingToolkit.jl +++ b/src/ModelingToolkit.jl @@ -29,6 +29,7 @@ using LinearAlgebra, SparseArrays using InteractiveUtils using JumpProcesses using DataStructures +import DataStructures: IntDisjointSet using Base.Threads using Latexify, Unitful, ArrayInterface using Setfield, ConstructionBase diff --git a/src/systems/alias_elimination.jl b/src/systems/alias_elimination.jl index f24a2562fe..f23a863782 100644 --- a/src/systems/alias_elimination.jl +++ b/src/systems/alias_elimination.jl @@ -426,20 +426,20 @@ function topsort_equations(eqs, unknowns; check = true) q = Queue{Int}(neqs) for (i, d) in enumerate(degrees) - d == 0 && enqueue!(q, i) + d == 0 && push!(q, i) end idx = 0 ordered_eqs = similar(eqs, 0) sizehint!(ordered_eqs, neqs) while !isempty(q) - 𝑠eq = dequeue!(q) + 𝑠eq = popfirst!(q) idx += 1 push!(ordered_eqs, eqs[𝑠eq]) var = assigns[𝑠eq] for 𝑑eq in 𝑑neighbors(graph, var) degree = degrees[𝑑eq] = degrees[𝑑eq] - 1 - degree == 0 && enqueue!(q, 𝑑eq) + degree == 0 && push!(q, 𝑑eq) end end diff --git a/src/systems/connectiongraph.jl b/src/systems/connectiongraph.jl index 5c5e8716c6..348c4ec659 100644 --- a/src/systems/connectiongraph.jl +++ b/src/systems/connectiongraph.jl @@ -452,7 +452,7 @@ function connectionsets(graph::ConnectionGraph) invmap = graph.invmap # union all of the hyperedges - disjoint_sets = IntDisjointSets(length(invmap)) + disjoint_sets = IntDisjointSet(length(invmap)) for edge_i in 𝑠vertices(bigraph) hyperedge = 𝑠neighbors(bigraph, edge_i) isempty(hyperedge) && continue From 2acb404d577bd0df111eb9f1319e7c124b8d45e0 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Sat, 2 Aug 2025 18:56:30 -0400 Subject: [PATCH 3/3] Update Project.toml --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index b10e99b015..d4c860a252 100644 --- a/Project.toml +++ b/Project.toml @@ -99,7 +99,7 @@ CommonSolve = "0.2.4" Compat = "3.42, 4" ConstructionBase = "1" DataInterpolations = "7, 8" -DataStructures = "0.17, 0.18, 0.19" +DataStructures = "0.19" DeepDiffs = "1" DelayDiffEq = "5.50" DiffEqBase = "6.170.1"