From c578aa8674a2398e2eb2eac75e117246a96fc48a Mon Sep 17 00:00:00 2001 From: hhaensel Date: Wed, 17 Jun 2026 09:55:39 +0200 Subject: [PATCH] fix version check for public declarations --- src/HTTP.jl | 2 +- src/http_handlers.jl | 2 +- src/http_websockets.jl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/HTTP.jl b/src/HTTP.jl index 113945011..80d64c17d 100644 --- a/src/HTTP.jl +++ b/src/HTTP.jl @@ -66,7 +66,7 @@ include("http_websockets.jl") # not repeated here. The version guard keeps the source parseable on Julia 1.10 # (the `public` keyword does not exist there); `eval(Expr(:public, …))` is valid # syntax on all versions, so only the evaluation is gated. -@static if VERSION >= v"1.11.0-DEV.469" +@static if Base.VERSION >= v"1.11.0-DEV.469" Core.eval(@__MODULE__, Expr(:public, Symbol("@client"), :AbstractBody, :AddressInUseError, :CallbackBody, :CanceledError, :Client, diff --git a/src/http_handlers.jl b/src/http_handlers.jl index 2e264e46b..b0e52455c 100644 --- a/src/http_handlers.jl +++ b/src/http_handlers.jl @@ -485,7 +485,7 @@ getcookies(req) = get(() -> Cookie[], req.context, :cookies) # `handlertimeout` is documented public API but not exported; mark it public on # Julia versions that support the mechanism (the source stays parseable on 1.10). -@static if VERSION >= v"1.11.0-DEV.469" +@static if Base.VERSION >= v"1.11.0-DEV.469" Core.eval(@__MODULE__, Expr(:public, :handlertimeout)) end diff --git a/src/http_websockets.jl b/src/http_websockets.jl index 79331f01c..ff9157618 100644 --- a/src/http_websockets.jl +++ b/src/http_websockets.jl @@ -1795,7 +1795,7 @@ end # Documented public API of this submodule (accessed as `HTTP.WebSockets.name`). # Version-gated like the main module so the source parses on Julia 1.10. -@static if VERSION >= v"1.11.0-DEV.469" +@static if Base.VERSION >= v"1.11.0-DEV.469" Core.eval(@__MODULE__, Expr(:public, :CloseFrameBody, :Conn, :Server, :WebSocket, :WebSocketError, :forceclose, :isupgrade, :listen, :listen!, :open, :ping, :pong, :receive, :send, :serve!,