Skip to content

Add _uuid (UUID array) codec#1324

Merged
mpilquist merged 3 commits into
typelevel:mainfrom
nigredo-tori:1310-uuid-array
Jul 10, 2026
Merged

Add _uuid (UUID array) codec#1324
mpilquist merged 3 commits into
typelevel:mainfrom
nigredo-tori:1310-uuid-array

Conversation

@nigredo-tori

Copy link
Copy Markdown
Contributor

Fixes #1310

import skunk.data.Type
import skunk.data.Arr

trait UuidCodec {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The name is now slightly wrong because we have multiple codecs, but it doesn't seem worth fixing while keeping binary compatibility.

)
Codec.simple[UUID](_.toString, codec.uuid.parse, Type.uuid)

def _uuid: Codec[Arr[UUID]] = codec.uuid._uuidImpl

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sadly, we can't add values directly to trait lest MiMa complains. Does anyone have a better way to do this?

@nigredo-tori

Copy link
Copy Markdown
Contributor Author

I'm not quite sure what to make of the Native test failing, since I have literally zero Native experience.

@mpilquist mpilquist merged commit 706dc37 into typelevel:main Jul 10, 2026
10 checks passed
@mpilquist

Copy link
Copy Markdown
Member

Thanks! Native build issue was unrelated to this PR and fixed on main since.

@nigredo-tori nigredo-tori deleted the 1310-uuid-array branch July 11, 2026 05:57
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.

Add _uuid array codec

2 participants