Skip to content

Feat pr stable guids#3362

Closed
Jens-G wants to merge 16 commits intoapache:masterfrom
Jens-G:feat-pr-stable-guids
Closed

Feat pr stable guids#3362
Jens-G wants to merge 16 commits intoapache:masterfrom
Jens-G:feat-pr-stable-guids

Conversation

@Jens-G
Copy link
Member

@Jens-G Jens-G commented Mar 25, 2026

No description provided.

Jens-G added 3 commits March 25, 2026 01:11
Implement generate_guid_v5() for the Delphi code generator to produce
deterministic, stable GUIDs using UUIDv5 (RFC 4122) with SHA-1.

Changes:
- Add RFC 6234 SHA-1 implementation (header-only, public domain)
- Implement UUIDv5 namespace hierarchy (root -> program -> entity)
- Add canonical string generation for services and structs
- Add guid_v5 (default) and guid_random options
- Add comprehensive test suite for UUIDv5, canonical strings, and determinism
- Upgraded VC toolset

The new implementation:
- Generates stable GUIDs across regenerations
- Works on all platforms (Windows, Linux, macOS)
- Is deterministic (same input = same GUID)
- Defaults to UUIDv5 for new code

Legacy random GUIDs available via: thrift --gen delphi:guid_random

Generated-by: OpenCode big-pickle
… GUID generation

- Add SHA-256 implementation from RFC 6234 (same license as SHA-1)
- Add uuid8_from_namespace_and_name() function with version bits 0x80
- Replace UUIDv5 usage with UUIDv8 in t_delphi_generator.cc
- Keep UUIDv4 (random) as fallback via --gen delphi:guid_v4
- Update tests to verify UUIDv8 format and determinism

The UUIDv5 implementation was never released, so this is a direct
replacement rather than adding a new version alongside existing code.
@Jens-G Jens-G marked this pull request as draft March 25, 2026 17:10
@mergeable mergeable bot added compiler build and general CI cmake, automake and build system changes labels Mar 25, 2026
@Jens-G Jens-G closed this Mar 26, 2026
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant