slachiewicz opened a new pull request, #3779:
URL: https://github.com/apache/thrift/pull/3779

   A Thrift field named `isSetX` next to a field `x` generated a Go struct 
field `IsSetX` and an `IsSetX()` accessor, so the package did not compile. The 
generator now appends an underscore to identifiers that start with `IsSet`, the 
same rule it applies to `New*`, `*Args` and `*Result`. Hive's 
`hive_metastore.thrift` (`WMNullableResourcePlan`, `WMNullablePool`) is the 
real-world case.
   
   The rename only affects generated Go identifiers; field IDs and the wire 
format are unchanged. A field that starts with `isSet` but has no colliding 
sibling compiled before and is renamed too, which keeps the rule predictable.
   
   Verified: regenerated `lib/go/test` with the patched compiler → `go test 
./tests/` passes, and the new `TestIsSetFieldDoesNotCollideWithAccessor` fails 
to compile with the unpatched compiler. `make style` not run: clang-format is 
not installed here.
   
   - [x] Did you create an [Apache 
Jira](https://issues.apache.org/jira/projects/THRIFT/issues/) ticket?
   - [x] If a ticket exists: Does your pull request title follow the pattern 
"THRIFT-NNNN: describe my issue"?
   - [x] Did you squash your changes to a single commit?
   - [x] Did you do your best to avoid breaking changes?
   
   *This change was created with AI assistance.*
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to