From b491bccbf3d3992f6f1708188bf5ea0ee4cce0a0 Mon Sep 17 00:00:00 2001 From: Lilith Orion Hafner Date: Thu, 11 Jul 2024 03:22:34 -0500 Subject: [PATCH] Add alternative compat for public other than Compat.jl (#55097) --- doc/src/manual/modules.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/src/manual/modules.md b/doc/src/manual/modules.md index 9aaceea0c13fe..6b335305ac569 100644 --- a/doc/src/manual/modules.md +++ b/doc/src/manual/modules.md @@ -108,7 +108,11 @@ To mark a name as public without exporting it into the namespace of folks who ca one can use `public` instead of `export`. This marks the public name(s) as part of the public API, but does not have any namespace implications. The `public` keyword is only available in Julia 1.11 and above. To maintain compatibility with Julia 1.10 and below, use the `@compat` macro from the -[Compat](https://github.com/JuliaLang/Compat.jl) package. +[Compat](https://github.com/JuliaLang/Compat.jl) package, or the version-aware construct + +```julia +VERSION >= v"1.11.0-DEV.469" && eval(Meta.parse("public a, b, c")) +``` ### Standalone `using` and `import`