Skip to content
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

Define publicity at a per-binding level, not per-symbol #57094

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

LilithHafner
Copy link
Member

Symbols don't belong to modules and can't be marked public. The statement public Fix in Base does not make the symbol :Fix public everywhere. My package's Package.Fix may still be private. It's bindings that are marked this way:

julia/src/julia.h

Lines 695 to 705 in fa9478b

typedef struct _jl_binding_t {
JL_DATA_TYPE
jl_globalref_t *globalref; // cached GlobalRef for this binding
_Atomic(jl_value_t*) value;
_Atomic(jl_binding_partition_t*) partitions;
uint8_t declared:1;
uint8_t exportp:1; // `public foo` sets `publicp`, `export foo` sets both `publicp` and `exportp`
uint8_t publicp:1; // exportp without publicp is not allowed.
uint8_t deprecated:2; // 0=not deprecated, 1=renamed, 2=moved to another package
uint8_t padding:3;
} jl_binding_t;

@LilithHafner LilithHafner added the docs This change adds or pertains to documentation label Jan 18, 2025
@LilithHafner LilithHafner marked this pull request as ready for review January 18, 2025 14:19
@LilithHafner
Copy link
Member Author

From #57093 (review)

@nsajko nsajko added the modules label Jan 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs This change adds or pertains to documentation modules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants