Skip to content

Regex generator generates invalid unicode sequences (and is unmaintained)Β #1848

@timvahlbrock

Description

@timvahlbrock

We're using regular expressions like .{0,24} to limit the contents of string fields in their size and rely on the generator to generate corresponding example values. However, we're having trouble uploading the contracts to the pact broker, as the CLI (ruby) reports incomplete surrogate pairs (like \uDAA5) in the contract.

A month ago I reported this on the Pact Slack and the ruby repository as a suspected defect in the CLI. However, having had some time to take a closer look into what surrogates do I believe that the CLI is showing valid behavior. In my opinion the problem is in fact in the Pact-JVM Library for generating invalid unicode sequences, or more closely the Generex library. The later seems to be unmaintained since at least 5 years. Maybe it's time to switch to another generator, or implement an own?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementIndicates new feature requests

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions