Re: [PATCH] grep: avoid setting UTF mode when not needed
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Nov 17, 2021, 14:31 UTC
- Message-ID
- <211117.867dd67spq.gmgdl@evledraar.gmail.com>
- In-Reply-To
- <R33O2R.WYXS4AQP7W05@effective-light.com>
On Tue, Nov 16 2021, Hamza Mahfooz wrote:
> Does anyone know if René's patch causes older PCRE versions to break? > If it doesn't I think René's patch plus Ævar's fix is the way to go.
I haven't tested, but I think a very good thing to do/test (hint hint!) is to add a CI job where we build/test git in combination with various PCRE versions.
PCRE2 used to be in SVN, but nowadays it's in a git repository on github: https://github.com/PhilipHazel/pcre2
It should be a small matter of copying the existing template to set up a "matrix" where we test various known older pcre versions, they're available as tags in the git repository.
"--enable-jit" and "--disable-jit" should be part of that matrix too, and "--enable-utf" and "--disable-utf".
See the "microsoft/vcpkg" and "regular:" parts of .github/workflows/main.git for relevant examples, i.e. this would e.g. clone pcre2.git into compat/pcre2-repo, check out a given version from the matrix. Then:
cd compat/pcre2-repo &&
./autogen.sh &&
./configure --prefix="$PWD/inst" &&
make installThen at the top-level:
make USE_LIBPCRE=Y CFLAGS=-O3 LIBPCREDIR="$PWD/compat/pcre2-repo/inst"
Then run "make test", for saving some CPU & speeding up the runs it
should be more than sufficient to only run those tests that match
*{grep,log,pickaxe}*