Skip to content

Commit a52ede5

Browse files
committed
Bump versions everywhere and update CHANGELOG.
Fixes #296, Fixes #307
1 parent 63132b5 commit a52ede5

File tree

8 files changed

+114
-23
lines changed

8 files changed

+114
-23
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
language: rust
22
rust:
3-
- 1.3.0
3+
- 1.12.0
44
- stable
55
- beta
66
- nightly

CHANGELOG.md

+91
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,94 @@
1+
0.2.0
2+
=====
3+
This is a new major release of the regex crate, and is an implementation of the
4+
[regex 1.0 RFC](https://github.com/rust-lang/rfcs/blob/master/text/1620-regex-1.0.md).
5+
We are releasing a `0.2` first, and if there are no major problems, we will
6+
release a `1.0` shortly. For `0.2`, the minimum *supported* Rust version is
7+
1.12.
8+
9+
There are a number of **breaking changes** in `0.2`. They are split into two
10+
types. The first type correspond to breaking changes in regular expression
11+
syntax. The second type correspond to breaking changes in the API.
12+
13+
Breaking changes for regex syntax:
14+
15+
* POSIX character classes now require double bracketing. Previously, the regex
16+
`[:upper:]` would parse as the `upper` POSIX character class. Now it parses
17+
as the character class containing the characters `:upper:`. The fix to this
18+
change is to use `[[:upper:]]` instead. Note that variants like
19+
`[[:upper:][:blank:]]` continue to work.
20+
* The character `[` must always be escaped inside a character class.
21+
* The characters `&`, `-` and `~` must be escaped if any one of them are
22+
repeated consecutively. For example, `[&]`, `[\&]`, `[\&\&]`, `[&-&]` are all
23+
equivalent while `[&&]` is illegal. (The motivation for this and the prior
24+
change is to provide a backwards compatible path for adding character class
25+
set notation.)
26+
* A `bytes::Regex` now has Unicode mode enabled by default (like the main
27+
`Regex` type). This means regexes compiled with `bytes::Regex::new` that
28+
don't have the Unicode flag set should add `(?-u)` to recover the original
29+
behavior.
30+
31+
Breaking changes for the regex API:
32+
33+
* `find` and `find_iter` now **return `Match` values instead of
34+
`(usize, usize)`.** `Match` values have `start` and `end` methods, which
35+
return the match offsets. `Match` values also have an `as_str` method,
36+
which returns the text of the match itself.
37+
* The `Captures` type now only provides a single iterator over all capturing
38+
matches, which should replace uses of `iter` and `iter_pos`. Uses of
39+
`iter_named` should use the `capture_names` method on `Regex`.
40+
* The `replace` methods now return `Cow` values. The `Cow::Borrowed` variant
41+
is returned when no replacements are made.
42+
* The `Replacer` trait has been completely overhauled. This should only
43+
impact clients that implement this trait explicitly. Standard uses of
44+
the `replace` methods should continue to work unchanged.
45+
* The `quote` free function has been renamed to `escape`.
46+
* The `Regex::with_size_limit` method has been removed. It is replaced by
47+
`RegexBuilder::size_limit`.
48+
* The `RegexBuilder` type has switched from owned `self` method receivers to
49+
`&mut self` method receivers. Most uses will continue to work unchanged, but
50+
some code may require naming an intermediate variable to hold the builder.
51+
* The free `is_match` function has been removed. It is replaced by compiling
52+
a `Regex` and calling its `is_match` method.
53+
* The `PartialEq` and `Eq` impls on `Regex` have been dropped. If you relied
54+
on these impls, the fix is to define a wrapper type around `Regex`, impl
55+
`Deref` on it and provide the necessary impls.
56+
* The `is_empty` method on `Captures` has been removed. This always returns
57+
`false`, so its use is superfluous.
58+
* The `Syntax` variant of the `Error` type now contains a string instead of
59+
a `regex_syntax::Error`. If you were examining syntax errors more closely,
60+
you'll need to explicitly use the `regex_syntax` crate to re-parse the regex.
61+
* The `InvalidSet` variant of the `Error` type has been removed since it is
62+
no longer used.
63+
* Most of the iterator types have been renamed to match conventions. If you
64+
were using these iterator types explicitly, please consult the documentation
65+
for its new name. For example, `RegexSplits` has been renamed to `Split`.
66+
67+
A number of bugs have been fixed:
68+
69+
* [BUG #151](https://github.com/rust-lang/regex/issues/151):
70+
The `Replacer` trait has been changed to permit the caller to control
71+
allocation.
72+
* [BUG #165](https://github.com/rust-lang/regex/issues/165):
73+
Remove the free `is_match` function.
74+
* [BUG #166](https://github.com/rust-lang/regex/issues/166):
75+
Expose more knobs (available in `0.1`) and remove `with_size_limit`.
76+
* [BUG #168](https://github.com/rust-lang/regex/issues/168):
77+
Iterators produced by `Captures` now have the correct lifetime parameters.
78+
* [BUG #175](https://github.com/rust-lang/regex/issues/175):
79+
Fix a corner case in the parsing of POSIX character classes.
80+
* [BUG #178](https://github.com/rust-lang/regex/issues/178):
81+
Drop the `PartialEq` and `Eq` impls on `Regex`.
82+
* [BUG #179](https://github.com/rust-lang/regex/issues/179):
83+
Remove `is_empty` from `Captures` since it always returns false.
84+
* [BUG #276](https://github.com/rust-lang/regex/issues/276):
85+
Position of named capture can now be retrieved from a `Captures`.
86+
* [BUG #296](https://github.com/rust-lang/regex/issues/296):
87+
Remove winapi/kernel32-sys dependency on UNIX.
88+
* [BUG #307](https://github.com/rust-lang/regex/issues/307):
89+
Fix error on emscripten.
90+
91+
192
0.1.80
293
======
394
* [PR #292](https://github.com/rust-lang-nursery/regex/pull/292):

Cargo.toml

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "regex"
3-
version = "0.1.80" #:version
3+
version = "0.2.0" #:version
44
authors = ["The Rust Project Developers"]
55
license = "MIT/Apache-2.0"
66
readme = "README.md"
@@ -16,23 +16,23 @@ finite automata and guarantees linear time matching on all inputs.
1616
# For very fast prefix literal matching.
1717
aho-corasick = "0.5.3"
1818
# For skipping along search text quickly when a leading byte is known.
19-
memchr = "0.1.9"
19+
memchr = "1"
2020
# For managing regex caches quickly across multiple threads.
21-
thread_local = "0.2.4"
21+
thread_local = "0.3.2"
2222
# For parsing regular expressions.
23-
regex-syntax = { path = "regex-syntax", version = "0.3.8" }
23+
regex-syntax = { path = "regex-syntax", version = "0.4.0" }
2424
# For accelerating text search.
2525
simd = { version = "0.1.0", optional = true }
2626
# For compiling UTF-8 decoding into automata.
27-
utf8-ranges = "0.1.3"
27+
utf8-ranges = "1"
2828

2929
[dev-dependencies]
3030
# For examples.
31-
lazy_static = "0.1"
31+
lazy_static = "0.2.2"
3232
# For property based tests.
33-
quickcheck = "0.2"
33+
quickcheck = "0.4.1"
3434
# For generating random test data.
35-
rand = "0.3"
35+
rand = "0.3.15"
3636

3737
[features]
3838
# Enable to use the unstable pattern traits defined in std.

bench/Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ libc = "0.2"
1717
onig = { version = "0.4", optional = true }
1818
libpcre-sys = { version = "0.2", optional = true }
1919
memmap = "0.2"
20-
regex = { version = "0.1", path = "..", features = ["simd-accel"] }
21-
regex_macros = { version = "0.1", path = "../regex_macros", optional = true }
22-
regex-syntax = { version = "0.3", path = "../regex-syntax" }
20+
regex = { version = "0.2.0", path = "..", features = ["simd-accel"] }
21+
regex_macros = { version = "0.2.0", path = "../regex_macros", optional = true }
22+
regex-syntax = { version = "0.4.0", path = "../regex-syntax" }
2323
rustc-serialize = "0.3"
2424

2525
[build-dependencies]

regex-capi/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "rure"
3-
version = "0.1.1" #:version
3+
version = "0.2.0" #:version
44
authors = ["The Rust Project Developers"]
55
license = "MIT/Apache-2.0"
66
readme = "README.md"
@@ -17,4 +17,4 @@ crate-type = ["staticlib", "cdylib"]
1717

1818
[dependencies]
1919
libc = "0.2"
20-
regex = { version = "0.1.77", path = ".." }
20+
regex = { version = "0.2.0", path = ".." }

regex-debug/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ description = "A tool useful for debugging regular expressions."
1111

1212
[dependencies]
1313
docopt = "0.6"
14-
regex = { version = "0.1", path = ".." }
15-
regex-syntax = { version = "0.3", path = "../regex-syntax" }
14+
regex = { version = "0.2", path = ".." }
15+
regex-syntax = { version = "0.4.0", path = "../regex-syntax" }
1616
rustc-serialize = "0.3"
1717

1818
[profile.release]

regex-syntax/Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "regex-syntax"
3-
version = "0.3.9" #:version
3+
version = "0.4.0" #:version
44
authors = ["The Rust Project Developers"]
55
license = "MIT/Apache-2.0"
66
repository = "https://github.com/rust-lang/regex"
@@ -9,5 +9,5 @@ homepage = "https://github.com/rust-lang/regex"
99
description = "A regular expression parser."
1010

1111
[dev-dependencies]
12-
quickcheck = "0.2"
13-
rand = "0.3"
12+
quickcheck = "0.4.1"
13+
rand = "0.3.15"

regex_macros/Cargo.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "regex_macros"
3-
version = "0.1.38"
3+
version = "0.2.0"
44
authors = ["The Rust Project Developers"]
55
license = "MIT/Apache-2.0"
66
repository = "https://github.com/rust-lang/regex"
@@ -19,16 +19,16 @@ plugin = true
1919

2020
[dependencies.regex]
2121
path = ".."
22-
version = "0.1.63"
22+
version = "0.2.0"
2323
features = ["pattern"]
2424

2525
[dependencies.regex-syntax]
2626
path = "../regex-syntax"
27-
version = "0.3.1"
27+
version = "0.4.0"
2828

2929
[dev-dependencies]
3030
# For generating random test data.
31-
rand = "0.3"
31+
rand = "0.3.15"
3232

3333
[[test]]
3434
path = "../tests/test_plugin.rs"

0 commit comments

Comments
 (0)