Skip to content

Add alternative compat for public other than Compat.jl #55097

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion doc/src/manual/modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`

Expand Down