Skip to content

Commit

Permalink
Merge pull request #177 from tjkirch/upgrade-minimum
Browse files Browse the repository at this point in the history
Update to Rust 2018, syn/quote/proc-macro2 1.0
  • Loading branch information
shepmaster authored Sep 25, 2019
2 parents 6bce5c6 + 5e41b13 commit f5dd044
Show file tree
Hide file tree
Showing 23 changed files with 107 additions and 319 deletions.
27 changes: 4 additions & 23 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,36 +63,17 @@ v1_34_test_task:
- cargo test
before_cache_script: rm -rf $CARGO_HOME/registry/index

v1_30_test_task:
name: "Rust 1.30"
v1_31_test_task:
name: "Rust 1.31"
container:
image: rust:1.30
image: rust:1.31
cpu: 1
memory: 2Gi
cargo_cache:
folder: $CARGO_HOME/registry
fingerprint_script: cat Cargo.toml
primary_test_script:
- cd compatibility-tests/v1_30/
- rustc --version
- cargo test
before_cache_script: rm -rf $CARGO_HOME/registry/index

v1_18_test_task:
name: "Rust 1.18"
container:
# No Docker container for 1.18
image: rust:latest
cpu: 1
memory: 2Gi
cargo_cache:
folder: $CARGO_HOME/registry
fingerprint_script: cat Cargo.toml
setup_script:
- rustup install 1.18.0
- rustup default 1.18.0
primary_test_script:
- cd compatibility-tests/v1_18/
- cd compatibility-tests/v1_31/
- rustc --version
- cargo test
before_cache_script: rm -rf $CARGO_HOME/registry/index
11 changes: 4 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "snafu"
version = "0.5.0"
authors = ["Jake Goulding <jake.goulding@gmail.com>"]
edition = "2018"

readme = "README.md"
description = "An ergonomic error handling library"
Expand All @@ -23,7 +24,7 @@ exclude = [
all-features = true

[features]
default = ["rust_1_30", "backtraces"]
default = ["backtraces"]

# Adds the backtrace type
backtraces = ["snafu-derive/backtraces", "backtrace"]
Expand All @@ -34,9 +35,6 @@ backtrace-crate = ["backtraces"]
# Add extension traits for the futures 0.1 crate
"futures-01" = ["futures01"]

# New methods on `Error`; re-export of proc-macro
rust_1_30 = ["snafu-derive/rust_1_30", "doc-comment"]

# The standard library's implementation of futures
"unstable-futures" = ["futures-core-preview", "pin-project"]

Expand All @@ -50,18 +48,17 @@ rust_1_30 = ["snafu-derive/rust_1_30", "doc-comment"]
exclude = [
"compatibility-tests/compile-fail",
"compatibility-tests/v1_34",
"compatibility-tests/v1_30",
"compatibility-tests/v1_18",
"compatibility-tests/v1_31",
"compatibility-tests/futures-0.1",
"compatibility-tests/futures",
"compatibility-tests/without-backtrace",
]

[dependencies]
snafu-derive = { path = "snafu-derive", version = "0.5.0" }
doc-comment = { version = "0.3.1", default-features = false }
backtrace = { version = "0.3.0", optional = true }
futures01 = { version = "0.1", optional = true, default-features = false }
futures-preview = { version = "0.3.0-alpha.16", optional = true, default-features = false }
futures-core-preview = { version = "0.3.0-alpha.16", optional = true, default-features = false }
pin-project = { version = "0.3.2", optional = true, default-features = false }
doc-comment = { version = "0.3.1", optional = true, default-features = false }
15 changes: 0 additions & 15 deletions compatibility-tests/v1_18/Cargo.toml

This file was deleted.

1 change: 0 additions & 1 deletion compatibility-tests/v1_18/rust-toolchain

This file was deleted.

83 changes: 0 additions & 83 deletions compatibility-tests/v1_18/src/lib.rs

This file was deleted.

3 changes: 0 additions & 3 deletions compatibility-tests/v1_30/.gitignore

This file was deleted.

13 changes: 0 additions & 13 deletions compatibility-tests/v1_30/Cargo.toml

This file was deleted.

1 change: 0 additions & 1 deletion compatibility-tests/v1_30/rust-toolchain

This file was deleted.

52 changes: 0 additions & 52 deletions compatibility-tests/v1_30/src/lib.rs

This file was deleted.

File renamed without changes.
11 changes: 11 additions & 0 deletions compatibility-tests/v1_31/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[package]
name = "v1_31"
version = "0.1.0"
authors = ["Jake Goulding <jake.goulding@gmail.com>"]
edition = "2018"

[dependencies]
snafu = { path = "../..", default-features = false, features = ["backtraces"] }

# These versions are the last versions to support Rust 1.31
backtrace = "= 0.3.35"
1 change: 1 addition & 0 deletions compatibility-tests/v1_31/rust-toolchain
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.31.0
1 change: 1 addition & 0 deletions compatibility-tests/v1_31/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// There are not yet any feature differences that require testing for Rust 1.31 compatibility.
2 changes: 1 addition & 1 deletion compatibility-tests/without-backtrace/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ authors = ["Jake Goulding <jake.goulding@gmail.com>"]
edition = "2018"

[dependencies]
snafu = { path = "../..", default-features = false, features = ["rust_1_30"] }
snafu = { path = "../..", default-features = false, features = [] }
8 changes: 4 additions & 4 deletions snafu-derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "snafu-derive"
version = "0.5.0"
authors = ["Jake Goulding <jake.goulding@gmail.com>"]
edition = "2018"

description = "An ergonomic error handling library"
documentation = "https://docs.rs/snafu"
Expand All @@ -11,12 +12,11 @@ license = "MIT OR Apache-2.0"

[features]
backtraces = []
rust_1_30 = []

[lib]
proc-macro = true

[dependencies]
syn = { version = "0.15.19", features = ["full"] }
quote = "0.6"
proc-macro2 = "0.4"
syn = { version = "1.0", features = ["full"] }
quote = "1.0"
proc-macro2 = "1.0"
Loading

0 comments on commit f5dd044

Please sign in to comment.