oxidecomputer / oxidecomputer/typify
String validation with regex using unicode property escapes not possible
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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