Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Releases: rrthomas/rpl

Release v2.0.4

16 Oct 11:05

Choose a tag to compare

This release improves the man page (thanks, Patrick Matthäi), and removes support for PCRE2 < 10.45. A little code clean-up was also done.

Release v2.0.3

12 Oct 07:50

Choose a tag to compare

This release fixes potential buffer overflows introduced in 2.0.2, fixes the detection of invalid input in some cases, and reduces peak memory consumption in some cases.

Release v2.0.2

11 Oct 19:01

Choose a tag to compare

Fix a potential buffer overflow introduced in v2.0.1.

Release v2.0.1

11 Oct 17:21

Choose a tag to compare

This release fixes a performance regression in 2.0 when processing UTF-8 input, and reduces peak memory consumption when for large replacements.

Release v2.0

10 Oct 17:58

Choose a tag to compare

rpl has been completely rewritten in Vala to improve performance, as extensive experiments failed to find a reasonable way to achieve good performance in certain cases in Python, and recent attempts to improve speed revealed memory consumption problems in the 3rd-party regex library.

Note that Vala is not required to build rpl from a source release; only a C compiler toolchain, glib, PCRE2 and uchardet.

Because a complete rewrite obviously risks introducing bugs, I took the opportunity to expand rpl’s test suite considerably. I have personally been using the alpha and pre-releases myself for some months, and adding more tests when I have found bugs. The test suite gives around 90% code coverage, with the only lines not tested being those that would require file system failure or failure of character encoding detection. More tests are always welcome! CI is now run on Ubuntu, macOS and Windows (the last still in progress: tests pass locally, but GitHub CI hangs). During testing, some bugs in the Python version were also found, and they were fixed in the new version.

rpl 2 is mostly compatible with version 1. In particular, the command-line interface is identical.

There are differences in two main areas: regular expressions, and character encoding, as different implementations are used in Python rpl and Vala rpl.

rpl 2 uses PCRE2 for regular expressions. As a widely-used, battle-tested library, this should be at least as good as the 3rd-party regex, as used with rpl 1 with the -E option, and on a par with Python’s regex. There are some differences in syntax, which should not affect most uses, but see below.

Differences from version 1:

  • -E/--extended-regex is ignored by rpl 2, which only supports one syntax.
  • The new --full-help option shows hidden options, currently just -E/--extended-regex.
  • --glob only supports standard glob(7) globs, not recursive ** globs. Since the main point of recursive globs was to replace the --recursive option, which was later restored, this is not a serious problem.
  • The deprecated -e/--escape option from version 1 has been removed.
  • Timestamps are now copied to the full resolution of the file system.
  • --prompt has been fixed to accept an empty line to mean “yes”; this was supposed to work but has not for a long time.
  • The wording of error, warning and prompt messages has been improved.

Alistair Turnbull (@apt1002) helped me debug and improving the performance of the new version; without his help, this new version would have taken much longer to produce and have been buggier on release!

Release v2.0rc6

21 Sep 21:57

Choose a tag to compare

Release v2.0rc6 Pre-release
Pre-release

This release fixes UTF-8 validation (GLib’s routines stop at the first NUL character). Thanks to Markus Kuhn for making his C routine (easy to adapt into Vala) freely usable.

Alistair Turnbull has helped me simplify the tortuous inner loop.

Performance has been checked against sed -i: rpl is not as fast, but the difference is not embarrassing, and rpl is both easier to use and more featureful.

rpl now uses a smaller default buffer size when used on stdin/stdout, which should make it play better in pipelines.

There are more tests and some minor documentation fixes.

Release v2.0rc5

17 Sep 10:17

Choose a tag to compare

Release v2.0rc5 Pre-release
Pre-release

This release fixes a bug where the temporary file used to hold the output during processing was created in the current working directory, not the same directory as the file being changed, which could lead to a failure to replace the original file if it was on a different file system.

There are some minor code quality improvements.

Release v2.0rc4

13 Sep 10:08

Choose a tag to compare

Release v2.0rc4 Pre-release
Pre-release

This release includes considerable improvements to the code under the hood,
making it clearer, faster, and using less memory in many cases on large
inputs.

There are some bug-fixes, in particular for “old-text” regexs that use lookbehind, and other problems with inputs larger than the default buffer size (1MB). The default encoding is now correctly set to the locale default, as documented.

Performance tests against the latest Python rpl, version 1.18, confirm that the new version is usually faster, and never slower.

Many thanks to Alistair Turnbull, who worked hard on all aspects of this release.

Release v2.0rc3

28 Aug 19:14

Choose a tag to compare

Release v2.0rc3 Pre-release
Pre-release

This release fixes automatically guessing the encoding (which properly worked before only when --verbose was used), and matching Unicode characters (so that e.g. \w now matches non-ASCII characters). --match-case has been fixed to work with non-ASCII characters.

Some code clean-up has also been done, in particular to the PCRE2 VAPI file, which has a bug-fix for a crash that rpl would never trigger, and the PCRE2 functions that are not yet bound are written out more legibly.

This version requires PCRE2 ≥ 10.45 by default, so that the syntax for referring to captures in replacements can be the same as in rpl 1. However, older versions can still be used with ./configure --with-old-pcre.

Release v2.0rc2

13 Aug 17:38

Choose a tag to compare

Release v2.0rc2 Pre-release
Pre-release

This release candidate includes a few bug fixes, some minor optimisations, and some code quality improvements, mostly with help from Alistair Turnbull. PCRE2 JIT compilation is used where possible.