feat: add RegexpCompiler option for custom regexp engines - #73
satisataka wants to merge 1 commit into
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Allow users to provide a custom regexp compiler via ResolveOptions.RegexpCompiler for PCRE-compatible features like lookahead that Go's regexp package does not support. The Regexp interface requires only MatchString(string) bool, matching both regexp.Regexp and regexp2/compat.Regexp signatures. Fixes google#72
a76cce9 to
253af7b
Compare
|
@wolo-lab — routing this to you for a direction call rather than a code review. This adds The scope question is conformance rather than code quality. JSON Schema 2020-12 §6.4 says regular expressions SHOULD be valid per ECMA-262 and asks schema authors to stay inside a restricted token set, specifically so schemas stay portable between implementations. A pluggable engine lets a schema depend on syntax no other validator will accept, so it is a decision about what this library guarantees, not about whether the option is well implemented. adk-go depends on this module, which is why it is coming to you. Open 134 days. Happy to run a full review once there is a direction. |
Allow users to provide a custom regexp compiler via ResolveOptions.RegexpCompiler for PCRE-compatible features like lookahead that Go's regexp package does not support.
The Regexp interface requires only MatchString(string) bool, matching both regexp.Regexp and regexp2/compat.Regexp signatures.
Fixes #72