Skip to content

Commit 571c140

Browse files
author
bors-servo
authored
Auto merge of #230 - servo:phf, r=SimonSapin
Update phf and make a bunch of other breaking changes
2 parents 3477168 + 07a74fa commit 571c140

File tree

16 files changed

+372
-575
lines changed

16 files changed

+372
-575
lines changed

.travis.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ os:
99
- linux
1010
script:
1111
- cargo build
12-
- cargo test
13-
- cargo test --features log-events
14-
- "if [ $TRAVIS_RUST_VERSION = nightly ]; then cargo test --features unstable; fi"
15-
- cargo test
16-
- "cd string-cache-codegen/ && cargo build && cd .."
17-
- "cd examples/event-log/ && cargo build && cd ../.."
18-
- "cd examples/summarize-events/ && cargo build && cd ../.."
12+
- cargo test --all
13+
- "cd string-cache-codegen && cargo build && cd .."
14+
- "if [ $TRAVIS_RUST_VERSION = nightly ]; then cd integration-tests && cargo test --features unstable && cd ..; fi"

Cargo.toml

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
[package]
2-
32
name = "string_cache"
4-
version = "0.7.4" # Also update README.md when making a semver-breaking change
3+
version = "0.8.0" # Also update README.md when making a semver-breaking change
54
authors = [ "The Servo Project Developers" ]
65
description = "A string interning library for Rust, developed as part of the Servo project."
76
license = "MIT / Apache-2.0"
87
repository = "https://github.com/servo/string-cache"
98
documentation = "https://docs.rs/string_cache/"
10-
build = "build.rs"
119

1210
# Do not `exclude` ./string-cache-codegen because we want to include
1311
# ./string-cache-codegen/shared.rs, and `include` is a pain to use
@@ -18,30 +16,20 @@ build = "build.rs"
1816
[lib]
1917
name = "string_cache"
2018

21-
[features]
22-
23-
# Enable event logging for generating benchmark traces.
24-
# See examples/event-log.
25-
log-events = []
26-
27-
# Use unstable features to optimize space and time (memory and CPU usage).
28-
unstable = []
29-
3019
[dependencies]
3120
precomputed-hash = "0.1"
3221
lazy_static = "1"
3322
serde = "1"
34-
phf_shared = "0.7.4"
23+
phf_shared = "0.8"
3524
new_debug_unreachable = "1.0"
3625
string_cache_shared = {path = "./shared", version = "0.3"}
3726

38-
[dev-dependencies]
39-
rand = "0.4"
40-
string_cache_codegen = { version = "0.4", path = "./string-cache-codegen" }
41-
42-
[build-dependencies]
43-
string_cache_codegen = { version = "0.4", path = "./string-cache-codegen" }
44-
4527
[[test]]
4628
name = "small-stack"
4729
harness = false
30+
31+
[workspace]
32+
members = [
33+
"string-cache-codegen",
34+
"integration-tests",
35+
]

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ In `Cargo.toml`:
1212

1313
```toml
1414
[dependencies]
15-
string_cache = "0.7"
15+
string_cache = "0.8"
1616
```
1717

1818
In `lib.rs`:
@@ -31,10 +31,10 @@ In `Cargo.toml`:
3131
build = "build.rs"
3232

3333
[dependencies]
34-
string_cache = "0.7"
34+
string_cache = "0.8"
3535

3636
[build-dependencies]
37-
string_cache_codegen = "0.4"
37+
string_cache_codegen = "0.5"
3838
```
3939

4040
In `build.rs`:

examples/event-log/Cargo.toml

Lines changed: 0 additions & 9 deletions
This file was deleted.

examples/event-log/README.md

Lines changed: 0 additions & 4 deletions
This file was deleted.

examples/event-log/src/main.rs

Lines changed: 0 additions & 33 deletions
This file was deleted.

examples/summarize-events/Cargo.toml

Lines changed: 0 additions & 13 deletions
This file was deleted.

examples/summarize-events/src/main.rs

Lines changed: 0 additions & 170 deletions
This file was deleted.

integration-tests/Cargo.toml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
[package]
2+
name = "integration_tests"
3+
version = "0.0.1"
4+
authors = [ "The Servo Project Developers" ]
5+
build = "build.rs"
6+
publish = false
7+
8+
[lib]
9+
doctest = false
10+
test = true
11+
12+
[features]
13+
14+
# Use unstable features to optimize space and time (memory and CPU usage).
15+
unstable = []
16+
17+
[dependencies]
18+
string_cache = { version = "0.8", path = ".." }
19+
20+
[dev-dependencies]
21+
rand = "0.7"
22+
string_cache_codegen = { version = "0.5", path = "../string-cache-codegen" }
23+
24+
[build-dependencies]
25+
string_cache_codegen = { version = "0.5", path = "../string-cache-codegen" }

build.rs renamed to integration-tests/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use std::env;
44
use std::path::Path;
55

66
fn main() {
7-
string_cache_codegen::AtomType::new("atom::tests::TestAtom", "test_atom!")
7+
string_cache_codegen::AtomType::new("TestAtom", "test_atom!")
88
.atoms(&[
99
"a", "b", "address", "area", "body", "font-weight", "br", "html", "head", "id",
1010
])

0 commit comments

Comments
 (0)