Skip to content

THRIFT-6388: Make the Go package name from an IDL file name a valid identifier - #3968

Open
slachiewicz wants to merge 1 commit into
apache:masterfrom
slachiewicz:THRIFT-6388
Open

slachiewicz wants to merge 1 commit into
apache:masterfrom
slachiewicz:THRIFT-6388

Conversation

@slachiewicz

Copy link
Copy Markdown
Member

Without a namespace go, the Go package is named after the IDL file; characters a Go identifier cannot hold, such as -, now become _, and . still separates nested packages. lib/go/test gains Hyphenated-Name.thrift, built together with its -remote stub.

Verified: make -C lib/go check, make -C test/go check and make dist pass; Apache Accumulo's compaction-coordinator.thrift now generates package compaction_coordinator, which builds.

…dentifier

Client: go

Without a namespace go, the Go generator named the package after the IDL file,
so a file name containing a hyphen, such as Apache Accumulo's
compaction-coordinator.thrift, gave a package name that does not compile. The
generator now replaces characters that a Go identifier cannot hold with '_',
keeping '.', which separates nested packages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mergeable mergeable Bot added golang Pull requests that update Go code compiler build and general CI cmake, automake and build system changes labels Sep 27, 2026
@slachiewicz
slachiewicz marked this pull request as ready for review September 27, 2026 17:27
@slachiewicz
slachiewicz requested a review from fishy as a code owner September 27, 2026 17:27

This branch has not been deployed

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

Labels

build and general CI cmake, automake and build system changes compiler golang Pull requests that update Go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant