Skip to content

Commit 689a7f5

Browse files
authored
Re-enable support for [email protected] (#2828)
1 parent 0001bcd commit 689a7f5

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
2323
BenchmarkTools = "1"
2424
CodecBzip2 = "0.6, 0.7, 0.8"
2525
CodecZlib = "0.6, 0.7"
26-
DataStructures = "0.19"
26+
DataStructures = "0.18, 0.19"
2727
ForwardDiff = "0.10, 1"
2828
JSON3 = "1"
2929
JSONSchema = "1"

src/Nonlinear/ReverseAD/Coloring/Coloring.jl

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,15 @@ function _merge_trees(eg, eg1, S)
186186
return
187187
end
188188

189+
# Work-around a deprecation in [email protected]
190+
function _IntDisjointSet(n)
191+
@static if isdefined(DataStructures, :IntDisjointSet)
192+
return DataStructures.IntDisjointSet(n)
193+
else
194+
return DataStructures.IntDisjointSets(n) # COV_EXCL_LINE
195+
end
196+
end
197+
189198
"""
190199
acyclic_coloring(g::UndirectedGraph)
191200
@@ -206,7 +215,7 @@ function acyclic_coloring(g::UndirectedGraph)
206215
firstVisitToTree = fill(_Edge(0, 0, 0), _num_edges(g))
207216
color = fill(0, _num_vertices(g))
208217
# disjoint set forest of edges in the graph
209-
S = DataStructures.IntDisjointSet(_num_edges(g))
218+
S = _IntDisjointSet(_num_edges(g))
210219
@inbounds for v in 1:_num_vertices(g)
211220
n_neighbor = _num_neighbors(v, g)
212221
start_neighbor = _start_neighbors(v, g)

0 commit comments

Comments
 (0)