Skip to content

Commit e6e68e3

Browse files
committed
Use ScopedValues instead of ContextVariablesX
LB Julia to 1.8
1 parent 1042275 commit e6e68e3

File tree

6 files changed

+33
-35
lines changed

6 files changed

+33
-35
lines changed

.buildkite/pipeline.yml

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,6 @@
1414
arch: x86_64
1515
num_cpus: 16
1616
steps:
17-
- label: Julia 1.7
18-
timeout_in_minutes: 60
19-
<<: *test
20-
plugins:
21-
- JuliaCI/julia#v1:
22-
version: "1.7"
23-
- JuliaCI/julia-test#v1:
24-
julia_args: "--threads=1"
25-
- JuliaCI/julia-coverage#v1:
26-
codecov: true
2717
- label: Julia 1.8
2818
timeout_in_minutes: 60
2919
<<: *test
@@ -54,7 +44,7 @@ steps:
5444
julia_args: "--threads=1"
5545
- JuliaCI/julia-coverage#v1:
5646
codecov: true
57-
- label: Julia 1.7 (macOS)
47+
- label: Julia 1.8 (macOS)
5848
timeout_in_minutes: 60
5949
<<: *test
6050
agents:
@@ -63,26 +53,26 @@ steps:
6353
arch: x86_64
6454
plugins:
6555
- JuliaCI/julia#v1:
66-
version: "1.7"
56+
version: "1.8"
6757
- JuliaCI/julia-test#v1:
6858
julia_args: "--threads=1"
6959
- JuliaCI/julia-coverage#v1:
7060
codecov: true
71-
- label: Julia 1.7 - TimespanLogging
61+
- label: Julia 1.8 - TimespanLogging
7262
timeout_in_minutes: 60
7363
<<: *test
7464
plugins:
7565
- JuliaCI/julia#v1:
76-
version: "1.7"
66+
version: "1.8"
7767
- JuliaCI/julia-coverage#v1:
7868
codecov: true
7969
command: "julia --project -e 'using Pkg; Pkg.instantiate(); Pkg.develop(;path=\"lib/TimespanLogging\"); Pkg.test(\"TimespanLogging\")'"
80-
- label: Julia 1.7 - DaggerWebDash
70+
- label: Julia 1.8 - DaggerWebDash
8171
timeout_in_minutes: 60
8272
<<: *test
8373
plugins:
8474
- JuliaCI/julia#v1:
85-
version: "1.7"
75+
version: "1.8"
8676
- JuliaCI/julia-coverage#v1:
8777
codecov: true
8878
command: "julia -e 'using Pkg; Pkg.develop(;path=pwd()); Pkg.develop(;path=\"lib/TimespanLogging\"); Pkg.develop(;path=\"lib/DaggerWebDash\"); include(\"lib/DaggerWebDash/test/runtests.jl\")'"
@@ -91,7 +81,7 @@ steps:
9181
<<: *bench
9282
plugins:
9383
- JuliaCI/julia#v1:
94-
version: "1.7"
84+
version: "1.8"
9585
- JuliaCI/julia-test#v1:
9686
run_tests: false
9787
command: "julia -e 'using Pkg; Pkg.add(\"BenchmarkTools\"); Pkg.develop(;path=pwd())'; JULIA_PROJECT=\"$PWD\" julia --project benchmarks/benchmark.jl"

.github/workflows/Documentation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- uses: actions/checkout@v3
1515
- uses: julia-actions/setup-julia@latest
1616
with:
17-
version: '1.7'
17+
version: '1.8'
1818
- name: Install dependencies
1919
run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
2020
- name: Build and deploy

Manifest.toml

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# This file is machine-generated - editing it directly is not advised
22

3-
julia_version = "1.7.3"
3+
julia_version = "1.8.2"
44
manifest_format = "2.0"
5+
project_hash = "b9d6b99cd2acb92936717d3d8fc43a05d135e857"
56

67
[[deps.Artifacts]]
78
uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"
@@ -30,12 +31,7 @@ version = "4.9.0"
3031
[[deps.CompilerSupportLibraries_jll]]
3132
deps = ["Artifacts", "Libdl"]
3233
uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae"
33-
34-
[[deps.ContextVariablesX]]
35-
deps = ["Compat", "Logging", "UUIDs"]
36-
git-tree-sha1 = "25cc3803f1030ab855e383129dcd3dc294e322cc"
37-
uuid = "6add18c4-b38d-439d-96f6-d6bc489c04c5"
38-
version = "0.1.3"
34+
version = "0.5.2+0"
3935

4036
[[deps.DataAPI]]
4137
git-tree-sha1 = "8da84edb865b0b5b0100c0666a9bc9a0b71c553c"
@@ -90,18 +86,18 @@ uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
9086

