Skip to content

Commit 704d073

Browse files
authored
Support Julia 1.12.0-beta1 (#1219)
* Move `withenv` call inside `@compile_workload` As recommended. * Fix `@allocated` tests
1 parent 9db9aad commit 704d073

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/precompile.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ try
3131
"JULIA_SSL_NO_VERIFY_HOSTS" => nothing,
3232
"JULIA_ALWAYS_VERIFY_HOSTS" => nothing]
3333

34-
withenv(env...) do
35-
@compile_workload begin
34+
@compile_workload begin
35+
withenv(env...) do
3636
HTTP.get(url);
3737
end
3838
end

test/httpversion.jl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,11 @@
1616

1717
# Important that we can parse a string into a `HTTPVersion` without allocations,
1818
# as we do this for every request/response. Similarly if we then want a `VersionNumber`.
19-
@test @allocated(HTTPVersion("1.1")) == 0
20-
@test @allocated(VersionNumber(HTTPVersion("1.1"))) == 0
19+
function test_allocated()
20+
@test @allocated(HTTPVersion("1.1")) == 0
21+
@test @allocated(VersionNumber(HTTPVersion("1.1"))) == 0
22+
end
23+
test_allocated()
2124

2225
# Test comparisons with `VersionNumber`s
2326
req = HTTP.Request("GET", "http://httpbin.org/anything")

0 commit comments

Comments
 (0)