Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Apr 2017 17:28:29 -0500
From:      Kyle Evans <kevans91@ksu.edu>
To:        Pedro Giffuni <pfg@freebsd.org>
Cc:        Ed Maste <emaste@freebsd.org>, <freebsd-hackers@freebsd.org>
Subject:   Re: Replacing libgnuregex
Message-ID:  <CACNAnaHhoUNvWkbB095eAn2HDF78%2BKmgBQbYnZ1tMHCF-aa5kQ@mail.gmail.com>
In-Reply-To: <CACNAnaHTAS7a%2BvuTS%2B3yAT3p_4yUY_MOmd=mfBc922-0pjNW9g@mail.gmail.com>
References:  <CACNAnaEmBjWudEJwvRTSqyciOp7-oRbCEQ_e6qtGsap0oHQ4yw@mail.gmail.com> <CACNAnaGOLVKR7Y4uzhuS7EB5-UMb3tS9yKL4Srn8knThk0o1kg@mail.gmail.com> <10004f0d-acb7-f81a-f3d5-b368e606a105@FreeBSD.org> <CACNAnaHTAS7a%2BvuTS%2B3yAT3p_4yUY_MOmd=mfBc922-0pjNW9g@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
(apologies, wrong email, resending for list)


On Apr 14, 2017 3:41 PM, "Kyle Evans" <kevans91@ksu.edu> wrote:

On Fri, Apr 14, 2017 at 3:24 PM, Pedro Giffuni <pfg@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.


>
On second thought, I should add a REG_POSIX flag so that we can make sure
to maintain POSIX compatibility instead of removing the tests with
expectations that cannot hold. I think it should be opt-in though for the
sake of, say, gdb, which expects GNU extensions.

I do still intend to fix the regressions that occur because of undefined
behavior, though.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACNAnaHhoUNvWkbB095eAn2HDF78%2BKmgBQbYnZ1tMHCF-aa5kQ>