9187
[[deps.LogExpFunctions]]
9288
deps = ["ChainRulesCore", "ChangesOfVariables", "DocStringExtensions", "InverseFunctions", "IrrationalConstants", "LinearAlgebra"]
93-
git-tree-sha1 = "c3ce8e7420b3a6e071e0fe4745f5d4300e37b13f"
89+
git-tree-sha1 = "7d6dd4e9212aebaeed356de34ccf262a3cd415aa"
9490
uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688"
95-
version = "0.3.24"
91+
version = "0.3.26"
9692

9793
[[deps.Logging]]
9894
uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"
9995

10096
[[deps.MacroTools]]
10197
deps = ["Markdown", "Random"]
102-
git-tree-sha1 = "42324d08725e200c23d4dfb549e0d5d89dede2d2"
98+
git-tree-sha1 = "9ee1618cbf5240e6d4e0371d6f24065083f60c48"
10399
uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09"
104-
version = "0.5.10"
100+
version = "0.5.11"
105101

106102
[[deps.Markdown]]
107103
deps = ["Base64"]
@@ -124,10 +120,12 @@ uuid = "a63ad114-7e13-5084-954f-fe012c677804"
124120

125121
[[deps.NetworkOptions]]
126122
uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908"
123+
version = "1.2.0"
127124

128125
[[deps.OpenBLAS_jll]]
129126
deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"]
130127
uuid = "4536629a-c528-5b80-bd46-f80d51c5b363"
128+
version = "0.3.20+0"
131129

132130
[[deps.OrderedCollections]]
133131
git-tree-sha1 = "2e73fe17cac3c62ad1aebe70d44c963c3cfdc3e3"
@@ -154,6 +152,13 @@ version = "1.3.0"
154152

155153
[[deps.SHA]]
156154
uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce"
155+
version = "0.7.0"
156+
157+
[[deps.ScopedValues]]
158+
deps = ["Logging"]
159+
git-tree-sha1 = "aeee2ed0fc640697678a5d96a151d1324f0cfc00"
160+
uuid = "7e506255-f358-4e82-b7e4-beb19740aa63"
161+
version = "1.0.1"
157162

158163
[[deps.Serialization]]
159164
uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
@@ -211,3 +216,4 @@ uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"
211216
[[deps.libblastrampoline_jll]]
212217
deps = ["Artifacts", "Libdl", "OpenBLAS_jll"]
213218
uuid = "8e850b90-86db-534c-a0d3-1478176c7d93"
219+
version = "5.1.1+0"

Project.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ uuid = "d58978e5-989f-55fb-8d15-ea34adc7bf54"
33
version = "0.18.1"
44

55
[deps]
6-
ContextVariablesX = "6add18c4-b38d-439d-96f6-d6bc489c04c5"
76
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
87
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
98
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
@@ -12,6 +11,7 @@ MemPool = "f9f48841-c794-520a-933b-121f7ba6ed94"
1211
Profile = "9abbd945-dff8-562f-b5e8-e1ebf5ef1b79"
1312
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
1413
Requires = "ae029012-a4dd-5104-9daa-d747884805df"
14+
ScopedValues = "7e506255-f358-4e82-b7e4-beb19740aa63"
1515
Serialization = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
1616
SharedArrays = "1a1011a3-84de-559e-8e89-a11a2f7dc383"
1717
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
@@ -21,14 +21,14 @@ TimespanLogging = "a526e669-04d3-4846-9525-c66122c55f63"
2121
UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
2222

2323
[compat]
24-
ContextVariablesX = "0.1"
2524
DataStructures = "0.18"
2625
MacroTools = "0.5"
2726
MemPool = "0.4.4"
2827
Requires = "1"
28+
ScopedValues = "1"
2929
StatsBase = "0.28, 0.29, 0.30, 0.31, 0.32, 0.33, 0.34"
3030
TimespanLogging = "0.1"
31-
julia = "1.7"
31+
julia = "1.8"
3232

3333
[extras]
3434
Colors = "5ae59095-9a9b-59fe-a467-6f913c188581"

src/Dagger.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ import LinearAlgebra: transpose
1212

1313
using UUIDs
1414

15-
import ContextVariablesX
15+
if !isdefined(Base, :scoped)
16+
using ScopedValues
17+
end
1618

1719
using Requires
1820
using MacroTools

src/options.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Scoped Options
22

3-
ContextVariablesX.@contextvar options_context::NamedTuple = NamedTuple()
3+
const options_context = ScopedValue{NamedTuple}(NamedTuple())
44

55
"""
66
with_options(f, options::NamedTuple) -> Any
@@ -13,7 +13,7 @@ scope. Note that setting an option here will propagate its value across Julia
1313
or Dagger tasks spawned by `f()` or its callees (i.e. the options propagate).
1414
"""
1515
function with_options(f, options::NamedTuple)
16-
ContextVariablesX.with_context(options_context => options) do
16+
scoped(options_context => options) do
1717
f()
1818
end
1919
end

0 commit comments

Comments
 (0)