Skip to content

Add @public#2

Open
moble wants to merge 3 commits into
dalum:masterfrom
moble:public
Open

Add @public#2
moble wants to merge 3 commits into
dalum:masterfrom
moble:public

Conversation

@moble

@moble moble commented Jun 26, 2025

Copy link
Copy Markdown

Julia 1.11's public keyword functions much the same as export, so I think it makes sense to have the corresponding @public macro in this package.

Here's the summary of things I've done:

  1. Moved the processing out of @export into new method handle(::Expr,::Symbol).
  2. Created @public
  3. Created the no-op version: NoExport.@public
  4. Moved include("NoExport.jl") to the top of the main file, which enables...
  5. Used the no-op version of @public on older Julia versions.
  6. Tested on fixed handle(::Val{:macrocall}, expr) to deal with expressions inside blocks with docstrings
  7. Described @public in the README.
  8. Added lots of tests, including tests that use Julia>=1.11 capabilities.
  9. Ran the test suite (all tests passed) on Julia versions I happened to have installed:
    • 1.0 (which required removing the Manifest.toml)
    • 1.7
    • 1.8
    • 1.9
    • 1.10
    • 1.11
    • 1.12.0-beta3

Note that item 5 has the nice feature of letting us use @public, even for code that will run on the old versions of Julia.

@PatrickHaecker PatrickHaecker left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants