Commit Graph

232 Commits

Author SHA1 Message Date
Andrew Gallant
a9b2e02352
1.7.1 2023-01-09 08:19:50 -05:00
Andrew Gallant
f871a8eb1d
1.7.0 2022-11-05 13:35:07 -04:00
Andrew Gallant
fc9ee6a249
1.6.0 2022-07-05 14:00:31 -04:00
Andrew Gallant
8ddc8ece4b
deps: bump regex-syntax to 0.6.27 2022-07-05 13:59:55 -04:00
Andrew Gallant
9aef5b1edc
1.5.6 2022-05-20 14:06:04 -04:00
Andrew Gallant
2931b070fd
syntax: bump minimum regex-syntax version to 0.6.26 2022-05-20 14:05:37 -04:00
Andrew Gallant
d130381b15
1.5.5 2022-03-08 08:58:47 -05:00
Andrew Gallant
f2dc1b788f
1.5.4 2021-05-06 17:34:20 -04:00
Andrew Gallant
26c8d8e461
1.5.3 2021-05-01 20:31:04 -04:00
Andrew Gallant
5f557188e0
deps: bump to regex-syntax 0.6.25 2021-05-01 20:31:02 -04:00
Andrew Gallant
2393c5555c
1.5.2 2021-05-01 07:44:06 -04:00
Andrew Gallant
374c1680dc
1.5.1 2021-04-30 20:25:22 -04:00
Andrew Gallant
9f9f693768
1.5.0 2021-04-30 20:11:21 -04:00
Andrew Gallant
f3b8479840
deps: bump regex-syntax minimum version to 0.6.24 2021-04-30 20:09:54 -04:00
Andrew Gallant
cb108b77e7 edition: initial migration to Rust 2018 2021-04-30 20:02:56 -04:00
Andrew Gallant
ccdcf27805 imp: use new memmem impl from memchr crate
This removes the ad hoc FreqyPacked searcher and the implementation of
Boyer-Moore, and replaces it with a new implementation of memmem in the
memchr crate. (Introduced in memchr 2.4.) Since memchr 2.4 also moves to
Rust 2018, we'll do the same in subsequent commits. (Finally.)

The benchmarks look about as expected. Latency on some of the smaller
benchmarks has worsened slightly by a nanosecond or two. The top
throughput speed has also decreased, and some other benchmarks
(especially ones with frequent literal matches) have improved
dramatically.
2021-04-30 20:02:56 -04:00
Andrew Gallant
3db8722d0b
1.4.6 2021-04-22 17:59:28 -04:00
Andrew Gallant
ff283badce
1.4.5 2021-03-14 14:38:55 -04:00
Andrew Gallant
951b8b93bb
1.4.4 2021-03-11 21:16:13 -05:00
Andrew Gallant
e040c1b063 impl: drop thread_local dependency
This commit removes the thread_local dependency (even as an optional
dependency) and replaces it with a more purpose driven memory pool. The
comments in src/pool.rs explain this in more detail, but the short story
is that thread_local seems to be at the root of some memory leaks
happening in certain usage scenarios.

The great thing about thread_local though is how fast it is. Using a
simple Mutex<Vec<T>> is easily at least twice as slow. We work around
that a bit by coding a simplistic fast path for the "owner" of a pool.
This does require one new use of `unsafe`, of which we extensively
document.

This now makes the 'perf-cache' feature a no-op. We of course retain it
for compatibility purposes (and perhaps it will be used again in the
future), but for now, we always use the same pool.

As for benchmarks, it is likely that *some* cases will get a hair
slower. But there shouldn't be any dramatic difference. A careful review
of micro-benchmarks in addition to more holistic (albeit ad hoc)
benchmarks via ripgrep seems to confirm this.

Now that we have more explicit control over the memory pool, we also
clean stuff up with repsect to RefUnwindSafe.

Fixes #362, Fixes #576

Ref https://github.com/BurntSushi/rure-go/issues/3
2021-03-11 21:10:40 -05:00
Andrew Gallant
f858ff321d deps: update quickcheck and rand
The quickcheck update seems to have sussed out a bug in our DFA logic
regarding the encoding of NFA state IDs. But the bug seems unlikely to
occur in real code, so we massage the test data for now until the lazy
DFA gets moved into regex-automata.
2021-03-11 21:10:40 -05:00
Andrew Gallant
373d5ca4c5
1.4.3 2021-01-08 11:11:18 -05:00
Andrew Gallant
9b8b4074f8
cargo: bump regex-syntax to 0.6.22 2021-01-08 11:11:05 -05:00
Andrew Gallant
3bcae3b695
1.4.2 2020-11-01 11:30:08 -05:00
Andrew Gallant
8cb337a0a1
deps: bump regex-syntax to 0.6.21
This brings in the fix for banning \P{any}.
2020-11-01 11:27:57 -05:00
Andrew Gallant
d5bf98f293
1.4.1 2020-10-13 10:32:24 -04:00
Andrew Gallant
1aa1e476de
deps: bump regex-syntax minimum version to 0.6.20 2020-10-13 10:32:18 -04:00
Andrew Gallant
fe9b5c99ea
1.4.0 2020-10-11 20:12:50 -04:00
Andrew Gallant
36caf08042
deps: bump regex-syntax minimum version to 0.6.19 2020-10-11 20:12:13 -04:00
Andrew Gallant
691606773f
1.3.9 2020-05-28 20:14:55 -04:00
Andrew Gallant
d7fbd158f7
tests: remove use of doc_comment crate
It relies on `cfg(doctest)`, which wasn't stabilized until Rust 1.43.
Interestingly, it compiled on Rust 1.28, but didn't compile on, e.g.,
Rust 1.39. This breaks our MSRV policy, so we unfortunately remove the
use of doc_comment for now. It's likely possible to conditionally
enable it, but the extra build script required to do version sniffing to
do it doesn't seem worth it.

