Skip to content

fix: emit pub on exported go constants in typedefs#231

Merged
ivov merged 1 commit into
mainfrom
bindgen-pub-const
Apr 29, 2026
Merged

fix: emit pub on exported go constants in typedefs#231
ivov merged 1 commit into
mainfrom
bindgen-pub-const

Conversation

@ivov
Copy link
Copy Markdown
Owner

@ivov ivov commented Apr 29, 2026

Exported Go constants now map to pub const in generated typedefs, consistent with how exported variables and functions already render.

Before this change, only value-enum members were emitted with pub. Standalone constants like codes.Error or trace.FlagsSampled were mapped as bare const, making it unclear from a .d.lis which top-level constants were part of the public API.

// before
const Error: Code = 1
const FlagsSampled: TraceFlags = 1

// after
pub const Error: Code = 1
pub const FlagsSampled: TraceFlags = 1

@ivov ivov merged commit 8fec935 into main Apr 29, 2026
4 checks passed
This was referenced Apr 29, 2026
@ivov
Copy link
Copy Markdown
Owner Author

ivov commented Apr 30, 2026

Released in lisette-v0.1.23

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.

1 participant