Skip to content

fix: fix uuid.h to work on macOS#271

Merged
lucasfang merged 1 commit into
alibaba:mainfrom
wgtmac:fix_uuid_mac
May 11, 2026
Merged

fix: fix uuid.h to work on macOS#271
lucasfang merged 1 commit into
alibaba:mainfrom
wgtmac:fix_uuid_mac

Conversation

@wgtmac
Copy link
Copy Markdown
Contributor

@wgtmac wgtmac commented May 11, 2026

Purpose

Currently src/paimon/common/utils/uuid.h blindly uses /proc/sys/kernel/random/uuid to generate uuid. This only works on Linux-based platforms. I just made it work on macOS.

Tests

N/A

API and Format

N/A

Documentation

N/A

Generative AI tooling

Generated-by: Codex with GPT-5.5

Copilot AI review requested due to automatic review settings May 11, 2026 07:49
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Make UUID generation work on macOS by falling back to platform UUID APIs when Linux /proc UUID generation isn’t available.

Changes:

  • Add Apple-specific includes for <uuid/uuid.h> and std::array.
  • Add an __APPLE__ fallback path that generates a UUID via uuid_generate_random / uuid_unparse_lower.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/paimon/common/utils/uuid.h Outdated
Comment thread src/paimon/common/utils/uuid.h Outdated
Copy link
Copy Markdown
Collaborator

@lxy-9602 lxy-9602 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Copy link
Copy Markdown
Collaborator

@lucasfang lucasfang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@lucasfang lucasfang merged commit 393a665 into alibaba:main May 11, 2026
9 checks passed
@wgtmac
Copy link
Copy Markdown
Contributor Author

wgtmac commented May 11, 2026

Thank you, @lxy-9602 @lucasfang!

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.

4 participants