oxidecomputer / oxidecomputer/typify

String validation with regex using unicode property escapes not possible

Open Beginner friendly
#1,077 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
898
Forks
114
Avg merge
4h 18m
Merged PRs (30d)
14

Description

https://github.com/immich-app/immich/blob/v3.2.0/open-api/immich-openapi-specs.json#L22666 uses unicode property escapes like \p{...}.

Typify doesn't validate strings against patterns with unicode property escapes because it creates a new regex without specifying the u flag: https://github.com/oxidecomputer/typify/blob/main/typify-impl/src/convert.rs#L879

Found when upgrading progenitor from 0.14.0 to 0.15.0. Maybe it is possible to offer a configuration option.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at typify-impl/src/convert.rs around line 879, where string-pattern validation creates the regular expression, and inspect how unicode property escapes are handled. Confirm the behavior against the Immich schema example; done means schemas containing patterns such as \p{...} validate correctly, with any configuration behavior clearly defined.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
70/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.