Skip to content

v1.4.0 - glob#214

Merged
matajoh merged 1 commit intomicrosoft:mainfrom
matajoh:v1.4.0
Apr 9, 2026
Merged

v1.4.0 - glob#214
matajoh merged 1 commit intomicrosoft:mainfrom
matajoh:v1.4.0

Conversation

@matajoh
Copy link
Copy Markdown
Member

@matajoh matajoh commented Apr 9, 2026

Minor version adding glob.match, glob.quote_meta, and regex.globs_match built-in implementations.

New Features

  • Added glob.match built-in with full gobwas/glob-compatible pattern matching, including *, **, ?, character classes ([abc], [a-z], [!x]), brace alternatives ({foo,bar}), and configurable path delimiters.
  • Added glob.quote_meta built-in for escaping glob metacharacters.
  • Added regex.globs_match built-in for testing whether the intersection of two glob patterns matches a non-empty set of non-empty strings.

Bug Fixes

  • Fixed regex.find_all_string_submatch to advance by one Unicode codepoint after a zero-length match, preventing infinite loops and matching Go's regexp.FindAllStringSubmatch behavior.

Build System / Packaging

  • Fixed vcpkg portfile.cmake REF to use v${VERSION} prefix, matching the actual git tag format.
  • Added "supports": "!x86" constraint to vcpkg manifest.
  • Bumped vcpkg OpenSSL minimum version from 3.0.0 to 3.0.2.

Test Infrastructure

  • Extracted built-in-specific test cases from regocpp.yaml into a new builtins.yaml file with a dedicated CTest target (rego_test_builtins).
  • Added 27 new test cases covering glob.match, glob.quote_meta, and regex.globs_match (including edge cases and error conditions).

Fixes #210

Minor version adding `glob.match`, `glob.quote_meta`, and `regex.globs_match`
built-in implementations.

**New Features**
- Added `glob.match` built-in with full gobwas/glob-compatible pattern matching,
  including `*`, `**`, `?`, character classes (`[abc]`, `[a-z]`, `[!x]`),
  brace alternatives (`{foo,bar}`), and configurable path delimiters.
- Added `glob.quote_meta` built-in for escaping glob metacharacters.
- Added `regex.globs_match` built-in for testing whether the intersection of
  two glob patterns matches a non-empty set of non-empty strings.

**Bug Fixes**
- Fixed `regex.find_all_string_submatch` to advance by one Unicode codepoint
  after a zero-length match, preventing infinite loops and matching Go's
  `regexp.FindAllStringSubmatch` behavior.

**Build System / Packaging**
- Fixed vcpkg `portfile.cmake` REF to use `v${VERSION}` prefix, matching the
  actual git tag format.
- Added `"supports": "!x86"` constraint to vcpkg manifest.
- Bumped vcpkg OpenSSL minimum version from `3.0.0` to `3.0.2`.

**Test Infrastructure**
- Extracted built-in-specific test cases from `regocpp.yaml` into a new
  `builtins.yaml` file with a dedicated CTest target (`rego_test_builtins`).
- Added 27 new test cases covering `glob.match`, `glob.quote_meta`, and
  `regex.globs_match` (including edge cases and error conditions).

Signed-off-by: Matthew A Johnson <matjoh@microsoft.com>
@matajoh matajoh merged commit ca3e3fc into microsoft:main Apr 9, 2026
49 checks passed
@matajoh matajoh deleted the v1.4.0 branch April 9, 2026 09:38
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.

glob.* and regex.globs_match builtins

1 participant