Replacing libgnuregex

Kyle Evans kevans91 at ksu.edu
Fri Apr 14 20:41:31 UTC 2017


On Fri, Apr 14, 2017 at 3:24 PM, Pedro Giffuni <pfg at freebsd.org> wrote:
>
> That doesn't seem good: anything that breaks tests is very likely to have
> other side-effects.
> Keep in mind that any regex change will likely have to go through a ports
> exp-run and
> ports will still have to work fine in three versions of FreeBSD.
>

Yeah, I anticipate other side-effects from this. Fortunately, there aren't
many ports relying on GNU extensions, and as a part of [1] I'm trying to
get them to start using textproc/gnugrep since this is more up-to-date and
well-tested.

As far as sed goes, the only potential breakage should come from \<, \>,
\b, \B, \w, \W, \s, and \S expecting to be ordinary. This is easy to fix in
a way that is actually POSIX compliant (unlike expecting them to be
ordinary), so no worries there.

It's worth noting that I have absolutely no intention of changing anything
to actually expect GNU extensions, but I tend to use them myself in my own
daily grep(1) usage- some of them are nice to have.


>
> It is difficult to know exactly how far we want to keep the GNU grep
> behavior. It is perfectly fine for BSD grep to keep a slightly incompatible
> behavior as long as we keep within standards.
>
> Just my $0.02,
>

>
Much appreciated. =)

Kyle Evans

[1]  https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=218385


More information about the freebsd-hackers mailing list