David Neto
2da0056814
Fix abseil deprecations (original by alona.moony@gmail.com) ( #666 )
...
The original work is by Alona Enraght-Moony <alona.moony@gmail.com >
but I'm signing this so it can land.
It was PR https://github.com/google/re2/pull/644 and the author
signed the Google CLA (verified by the CLA-bot).
Author: Alona Enraght-Moony <alona.moony@gmail.com >
Date: Mon Jun 29 23:08:33 2026 +0100
Fix abseil lock deprecations
Fixes https://github.com/google/re2/issues/631
These were deprecated in
https://github.com/abseil/abseil-cpp/commit/6d8e1a5cf00d6a6b26069b0baf0dd9b855a17459
2026-10-02 14:28:04 -04:00
Russ Cox
972a15cedd
re2: remove unnecessary & in MutexLock usage
...
Update for Abseil churn from mid-2025, now that vcpkg has updated.
2026-01-22 18:27:47 -05:00
Russ Cox
019bed1d06
re2: make CI checks also PR checks
...
Also incorporate BUILD updates from #584
and a few more checks to make Bazel work again.
2026-01-22 16:52:54 -05:00
Russ Cox
e7aec59850
python: update minimum version in packaging metadata
...
We stopped generating the 3.9 wheel but forgot to update the
setup.py minimum.
Also, generate wheels for macOS 26.
2025-11-05 10:02:47 -05:00
Russ Cox
927f5d53ca
2025-11-05
2025-11-05
2025-11-05 09:38:27 -05:00
Russ Cox
aee5886948
.github/workflows: delete pr.yml
...
Allow pull requests. Going to try not using Gerrit.
2025-11-05 09:36:42 -05:00
Russ Cox
cedd1b51e1
CMakeLists: allow disabling 'make install' rules
...
cmake -DRE2_INSTALL=OFF does not write out install targets in the Makefile.
Fixes #571 .
2025-11-05 09:28:01 -05:00
Russ Cox
11c643a48e
.github/workflows: drop Python 3.9, add Python 3.14
...
Python 3.14 was released on October 7.
Python 3.9 reached end-of-life on October 30.
https://devguide.python.org/versions/
2025-11-05 09:21:24 -05:00
Russ Cox
6b6f716ebf
re2: prepare to tag 2025-11-05
2025-11-05 09:04:21 -05:00
Russ Cox
880c551f60
re2: hoist a few loads out of BitState ShouldVisit
...
Caching the fields from prog_ in the outer loop instead
of reloading them inside each call to ShouldVisit makes
the fast search path of BitState noticeably faster.
Thanks to @nafi3000 for the idea and the initial patch.
benchmark \ host s7 mac
vs base vs base
Search_Success1_BitState/size=8 ~ ~
Search_Success1_BitState/size=64 -3.63% -2.04%
Search_Success1_BitState/size=512 -15.83% -6.83%
Search_Success1_BitState/size=4096 -25.59% -10.74%
Search_Success1_BitState/size=32768 -27.85% -11.85%
Search_Success1_BitState/size=262144 -28.03% -11.94%
Search_Success1_BitState/size=2097152 -27.99% -11.80%
Search_Success1_CachedBitState/size=8 -17.81% -8.16%
Search_Success1_CachedBitState/size=64 -27.17% -10.69%
Search_Success1_CachedBitState/size=512 -27.63% -11.56%
Search_Success1_CachedBitState/size=4096 -27.88% -11.61%
Search_Success1_CachedBitState/size=32768 -27.90% -11.60%
Search_Success1_CachedBitState/size=262144 -27.73% -11.55%
Search_Success1_CachedBitState/size=2097152 -27.88% -11.54%
Search_AltMatch_BitState/size=8 +0.83% ~
Search_AltMatch_BitState/size=64 +0.88% ~
Search_AltMatch_BitState/size=512 +0.88% ~
Search_AltMatch_BitState/size=4096 +1.02% ~
Search_AltMatch_BitState/size=32768 +1.02% ~
Search_AltMatch_BitState/size=262144 +1.22% ~
Search_AltMatch_BitState/size=2097152 +1.10% ~
Search_AltMatch_BitState/size=16777216 ~ ~
Search_AltMatch_CachedBitState/size=8 -1.79% ~
Search_AltMatch_CachedBitState/size=64 -3.23% ~
Search_AltMatch_CachedBitState/size=512 -3.39% ~
Search_AltMatch_CachedBitState/size=4096 ~ ~
Search_AltMatch_CachedBitState/size=32768 ~ ~
Search_AltMatch_CachedBitState/size=262144 ~ ~
Search_AltMatch_CachedBitState/size=2097152 ~ ~
Search_AltMatch_CachedBitState/size=16777216 ~ ~
host: s7
│ old │ new │
│ sec/op │ sec/op vs base │
Search_Success1_BitState/size=8 50.55µ ± 0% 50.58µ ± 0% ~ (p=0.806 n=25)
Search_Success1_BitState/size=64 58.28µ ± 0% 56.16µ ± 0% -3.63% (p=0.000 n=25)
Search_Success1_BitState/size=512 119.6µ ± 0% 100.7µ ± 0% -15.83% (p=0.000 n=25)
Search_Success1_BitState/size=4096 612.7µ ± 0% 455.9µ ± 0% -25.59% (p=0.000 n=25)
Search_Success1_BitState/size=32768 4.563m ± 0% 3.292m ± 0% -27.85% (p=0.000 n=25)
Search_Success1_BitState/size=262144 36.09m ± 0% 25.98m ± 0% -28.03% (p=0.000 n=25)
Search_Success1_BitState/size=2097152 288.6m ± 0% 207.8m ± 0% -27.99% (p=0.000 n=25)
Search_Success1_CachedBitState/size=8 1.971µ ± 1% 1.620µ ± 0% -17.81% (p=0.000 n=25)
Search_Success1_CachedBitState/size=64 9.829µ ± 1% 7.158µ ± 0% -27.17% (p=0.000 n=25)
Search_Success1_CachedBitState/size=512 71.19µ ± 0% 51.52µ ± 0% -27.63% (p=0.000 n=25)
Search_Success1_CachedBitState/size=4096 563.1µ ± 0% 406.1µ ± 0% -27.88% (p=0.000 n=25)
Search_Success1_CachedBitState/size=32768 4.492m ± 0% 3.239m ± 0% -27.90% (p=0.000 n=25)
Search_Success1_CachedBitState/size=262144 35.88m ± 0% 25.93m ± 0% -27.73% (p=0.000 n=25)
Search_Success1_CachedBitState/size=2097152 287.3m ± 0% 207.2m ± 0% -27.88% (p=0.000 n=25)
Search_AltMatch_BitState/size=8 16.54µ ± 0% 16.68µ ± 0% +0.83% (p=0.000 n=25)
Search_AltMatch_BitState/size=64 16.53µ ± 0% 16.68µ ± 0% +0.88% (p=0.000 n=25)
Search_AltMatch_BitState/size=512 16.53µ ± 0% 16.68µ ± 0% +0.88% (p=0.000 n=25)
Search_AltMatch_BitState/size=4096 16.62µ ± 0% 16.79µ ± 0% +1.02% (p=0.000 n=25)
Search_AltMatch_BitState/size=32768 16.63µ ± 0% 16.80µ ± 0% +1.02% (p=0.000 n=25)
Search_AltMatch_BitState/size=262144 17.05µ ± 0% 17.26µ ± 0% +1.22% (p=0.000 n=25)
Search_AltMatch_BitState/size=2097152 22.36µ ± 0% 22.61µ ± 0% +1.10% (p=0.000 n=25)
Search_AltMatch_BitState/size=16777216 508.3µ ± 1% 510.5µ ± 0% ~ (p=0.202 n=25)
Search_AltMatch_CachedBitState/size=8 616.0n ± 1% 605.0n ± 2% -1.79% (p=0.000 n=25)
Search_AltMatch_CachedBitState/size=64 620.0n ± 1% 600.0n ± 1% -3.23% (p=0.000 n=25)
Search_AltMatch_CachedBitState/size=512 620.0n ± 1% 599.0n ± 1% -3.39% (p=0.000 n=25)
Search_AltMatch_CachedBitState/size=4096 629.0n ± 1% 629.0n ± 0% ~ (p=0.747 n=25)
Search_AltMatch_CachedBitState/size=32768 690.0n ± 0% 688.0n ± 1% ~ (p=0.874 n=25)
Search_AltMatch_CachedBitState/size=262144 1.212µ ± 0% 1.210µ ± 0% ~ (p=0.415 n=25)
Search_AltMatch_CachedBitState/size=2097152 5.988µ ± 2% 5.931µ ± 4% ~ (p=0.066 n=25)
Search_AltMatch_CachedBitState/size=16777216 510.8µ ± 0% 512.0µ ± 0% ~ (p=0.164 n=25)
geomean 70.97µ 62.83µ -11.47%
host: mac
│ old │ new │
│ sec/op │ sec/op vs base │
Search_Success1_BitState/size=8 33.09µ ± 1% 33.02µ ± 1% ~ (p=0.003 n=25)
Search_Success1_BitState/size=64 37.52µ ± 1% 36.75µ ± 0% -2.04% (p=0.000 n=25)
Search_Success1_BitState/size=512 71.32µ ± 1% 66.45µ ± 0% -6.83% (p=0.000 n=25)
Search_Success1_BitState/size=4096 341.2µ ± 0% 304.6µ ± 0% -10.74% (p=0.000 n=25)
Search_Success1_BitState/size=32768 2.505m ± 0% 2.208m ± 0% -11.85% (p=0.000 n=25)
Search_Success1_BitState/size=262144 19.79m ± 0% 17.43m ± 0% -11.94% (p=0.000 n=25)
Search_Success1_BitState/size=2097152 158.1m ± 0% 139.5m ± 0% -11.80% (p=0.000 n=25)
Search_Success1_CachedBitState/size=8 1.201µ ± 0% 1.103µ ± 0% -8.16% (p=0.000 n=25)
Search_Success1_CachedBitState/size=64 5.442µ ± 0% 4.860µ ± 0% -10.69% (p=0.000 n=25)
Search_Success1_CachedBitState/size=512 39.18µ ± 0% 34.65µ ± 0% -11.56% (p=0.000 n=25)
Search_Success1_CachedBitState/size=4096 308.7µ ± 0% 272.9µ ± 0% -11.61% (p=0.000 n=25)
Search_Success1_CachedBitState/size=32768 2.466m ± 0% 2.180m ± 0% -11.60% (p=0.000 n=25)
Search_Success1_CachedBitState/size=262144 19.71m ± 0% 17.44m ± 0% -11.55% (p=0.000 n=25)
Search_Success1_CachedBitState/size=2097152 157.8m ± 0% 139.6m ± 0% -11.54% (p=0.000 n=25)
Search_AltMatch_BitState/size=8 11.48µ ± 0% 11.40µ ± 1% ~ (p=0.573 n=25)
Search_AltMatch_BitState/size=64 11.51µ ± 0% 11.39µ ± 2% ~ (p=0.200 n=25)
Search_AltMatch_BitState/size=512 11.41µ ± 1% 11.39µ ± 1% ~ (p=0.866 n=25)
Search_AltMatch_BitState/size=4096 11.51µ ± 1% 11.39µ ± 2% ~ (p=0.328 n=25)
Search_AltMatch_BitState/size=32768 11.60µ ± 0% 11.61µ ± 2% ~ (p=0.711 n=25)
Search_AltMatch_BitState/size=262144 12.33µ ± 1% 12.20µ ± 1% ~ (p=0.044 n=25)
Search_AltMatch_BitState/size=2097152 24.24µ ± 2% 25.27µ ± 7% ~ (p=0.095 n=25)
Search_AltMatch_BitState/size=16777216 310.3µ ± 7% 280.1µ ± 2% ~ (p=0.001 n=25)
Search_AltMatch_CachedBitState/size=8 375.0n ± 1% 375.0n ± 0% ~ (p=0.260 n=25)
Search_AltMatch_CachedBitState/size=64 414.0n ± 6% 380.0n ± 14% ~ (p=0.025 n=25)
Search_AltMatch_CachedBitState/size=512 377.0n ± 0% 378.0n ± 1% ~ (p=0.775 n=25)
Search_AltMatch_CachedBitState/size=4096 414.0n ± 1% 412.0n ± 1% ~ (p=0.008 n=25)
Search_AltMatch_CachedBitState/size=32768 524.0n ± 1% 526.0n ± 1% ~ (p=0.248 n=25)
Search_AltMatch_CachedBitState/size=262144 2.825µ ± 4% 2.904µ ± 6% ~ (p=0.342 n=25)
Search_AltMatch_CachedBitState/size=2097152 22.63µ ± 31% 22.63µ ± 9% ~ (p=0.399 n=25)
Search_AltMatch_CachedBitState/size=16777216 304.0µ ± 6% 281.2µ ± 4% ~ (p=0.052 n=25)
geomean 49.43µ 46.81µ -5.31%
2025-11-05 08:25:54 -05:00
Russ Cox
dcd1f64798
BUILD: fix for Bazel 9.0.0rc1
...
Error at https://buildkite.com/bazel/bcr-bazel-compatibility-test/builds/589/steps/canvas?jid=019a4bac-6015-4fed-a853-d187ee2e87fc
Change-Id: Ief0ef43cd23ca8e9fc5e63de8d0ea59460415f9f
2025-11-04 21:43:13 -05:00
Russ Cox
61c4644171
re2: revert "churn to new Abseil"
...
The new Abseil is not available in vcpkg, so it fails RE2 CI.
Roll back to the older version for now.
This reverts commit 7df5539248 .
2025-09-29 14:53:21 -04:00
Russ Cox
cd7b2823a8
re2: merge 6569a9a3df
...
This was accidentally the GitHub main branch head for a while,
and now Chromium refers to it. Merge it into the history so that
Chromium checkouts can advance past it.
It was committed to Gerrit as bf6416b instead.
Change-Id: I285f069f6f3a00bc836e35bbc9ea1b8f2ed3f921
2025-09-29 13:43:25 -04:00
Russ Cox
bc2752803f
.github/workflows: update pypa/gh-action-pypi-publish
...
There is a security fix in 1.13.0 and dependabot insists.
Change-Id: I346de5711188a6c2b03d1416b7bda4d614976c9c
Reviewed-on: https://code-review.googlesource.com/c/re2/+/64050
Reviewed-by: Alan Donovan <adonovan@google.com >
2025-09-29 10:42:48 -07:00
Russ Cox
7df5539248
re2: churn to new Abseil
...
Recent Abseil introduced a MutexLock constructor taking a
reference instead of a pointer and then immediately marked
the pointer one deprecated, causing deprecation errors/warnings
for users. Update to the new Abseil and change to references.
Change-Id: Id9436a79789b5700bbe883f4ee1de99b32e0d3e1
Reviewed-on: https://code-review.googlesource.com/c/re2/+/64030
Reviewed-by: Alan Donovan <adonovan@google.com >
2025-09-29 08:58:19 -07:00
Russ Cox
b1d8dff27b
bazel: define and use small_tests
...
Avoids having the same list of exclusions in three places.
Change-Id: I5912139e89800eeb4b72f3b6ed11996fe95b5ee0
Reviewed-on: https://code-review.googlesource.com/c/re2/+/63991
Reviewed-by: Alan Donovan <adonovan@google.com >
Reviewed-by: Jeremy Kun <jkun@google.com >
2025-09-29 08:58:04 -07:00
Russ Cox
43bf853461
.bcr: fix windows command-line flags
...
Change-Id: I9fe55a5db9c7080b818d8b4411982ad4e65d50f5
Reviewed-on: https://code-review.googlesource.com/c/re2/+/63990
Reviewed-by: Jeremy Kun <jkun@google.com >
Reviewed-by: Alan Donovan <adonovan@google.com >
2025-09-29 08:57:47 -07:00
Russ Cox
bf6416bc00
.github/workflows/release-bazel: disable attestation
...
The bazel attestations are too complicated for mortals like me.
Also, the yanked_versions list is ignored in
metadata.template.json, so delete its content.
Change-Id: I28e05de4ca3391fd9c87189ff3be3aeedea95ac4
Reviewed-on: https://code-review.googlesource.com/c/re2/+/63971
Reviewed-by: Alan Donovan <adonovan@google.com >
Reviewed-by: Russ Cox <rsc@swtch.com >
2025-09-29 08:57:07 -07:00
Russ Cox
6569a9a3df
.github/workflows/release-bazel: disable attestation
...
The bazel attestations are too complicated for mortals like me.
Change-Id: I28e05de4ca3391fd9c87189ff3be3aeedea95ac4
2025-08-13 09:26:32 -04:00
Russ Cox
0f6c07eae6
.github/workflows/release-bazel: ask for secret
...
In addition to passing the secret down from release.yml,
release-bazel.yml has to ask for the secret explicitly.
Change-Id: I5621e11a157ed242dd19da01d5731b15b6291664
Reviewed-on: https://code-review.googlesource.com/c/re2/+/63970
Reviewed-by: Jeremy Kun <jkun@google.com >
Reviewed-by: Russ Cox <rsc@swtch.com >
2025-08-12
2025-08-12 14:53:47 -07:00
Russ Cox
432ac21c60
.github/workflows/release: grant release-bazel permissions
...
Trying to fix:
The workflow is not valid.
.github/workflows/release.yml (Line: 46, Col: 26): Invalid secret, BCR_PUBLISH_TOKEN is not defined in the referenced workflow.
.github/workflows/release.yml (Line: 40, Col: 3): Error calling workflow 'google/re2/.github/workflows/release-bazel.yml@932b308415a622428df2187522db1d273e507164'. The nested job 'release' is requesting 'attestations: write, contents: write, id-token: write', but is only allowed 'attestations: none, contents: read, id-token: none'.
I made the secret repo-wide instead of being scoped to the bcr-push environment.
Not 100% sure that will fix that error.
The changes in this CL should fix the second error.
Change-Id: I7d1a537dd3d464fe0d99e612ae843a14243d24af
Reviewed-on: https://code-review.googlesource.com/c/re2/+/63950
Reviewed-by: Jeremy Kun <jkun@google.com >
Reviewed-by: Russ Cox <rsc@swtch.com >
2025-08-12 14:44:36 -07:00
Russ Cox
932b308415
.github/workflows/release: fix typo in bazel file name
...
Also change name from _ to - to match yaml conventions.
Change-Id: I4cd71d41656db954661b26c1d12443eb6bf8a453
Reviewed-on: https://code-review.googlesource.com/c/re2/+/63930
Reviewed-by: Russ Cox <rsc@swtch.com >
Reviewed-by: Jeremy Kun <jkun@google.com >
2025-08-12 12:50:05 -07:00
Russ Cox
ed708ebe3a
re2: prepare to tag 2025-08-12
...
2025-08-12 will be the same as 2025-08-05
except for having some Bazel-related fixes
and possibly the right files to automatically
push an update to the Bazel Central Registry.
Change-Id: I178dd5ab31eeb29c97d9f687cbe7553d02dca8cb
Reviewed-on: https://code-review.googlesource.com/c/re2/+/63910
Reviewed-by: Russ Cox <rsc@swtch.com >
Reviewed-by: Jeremy Kun <jkun@google.com >
2025-08-12 12:24:28 -07:00
Russ Cox
88b9fcda87
.github/workflows: define release-bazel and call from release
...
Thanks very much to Jeremy Kun for figuring this all out.
Change-Id: I3b6ec01ec6cd71b8f2a53bea71d17a58efe4f9b1
Reviewed-on: https://code-review.googlesource.com/c/re2/+/63892
Reviewed-by: Yun Peng <pcloudy@google.com >
Reviewed-by: Russ Cox <rsc@swtch.com >
Reviewed-by: Jeremy Kun <jkun@google.com >
2025-08-12 12:09:27 -07:00
Russ Cox
8fc5a0408e
.bcr: add bazel-central-registry configuration
...
Thanks to Jeremy Kun for figuring this all out.
Change-Id: I87a8d8fcf6086f38a2152985f85a9a9b6fbefded
Reviewed-on: https://code-review.googlesource.com/c/re2/+/63891
Reviewed-by: Jeremy Kun <jkun@google.com >
Reviewed-by: Russ Cox <rsc@swtch.com >
Reviewed-by: Yun Peng <pcloudy@google.com >
2025-08-12 12:04:57 -07:00
Russ Cox
a4b2aeed3a
MODULE.bazel: mark cc_configure_extension as dev_dependency
...
Allows us to remove
https://github.com/bazelbuild/bazel-central-registry/tree/main/modules/re2/2025-06-26/patches
Change-Id: Id014d524154c5b686f1b331f648f7aa27eef205b
Reviewed-on: https://code-review.googlesource.com/c/re2/+/63890
Reviewed-by: Yun Peng <pcloudy@google.com >
Reviewed-by: Russ Cox <rsc@swtch.com >
2025-08-11 16:44:54 -07:00
Russ Cox
85c7c0fb11
re2: prepare to tag 2025-08-05
...
Change-Id: If340b5f8ac94c7f95115e736a486fc254b4cad96
Reviewed-on: https://code-review.googlesource.com/c/re2/+/63832
Reviewed-by: Alan Donovan <adonovan@google.com >
2025-08-05
2025-08-05 12:15:32 -07:00
Russ Cox
384a920737
python: require Python 3.9+
...
The module has been building wheels for Python 3.9 and later,
but setup.py still declared a minimum of 3.8.
Update the metadata to require 3.9.
Fixes #559 .
Change-Id: Id5d06a006f5080529b69bfe163bf629e36b15c34
Reviewed-on: https://code-review.googlesource.com/c/re2/+/63850
Reviewed-by: Alan Donovan <adonovan@google.com >
2025-08-05 10:48:02 -07:00
Russ Cox
c2c6a2eb66
.github/workflows: only release on 2xxx-xx-xx tags
...
I will add an 'abseil.old' tag preserving the Abseil branch history.
This avoids having that tag trigger a release action.
Change-Id: I3d44ff9d91bf205bd5425adcb4b1da044a531661
Reviewed-on: https://code-review.googlesource.com/c/re2/+/63831
Reviewed-by: Alan Donovan <adonovan@google.com >
2025-08-04 16:11:21 -07:00
Russ Cox
45150b3d15
python: fix re2.search(compiled, text)
...
The old code was accidentally recompiling the pattern
and losing the options, both inefficient and incorrect.
Thanks to @MajorTanya for the excellent diagnosis.
This bug was introduced in CL 60290 and then copied
over from the Abseil branch.
Fixes #558 .
Change-Id: I072707003b444fb0934a310e14147b4d65b9da11
Reviewed-on: https://code-review.googlesource.com/c/re2/+/63830
Reviewed-by: Alan Donovan <adonovan@google.com >
2025-08-04 16:11:00 -07:00
Russ Cox
362c5596a7
.github: trigger workflows on rsc-testing branch too
...
This lets me push directly to GitHub in the rsc-testing branch
to run the CI and avoid Gerrit review round trips for dumb bugs.
Change-Id: I18ac9b3e67d74ad323cd89ec1f3197da38f96942
Reviewed-on: https://code-review.googlesource.com/c/re2/+/63793
Reviewed-by: Alan Donovan <adonovan@google.com >
2025-07-30 17:46:53 -07:00
Russ Cox
f8b5053c29
.bazelrc: ask for C++17 now
...
Also update README.md to explain to users (and future me).
Also update ci-bazel.yml to drop Python 3.8 and add 3.13.
(Missed this file when updating python.yml.)
Change-Id: Idbad8d392b88c5c38a59d5e0e2a1b5ff438990e6
Reviewed-on: https://code-review.googlesource.com/c/re2/+/63792
Reviewed-by: Alan Donovan <adonovan@google.com >
2025-07-30 17:46:47 -07:00
Russ Cox
d14faa82b2
CMakeLists.txt: fix dependencies for shared library build
...
There are a small number of references to the GoogleTest
package (for example TempDir) from re2/testing/*.cc, so
the testing library itself must depend on GoogleTest.
I removed this dependency incorrectly. Only the shared-library
build hits this problem.
Change-Id: Id48d106449f8023fd40330bfef179ab1dd1d4f45
Reviewed-on: https://code-review.googlesource.com/c/re2/+/63791
Reviewed-by: Alan Donovan <adonovan@google.com >
2025-07-30 17:46:23 -07:00
Russ Cox
8451125897
README.md: convert README to Markdown, expand
...
The README is essentially unchanged since 2009. Update it:
* Convert to Markdown.
* Paste in a few wiki pages, which will change to redirect to the README.md:
- https://github.com/google/re2/wiki/WhyRE2
- https://github.com/google/re2/wiki/CplusplusAPI
- https://github.com/google/re2/wiki/Install
Also document recipes for using CMake and Bazel,
neither of which was obvious to me.
Change-Id: I37603555d831bd4051b88b46542bfdd0f344776d
Reviewed-on: https://code-review.googlesource.com/c/re2/+/63775
Reviewed-by: Alan Donovan <adonovan@google.com >
2025-07-30 11:31:50 -07:00
Russ Cox
c986ecddb8
re2: #include <cstring> in prog.h
...
<cstring> provides memchr.
Change-Id: I7d6ef3d0f6c696d5a13353eb80b2a84f6e23fa7f
Reviewed-on: https://code-review.googlesource.com/c/re2/+/63772
Reviewed-by: Alan Donovan <adonovan@google.com >
2025-07-30 09:29:05 -07:00
Russ Cox
2a029e28d3
re2: use std::optional instead of absl::optional
...
std::optional is now preferred over absl::optional, even at Google.
It was introduced in C++17.
Change-Id: If02413a46299beef521effaad265ca04f43088fa
Reviewed-on: https://code-review.googlesource.com/c/re2/+/63771
Reviewed-by: Alan Donovan <adonovan@google.com >
2025-07-30 09:29:01 -07:00
Russ Cox
137ea7ffcb
re2: use C++17 [[fallthrough]] instead of ABSL_FALLTHROUGH_INTENDED
...
According to [1], Google code now depends on C++17,
so we can use these directly.
[1] https://github.com/google/oss-policies-info/blob/main/foundational-cxx-support-matrix.md
Change-Id: Ic475b79bc2153861d6ec2aebc0c55dbcf0c35908
Reviewed-on: https://code-review.googlesource.com/c/re2/+/63770
Reviewed-by: Alan Donovan <adonovan@google.com >
2025-07-30 09:28:58 -07:00
Russ Cox
141a0b75c8
MODULE.bazel: update dependency versions
...
Change-Id: I39b9a9329bc553114473e7055c2ae4e9073006a7
Reviewed-on: https://code-review.googlesource.com/c/re2/+/63773
Reviewed-by: Alan Donovan <adonovan@google.com >
2025-07-30 09:28:43 -07:00
Russ Cox
cf62c8d5d0
CMakeLists: updates for clang-cl, skipping benchmarks, and C++17
...
1. Test MSVC instead of CMAKE_CXX_COMPILER_ID MATCHES "MSVC"
When using the 'clang-cl' simulation of MSVC's 'cl' compiler,
we want to execute these adjustments, and MSVC will be true,
but CMAKE_CXX_COMPILER_ID MATCHES "MSVC" will not.
Thanks to Alexander Neumann for flagging and for the explanation.
Fixes #532 .
2. Separate out building tests from building benchmarks, because
they have different dependencies, and some people might want to
build tests and skip the benchmarks.
3. Update to C++17 and factor that out to make future updates easier.
We require C++17 now per
https://github.com/google/oss-policies-info/blob/main/foundational-cxx-support-matrix.md
Change-Id: I5691847d5ff17636143981086f370e95e34900bd
Reviewed-on: https://code-review.googlesource.com/c/re2/+/63774
Reviewed-by: Alan Donovan <adonovan@google.com >
2025-07-30 09:28:38 -07:00
Russ Cox
c7f516ddd9
Makefile: ask C++ compiler for C++17
...
Change-Id: I5f4a686c66f9cb76306dd1f0e3d1005bf6c9d759
Reviewed-on: https://code-review.googlesource.com/c/re2/+/63790
Reviewed-by: Alan Donovan <adonovan@google.com >
2025-07-30 09:28:25 -07:00
Russ Cox
66a656e6d9
re2: add Python Windows-on-ARM support
...
Based on CL 63710.
Fixes #537 .
Change-Id: Idc53c7f8683f0f09e6c24e6aa5cafbd23ce76099
Reviewed-on: https://code-review.googlesource.com/c/re2/+/63750
Reviewed-by: Alan Donovan <adonovan@google.com >
2025-07-28 10:50:46 -07:00
Russ Cox
b47783211c
.github/workflows: update Python build versions
...
Drop Python 3.8.
Add Python 3.13.
Drop macOS 12.
Add macOS 15.
Change-Id: I5916cf2de54dfb0274e50a8db3b8d93a60940710
Reviewed-on: https://code-review.googlesource.com/c/re2/+/63730
Reviewed-by: Alan Donovan <adonovan@google.com >
2025-07-28 08:25:33 -07:00
Russ Cox
6e8f5be3a3
python/setup: prepare for new version
...
Change-Id: I13884a2e5ff659d624b0617eda73a817d3489658
Reviewed-on: https://code-review.googlesource.com/c/re2/+/63690
Reviewed-by: Alan Donovan <adonovan@google.com >
2025-07-22
2025-07-22 08:30:50 -07:00
Russ Cox
ade723c0c3
MODULE.bazel: update for new tagged version
...
Change-Id: I479cfbdfb62997b91abf417eb9a3c0c53b5a8e03
Reviewed-on: https://code-review.googlesource.com/c/re2/+/63670
Reviewed-by: Alan Donovan <adonovan@google.com >
2025-07-22 08:19:25 -07:00
Russ Cox
79741d66ed
re2: allow and test RE2(NULL)
...
RE2(NULL) has always worked. Make sure it keeps working.
Change-Id: I999c69d04e71fa31a2f40cd834c47b328039ed3d
Reviewed-on: https://code-review.googlesource.com/c/re2/+/63631
Reviewed-by: Alan Donovan <adonovan@google.com >
2025-07-17
2025-07-17 14:29:18 -07:00
Anuraag Agrawal
6e9f66fb12
.github/workflows: update all helper versions
...
For #550
Change-Id: Icdd7eaab1e4f432214048239e23bb51f2491a476
Reviewed-on: https://code-review.googlesource.com/c/re2/+/63610
Reviewed-by: Alan Donovan <adonovan@google.com >
2025-07-17 14:15:22 -07:00
Russ Cox
8ea5841693
prepare release 2025-06-26
...
Blindly following https://code-review.googlesource.com/c/re2/+/63450 .
Change-Id: I5cb128581275f4a4617a59eac76b9416e0166943
Reviewed-on: https://code-review.googlesource.com/c/re2/+/63590
Reviewed-by: Alan Donovan <adonovan@google.com >
2025-06-26 10:57:25 -07:00
Russ Cox
006c729f2b
.github/workflows: test newer clang
...
The current images do not have Clang 16 anymore; use the current 3 latest.
Change-Id: Ie86c24aa139fd02325f02f3350ed921231758332
Reviewed-on: https://code-review.googlesource.com/c/re2/+/63591
Reviewed-by: Alan Donovan <adonovan@google.com >
2025-06-26 10:41:56 -07:00
Russ Cox
652b816bfd
re2: add Set::Size
...
Among other uses, exposing RE2::Set::Size allows writing a function that
takes a Set and a string and reports whether the string matches every
regexp in the Set. Without Size, that function can't know how many
matches to expect.
Change-Id: Ia161a87f20d031be11a9df54b981631800af1528
Reviewed-on: https://code-review.googlesource.com/c/re2/+/63570
Reviewed-by: Alan Donovan <adonovan@google.com >
2025-06-26 09:59:10 -07:00
Keith Smiley
c84a140c93
Move cc_configure.bzl to rules_cc
...
With bazel 8.x this has been removed, instead it is now loaded from
rules_cc.
Change-Id: Iffdcd196639d34daf5841db70446ba8474f73f29
Reviewed-on: https://code-review.googlesource.com/c/re2/+/63470
Reviewed-by: Russ Cox <rsc@swtch.com >
Reviewed-by: Alan Donovan <adonovan@google.com >
2025-02-28 07:41:07 -08:00