Skip to content

Commit 13ed3d5

Browse files
authored
ref: Remove deprecated error-chain and failure crates (#290)
1 parent 1831525 commit 13ed3d5

File tree

16 files changed

+11
-635
lines changed

16 files changed

+11
-635
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ jobs:
2424
components: rustfmt, clippy
2525

2626
- uses: Swatinem/rust-cache@v1
27-
with:
28-
key: lints
2927

3028
- name: Run cargo fmt
3129
uses: actions-rs/cargo@v1
@@ -64,8 +62,6 @@ jobs:
6462
override: true
6563

6664
- uses: Swatinem/rust-cache@v1
67-
with:
68-
key: check
6965

7066
- run: make checkall
7167

@@ -91,8 +87,6 @@ jobs:
9187
override: true
9288

9389
- uses: Swatinem/rust-cache@v1
94-
with:
95-
key: test
9690

9791
- name: Run cargo test
9892
uses: actions-rs/cargo@v1
@@ -125,8 +119,6 @@ jobs:
125119
override: true
126120

127121
- uses: Swatinem/rust-cache@v1
128-
with:
129-
key: fast-MSRV
130122

131123
- run: make checkfast
132124

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## Unreleased
4+
5+
**Breaking Changes**:
6+
7+
- The deprecated `error-chain` and `failure` integrations, features and crates were removed.
8+
39
## 0.21.0
410

511
**Breaking Changes**:

Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ members = [
77
"sentry-contexts",
88
"sentry-core",
99
"sentry-debug-images",
10-
"sentry-error-chain",
11-
"sentry-failure",
1210
"sentry-log",
1311
"sentry-panic",
1412
"sentry-slog",

Makefile

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ testall:
5353
checkfast: check-no-default-features check-default-features
5454
.PHONY: checkfast
5555

56-
checkall: check-all-features check-no-default-features check-default-features check-failure check-panic check-all-impls check-curl-transport check-actix
56+
checkall: check-all-features check-no-default-features check-default-features check-panic check-curl-transport check-actix
5757
.PHONY: checkall
5858

5959
check-all-features:
@@ -71,21 +71,11 @@ check-no-default-features:
7171
@cd sentry && RUSTFLAGS=-Dwarnings cargo check --no-default-features
7272
.PHONY: check-no-default-features
7373

74-
check-failure:
75-
@echo 'NO CLIENT + FAILURE'
76-
@cd sentry && RUSTFLAGS=-Dwarnings cargo check --no-default-features --features 'failure'
77-
.PHONY: check-failure
78-
7974
check-panic:
8075
@echo 'NO CLIENT + PANIC'
8176
@cd sentry && RUSTFLAGS=-Dwarnings cargo check --no-default-features --features 'panic'
8277
.PHONY: check-panic
8378

84-
check-all-impls:
85-
@echo 'NO CLIENT + ALL IMPLS'
86-
@cd sentry && RUSTFLAGS=-Dwarnings cargo check --no-default-features --features 'failure,panic'
87-
.PHONY: check-all-impls
88-
8979
check-curl-transport:
9080
@echo 'CURL TRANSPORT'
9181
@cd sentry && RUSTFLAGS=-Dwarnings cargo check --features curl

sentry-backtrace/src/trim.rs

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,6 @@ lazy_static::lazy_static! {
2626
"anyhow::",
2727
"<sentry_log::Logger as log::Log>::log",
2828
];
29-
30-
// TODO: remove all of this together with the deprecated `error_chain` support
31-
static ref SECONDARY_BORDER_FRAMES: Vec<(&'static str, &'static str)> = vec![
32-
("error_chain::make_backtrace", "<T as core::convert::Into<U>>::into")
33-
];
3429
}
3530

3631
/// A helper function to trim a stacktrace.
@@ -48,42 +43,8 @@ where
4843
});
4944

5045
if let Some(cutoff) = known_cutoff {
51-
let secondary = {
52-
let func = stacktrace.frames[stacktrace.frames.len() - cutoff - 1]
53-
.function
54-
.as_ref()
55-
.unwrap();
56-
57-
SECONDARY_BORDER_FRAMES
58-
.iter()
59-
.filter_map(|&(primary, secondary)| {
60-
if function_starts_with(func, primary) {
61-
Some(secondary)
62-
} else {
63-
None
64-
}
65-
})
66-
.next()
67-
};
6846
let trunc = stacktrace.frames.len() - cutoff - 1;
6947
stacktrace.frames.truncate(trunc);
70-
71-
if let Some(secondary) = secondary {
72-
let secondary_cutoff =
73-
stacktrace
74-
.frames
75-
.iter()
76-
.rev()
77-
.position(|frame| match frame.function {
78-
Some(ref func) => function_starts_with(&func, secondary),
79-
None => false,
80-
});
81-
82-
if let Some(cutoff) = secondary_cutoff {
83-
let trunc = stacktrace.frames.len() - cutoff - 1;
84-
stacktrace.frames.truncate(trunc);
85-
}
86-
}
8748
}
8849
}
8950

sentry-error-chain/Cargo.toml

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

sentry-error-chain/README.md

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

sentry-error-chain/src/lib.rs

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

sentry-failure/Cargo.toml

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

sentry-failure/README.md

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

0 commit comments

Comments
 (0)