You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "kpumuk (via GitHub)" <gi...@apache.org> on 2025/11/25 19:51:57 UTC
[PR] THRIFT-5911: Inconsistent UUID constants compilation for aliased types [thrift]
kpumuk opened a new pull request, #3256:
URL: https://github.com/apache/thrift/pull/3256
<!-- Explain the changes in the pull request below: -->
For aliased types, UUID constants retain their curly braces, while direct UUID constants do not:
```
typedef uuid myUUID
const uuid GEN_UUID = '00000000-4444-CCCC-ffff-0123456789ab'
const uuid GEN_GUID = '{00112233-4455-6677-8899-aaBBccDDeeFF}'
const myUUID MY_UUID = '00000000-4444-CCCC-ffff-0123456789ab'
const myUUID MY_GUID = '{00112233-4455-6677-8899-aaBBccDDeeFF}'
```
When uuid is compiled, it produces a string without curly braces, but for alias myUUID the curly braces stay:
```ruby
GEN_UUID = %q"00000000-4444-CCCC-ffff-0123456789ab"
GEN_GUID = %q"00112233-4455-6677-8899-aaBBccDDeeFF"
MY_UUID = %q"00000000-4444-CCCC-ffff-0123456789ab"
MY_GUID = %q"{00112233-4455-6677-8899-aaBBccDDeeFF}"
```
This change ensures that the type is properly resolved to its true type before validation, resulting in consistent handling of UUID constants regardless of whether they are defined using the base type or an alias.
<!-- We recommend you review the checklist/tips before submitting a pull request. -->
- [x] Did you create an [Apache Jira](https://issues.apache.org/jira/projects/THRIFT/issues/) ticket? [THRIFT-5911](https://issues.apache.org/jira/browse/THRIFT-5911)
- [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? (not required, but preferred)
- [x] Did you do your best to avoid breaking changes? If one was needed, did you label the Jira ticket with "Breaking-Change"?
- [ ] If your change does not involve any code, include `[skip ci]` anywhere in the commit message to free up build resources.
<!--
The Contributing Guide at:
https://github.com/apache/thrift/blob/master/CONTRIBUTING.md
has more details and tips for committing properly.
-->
--
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: dev-unsubscribe@thrift.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] THRIFT-5911: Inconsistent UUID constants compilation for aliased types [thrift]
Posted by "Jens-G (via GitHub)" <gi...@apache.org>.
Jens-G merged PR #3256:
URL: https://github.com/apache/thrift/pull/3256
--
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: dev-unsubscribe@thrift.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org