Skip to content

make uuid api safer#384

Merged
deadprogram merged 1 commit into
tinygo-org:devfrom
kortschak:uuid
Feb 6, 2026
Merged

make uuid api safer#384
deadprogram merged 1 commit into
tinygo-org:devfrom
kortschak:uuid

Conversation

@kortschak

Copy link
Copy Markdown
Contributor

Unexpose the representation of the UUID data and unexport the Bytes method. Also document the byte ordering of binary marshaling and provide an exported binary round-tripper for UUID data.

Please take a look.

Closes #316

@deadprogram
deadprogram changed the base branch from release to dev February 6, 2026 08:57
@deadprogram

Copy link
Copy Markdown
Member

Hello @kortschak sorry it has taken me so long to look at this PR.

I have 2 questions:

but we can't replace it with the expected order, because that would cause additional confusion since the order would reverse. I thought about adding BytesBigEndian, but that's hideous.

I understand there might be some confusion if you changed the behavior of Bytes() but it is also true that BytesBigEndian() is not the most pleasing name.

Since we are in fact not yet at a 1.0 release, perhaps just changing the behavior is the least bad option.

The second question: why did you update the submodule for bluetooth-numbers-database in this same PR? Is is needed for something?

Thanks!

@kortschak

kortschak commented Feb 6, 2026

Copy link
Copy Markdown
Contributor Author

The second question: why did you update the submodule for bluetooth-numbers-database in this same PR? Is is needed for something?

No, that's just submodules being as friendly as submodules be.

Unexpose the representation of the UUID data and unexport the Bytes
method. Also document the byte ordering of binary marshaling and provide
an exported binary round-tripper for UUID data.
@deadprogram

Copy link
Copy Markdown
Member

@kortschak thank you very much for these improvements. Now merging!

@deadprogram
deadprogram merged commit 53071ed into tinygo-org:dev Feb 6, 2026
4 checks passed
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.

UUID API is confused

2 participants