Skip to content

Commit 4bb0dfa

Browse files
committed
Fix on LTS
1 parent a3c2162 commit 4bb0dfa

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/Libtask.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ using Mooncake: IDGotoIfNot, IDGotoNode, IDPhiNode, Switch
88
# We'll emit `MistyClosure`s rather than `OpaqueClosure`s.
99
using MistyClosures
1010

11+
# ScopedValues only became available as part of `Base` in v1.11. Therefore, on v1.10 we
12+
# need to use the `ScopedValues` package.
13+
@static if VERSION < v"1.11"
14+
using ScopedValues: ScopedValue, with
15+
else
16+
using Base.ScopedValues: ScopedValue, with
17+
end
18+
1119
# Import some names from the compiler.
1220
const CC = Core.Compiler
1321
using Core.Compiler: Argument, IRCode, ReturnNode

src/copyable_task.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const dynamic_scope = Base.ScopedValues.ScopedValue{Any}(0)
1+
const dynamic_scope = ScopedValue{Any}(0)
22

33
"""
44
get_dynamic_scope()
@@ -82,7 +82,7 @@ called, it start execution from the entry point. If `consume` has previously bee
8282
`nothing` will be returned.
8383
"""
8484
@inline function consume(t::TapedTask)
85-
return Base.ScopedValues.with(() -> t.mc(t.args...), dynamic_scope => t.dynamic_scope)
85+
return with(() -> t.mc(t.args...), dynamic_scope => t.dynamic_scope)
8686
end
8787

8888
"""

0 commit comments

Comments
 (0)