Fixes #684, Fixes #685
2020-05-28 20:13:13 -04:00
Andrew Gallant
e0053461a8
1.3.8 2020-05-28 11:22:46 -04:00
Andrew Gallant
60e949b779
deps: bump regex-syntax minimum version to 0.6.18
This includes fixes necessary for supporting empty sub-expressions.
2020-05-28 11:22:20 -04:00
Andrew Gallant
adb4aa3ce4
regex-1.3.7 2020-04-17 19:04:54 -04:00
Alex Crichton
b490e0b2e5
cargo: tweak features for regex-syntax
This commit tweaks the features enabled for the `regex-syntax` crate
from the `regex` crate itself. This isn't intended to actually have any
functional change, but should help feature unification for Cargo in some
projects.

One project I work on exhibits an issue where executing `cargo build`
followed by `cargo test` will rebuild `regex-syntax` and all of its
transitive dependencies. The cause for this issue is that the tests are
using the `proptest` crate. The `proptest` crate depends on
`regex-syntax` with normal features (e.g. the defaults). All other
crates depend on `regex` with normal default features too.

The problem happens where when *only* the `regex` crate depends on
`regex-syntax` then the `default` and `unicode` features of
`regex-syntax` are disabled. This is because the `regex` crate disables
default features and `regex`'s `unicode` feature delegates to all the
individual features of `regex-syntax`. When the `regex-syntax` crate is
depended on directly by `proptest` it then enables the `default` and
`unicode` features of `regex-syntax`.

Functionally these two builds of `regex-syntax` are exactly the same
since `default` is simply a proxy for `unicode` and `unicode` is simply
an umbrella including other features.

This PR updates the features enabled on `regex-syntax` by the `regex`
crate in two ways:

* The `default` feature for `regex` enables `regex-syntax/default`.
* The `unicode` feature for `regex` enables the `regex-syntax/unicode`
  feature.

This makes is so that if another crate in your crate graph depends on
`regex-syntax` then it'll have, by default, the same set of features
enabled than if you also depend on `regex`.

PR #665
2020-04-17 19:01:42 -04:00
Andrew Gallant
3221cdb1e3
1.3.6 2020-03-24 18:59:02 -04:00
Andrew Gallant
6ed3857357
1.3.5 2020-03-12 22:04:53 -04:00
Andrew Gallant
7174f158bd
deps: update to regex-syntax 0.6.17 2020-03-12 22:04:21 -04:00
Andrew Gallant
a0f541bd70 ci: remove old Travis+AppVeyor config
And update the README with the proper badge.
2020-02-02 11:05:08 -05:00
Andrew Gallant
95982cb7f0
1.3.4 2020-01-30 18:32:16 -05:00
Andrew Gallant
5e6ee59b5d
deps: require regex-syntax 0.6.14
This brings in the bug fix for #640 for flag scoping.
2020-01-30 18:31:51 -05:00
Andrew Gallant
2a8ddd0b36
1.3.3 2020-01-09 20:57:27 -05:00
Andrew Gallant
f6f8276a2d
deps: update to thread_local 1.0 2020-01-09 20:55:51 -05:00
Andrew Gallant
ab5d91306f
1.3.2 2020-01-09 14:30:14 -05:00
Aleksey Kladov
e36670a905 license: use more correct license specification
Historically, the `/` was used throughout the ecosystem, but
the actual SPDX standard requires this to be an OR. The said
standard also has AND, and for this reason `/` is ambiguous.
https://github.com/rust-lang/cargo/pull/4898 contains some more details
about this.

PR #615
2019-09-05 16:21:33 -04:00
Andrew Gallant
a3a8a7a5cf
1.3.1 2019-09-04 06:47:27 -04:00
Andrew Gallant
705a4f95d2
1.3.0 2019-09-03 12:53:49 -04:00
Andrew Gallant
25ae00460e
syntax: release 0.6.12 2019-09-03 12:52:18 -04:00
Andrew Gallant
e98090db75 regex: support perf-literal
This commit enables support for the perf-literal feature. When it's
disabled, no literal optimizations will be performed. Instead, only
the regex engine itself is used.

In practice, it's quite plausible that we don't need to disable *all*
literal optimizations. But that is the simplest path here, and I don't
have the stomach to do anything more with the current code. src/exec.rs
has turned into a giant soup.
2019-09-03 12:35:17 -04:00
Andrew Gallant
1e7efa4180 regex: add unicode and perf features
This commit sets up the infrastructure for supporting various `unicode`
and `perf` features, which permit decreasing binary size, compile times
and the size of the dependency tree.

Most of the work here is in modifying the regex tests to make them
work in concert with the available Unicode features. In cases where
Unicode is irrelevant, we just turn it off. In other cases, we require
the Unicode features to run the tests.

This also introduces a new error in the compiler where by if a Unicode
word boundary is used, but the `unicode-perl` feature is disabled, then
the regex will fail to compile. (Because the necessary data to match
Unicode word boundaries isn't available.)
2019-09-03 12:35:17 -04:00