From acfa2c4ff10cbafbd53c791b21a87a4a429b0f99 Mon Sep 17 00:00:00 2001 From: Jan Michael Auer Date: Fri, 27 Apr 2018 09:38:37 +0200 Subject: [PATCH 1/2] ci: Test Rust 1.19.0 --- .travis.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.travis.yml b/.travis.yml index c8b2b1727..bfb262c2d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,12 @@ script: make $SUITE matrix: include: + - os: linux + env: SUITE=checkall + rust: "1.19.0" + - os: linux + env: SUITE=cargotest + rust: "1.19.0" - os: linux env: SUITE=checkall - os: linux From 8cd94af1e550ad4a792c5e1c87b71d4266883cc0 Mon Sep 17 00:00:00 2001 From: Jan Michael Auer Date: Fri, 27 Apr 2018 11:51:53 +0200 Subject: [PATCH 2/2] build: Compatibility with rust 1.21.0 --- .travis.yml | 10 +++++----- Cargo.toml | 4 ++-- Makefile | 18 +++++++++++++++--- src/backtrace_support.rs | 2 +- src/utils.rs | 5 ++--- 5 files changed, 25 insertions(+), 14 deletions(-) diff --git a/.travis.yml b/.travis.yml index bfb262c2d..c6c9b406e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,19 +11,19 @@ script: make $SUITE matrix: include: - os: linux - env: SUITE=checkall - rust: "1.19.0" + env: SUITE=check + rust: "1.21.0" - os: linux env: SUITE=cargotest - rust: "1.19.0" + rust: "1.21.0" - os: linux env: SUITE=checkall - os: linux - env: SUITE=cargotest + env: SUITE=cargotestall - os: osx env: SUITE=checkall - os: osx - env: SUITE=cargotest + env: SUITE=cargotestall - os: linux env: SUITE=format-check install: rustup component add rustfmt-preview diff --git a/Cargo.toml b/Cargo.toml index 6ef0e2f30..f21b31e7d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ build = "build.rs" all-features = true [features] -default = ["with_client_implementation", "with_panic", "with_failure", "with_log", "with_device_info", "with_rust_info", "with_debug_meta"] +default = ["with_client_implementation", "with_panic", "with_failure", "with_log", "with_device_info", "with_rust_info"] with_client_implementation = ["reqwest", "im", "url", "with_backtrace"] with_backtrace = ["backtrace", "regex"] with_panic = ["with_backtrace"] @@ -35,7 +35,7 @@ failure = { version = "0.1.1", optional = true } log = { version = "0.4.1", optional = true } serde = "1.0.43" serde_json = "1.0.16" -sentry-types = "0.3.2" +sentry-types = "0.3.3" reqwest = { version = "0.8.5", optional = true } uuid = { version = "0.6.3", features = ["v4"] } lazy_static = "1.0.0" diff --git a/Makefile b/Makefile index 647d1d2f6..93d6cbf47 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,12 @@ all: test .PHONY: all +clean: + @cargo clean +.PHONY: clean + build: - @cargo build --all + @cargo build .PHONY: build doc: @@ -49,15 +53,23 @@ check-all-impls: @RUSTFLAGS=-Dwarnings cargo check --no-default-features --features 'with_failure,with_log,with_panic,with_error_chain' .PHONY: check-all-impls +check: check-no-default-features check-default-features +.PHONY: check-all-features + checkall: check-all-features check-no-default-features check-default-features check-failure check-log check-panic check-error-chain check-all-impls .PHONY: checkall cargotest: @echo 'TESTSUITE' - @cargo test --all --all-features + @cargo test +.PHONY: cargotest + +cargotestall: + @echo 'TESTSUITE' + @cargo test --all-features .PHONY: cargotest -test: checkall cargotest +test: checkall cargotestall .PHONY: test format-check: diff --git a/src/backtrace_support.rs b/src/backtrace_support.rs index 3159ca918..fd9ff112c 100644 --- a/src/backtrace_support.rs +++ b/src/backtrace_support.rs @@ -47,7 +47,7 @@ lazy_static!{ rv }; pub static ref SECONDARY_BORDER_FRAMES: Vec<(&'static str, &'static str)> = { - #[allow(unused_mut)] + #![allow(unused_mut)] let mut rv = Vec::new(); #[cfg(feature = "with_error_chain")] { rv.push(("error_chain::make_backtrace", "_>::into")); diff --git a/src/utils.rs b/src/utils.rs index 1abb1dfab..dbb22078d 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -1,8 +1,5 @@ //! Useful utilities for working with events. -use uuid::Uuid; - use api::protocol::{Context, DebugImage, DeviceContext, OsContext, RuntimeContext}; -use api::protocol::debugid::DebugId; #[cfg(all(feature = "with_device_info", target_os = "macos"))] mod model_support { @@ -66,8 +63,10 @@ mod model_support { mod findshlibs_support { use super::*; use api::protocol::SymbolicDebugImage; + use api::protocol::debugid::DebugId; use findshlibs::{Segment, SharedLibrary, SharedLibraryId, TargetSharedLibrary, TARGET_SUPPORTED}; + use uuid::Uuid; pub fn find_shlibs() -> Option> { if !TARGET_SUPPORTED {