summaryrefslogtreecommitdiff
path: root/crates/tor-error
Commit message (Collapse)AuthorAgeFilesLines
* Update unstable `tor/arti-*` crates to 0.17.0.Nick Mathewson2024-04-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Done with: ``` CRATES=" tor-basic-utils tor-async-utils tor-error tor-config tor-events tor-units tor-geoip tor-rtcompat tor-rtmock tor-log-ratelim tor-rpcbase tor-llcrypto tor-protover tor-bytes tor-hscrypto tor-hspow tor-socksproto tor-checkable tor-cert tor-linkspec tor-cell tor-proto tor-netdoc tor-consdiff tor-netdir tor-relay-selection tor-congestion tor-persist tor-chanmgr tor-ptmgr tor-guardmgr tor-circmgr tor-dirclient tor-dirmgr tor-keymgr tor-hsclient tor-hsservice tor-hsrproxy arti-client arti-rpcserver arti-config arti-hyper arti-bench arti-testing " for crate in $CRATES; do cargo set-version -p "$crate" 0.17.0 done ```
* Bump patchlevel versions on non-{tor/arti} crates.Nick Mathewson2024-04-021-1/+1
| | | | | | | | | | | | | | | | These have all had backward-compatible changes. Generated with: ``` cargo set-version --bump patch -p fs-mistrust cargo set-version --bump patch -p test-temp-dir cargo set-version --bump patch -p fslock-guard cargo set-version --bump patch -p hashx cargo set-version --bump patch -p equix cargo set-version --bump patch -p caret cargo set-version --bump patch -p safelog cargo set-version --bump patch -p retry-error ```
* Run maint/add_warning.Nick Mathewson2024-03-134-0/+4
|
* deny clippy::unchecked_duration_subtractiontrinity-1686a2024-02-291-0/+1
|
* Bump patch versions (without dependency updates)Ian Jackson2024-02-051-1/+1
| | | | | | | | | These crates have had trivial changes which have no implications for their dependencies: safelog tor-error tor-config
* tor-error: Backtrace: Remove a Captured(...) from a DisplayIan Jackson2024-01-311-1/+1
| | | | | Prompted by clippy complaining that the content wasn't ever read other than by the autogenerated Debug impl.
* Require tracing-test 0.2.4Ian Jackson2024-01-311-1/+1
| | | | | | Apparently we need https://github.com/dbrgn/tracing-test/pull/17 too.
* Require tracing-test 0.2.2Ian Jackson2024-01-311-1/+1
| | | | | | | | We need this bugfix https://github.com/dbrgn/tracing-test/pull/15 for `#[traced_test]` when `Result` is redefined. Fixes the tests with minimal-versions.
* Upgrade to strum 0.26Nick Mathewson2024-01-301-1/+1
|
* Remove pending semver entriesarti-v1.1.12Nick Mathewson2024-01-091-2/+0
|
* Breaking version bumps in preparation for 1.1.12.Nick Mathewson2024-01-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These crates have breaking changes on their own: tor-error tor-netdoc tor-dirmgr tor-keymgr Because of the breaking change in tor-error, and the fact that basically every crate publicly depends on tor-error (by implementing ErrorKind), we need to call this a breaking change on all of the following: tor-config tor-geoip tor-rtmock tor-log-ratelim tor-rpcbase tor-bytes tor-hscrypto tor-socksproto tor-cell tor-proto tor-netdoc tor-netdir tor-persist tor-chanmgr tor-ptmgr tor-guardmgr tor-circmgr tor-dirclient tor-dirmgr tor-keymgr tor-hsclient tor-hsservice tor-hsrproxy arti-client arti-rpcserver arti-config arti-hyper arti-testing
* tor-error: Correct docs for ErrorReport to reflect improved situationIan Jackson2023-12-121-2/+4
|
* tor-error: tests: Demonstrate warn_report on bare error and anyhowIan Jackson2023-12-122-0/+38
|
* tor-error: ErrorReport: impl for StdError + 'staticIan Jackson2023-12-122-0/+8
|
* tor-error: ErrorReport: remove Sized bound from traitIan Jackson2023-12-121-1/+1
| | | | This will let us impl for dyn StdError.
* tor-error: ErrorReport: move blanket impl code into implIan Jackson2023-12-121-2/+4
| | | | | This impl can only compile for Self: Sized. This will let us remove the Sized bound from the trait itself.
* tor-error: ErrorReport: sealIan Jackson2023-12-123-1/+11
| | | | | | We're going to need to make change to this trait which would be breaking for out-of-crate implementors. This should have been sealed all along.
* tor-error: Introduce ErrorKind::LocalResourceAlreadyInUseIan Jackson2023-12-111-0/+22
| | | | | | | | Our HSS code isn't going to work if you run more than one copy. Soon we'll detect this (via our use of tor_persist). There may be other places this ought to be used. Eg if we get EADDRINUSE from trying to set up a proxy, maybe ...
* Bump patchlevel versions in preparation for releaseNick Mathewson2023-12-041-1/+1
| | | | | | | | | | | | | | | These crates had backward-compatible changes, and get a patchlevel bump only: fs-mistrust tor-error tor-config tor-rtcompat tor-rtmock This crate exposes no non-CLI APIs, and gets a patchlevel bump only: arti
* In every crate, change rust-version to 1.70.Nick Mathewson2023-11-281-1/+1
|
* tor-error: fmt_ending_ok: Permit messages ending in ascii ellipsisIan Jackson2023-11-201-0/+1
| | | | | | | | | Tbis will result in "some message ...: the error" which I think is OK. We don't use a Unicode single-character ellipsis because that character can be hard to read at font sizes which are otherwise OK for text, and because use of non-ascii in logfiles and error messages is unecessary and might cause unnecessary trouble (for example, if the log messages end up going somewhere which isn't 100% valid UTF-8).
* tor-error: fmt_ending_ok: Implement with a direct matchIan Jackson2023-11-201-1/+5
| | | | | Possibly at some point in the past, matching a slice directly wasn't possible. But it is now.
* Update patchlevel for crates with nontrivial changes.Nick Mathewson2023-09-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These are: ``` hashx equix tor-async-utils tor-error tor-config tor-rtmock tor-llcrypto tor-bytes tor-hscrypto tor-hspow tor-cert tor-linkspec tor-cell tor-proto tor-netdoc tor-netdir tor-chanmgr tor-guardmgr tor-dirmgr tor-keymgr tor-hsclient tor-hsservice arti-client arti ```
* Run maint/add_warning to add lint block everywhereIan Jackson2023-08-233-0/+3
|
* tor-error, arti: Bump backtrace to 0.3.68.Gabriela Moldovan2023-08-151-1/+1
| | | | | | | | Previously we were using backtrace 0.3.39, which has a [bug] that causes it to segault in some circumstances. I experienced this bug while trying to fix the minimal-versions build in !1508. [bug]: https://github.com/rust-lang/backtrace-rs/issues/267
* tor-error: Remove KeystoreFsPermissions variant.Gabriela Moldovan2023-08-081-12/+0
| | | | | | | | According to the `ErrorKind` lumping guidelines, `KeystoreFsPermissions` should be lumped with `FsPermissions`: they represent the same type of error, and their "location" is the same ("Host"). Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1315#note_2916455
* Run add_warnings on all files.Nick Mathewson2023-08-041-2/+2
|
* Merge branch 'bump_versions_117' into 'main'arti-v1.1.7Nick Mathewson2023-08-011-2/+2
|\ | | | | | | | | Vesion bumps for 1.1.7. See merge request tpo/core/arti!1458
| * Increment patchlevel versions of crates with minor changesNick Mathewson2023-08-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These crates are at version 0.x.y, so we don't need to distinguish new-feature changes from other changes: ``` tor-basic-utils fs-mistrust tor-error tor-geoip tor-checkable tor-linkspec tor-netdoc tor-netdir tor-persist tor-ptmgr tor-hsservice ``` This crate has a breaking change, but only when the semver-breaking feature `experimental-api` is enabled: ``` tor-config ``` This crate is at version 1.x.y, but has no new public APIs, and therefore does not need a minor version bump: ``` arti ```
| * Update minor versions on crates that have had breaking changesNick Mathewson2023-08-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These crates had first-order breaking changes: ``` retry-error tor-keymgr tor-proto tor-hsclient tor-rtmock ``` Additionally, these broke because they re-exposed RetryError: ``` tor-circmgr ``` Additionally, these broke because they may re-expose something from tor-proto: ``` arti-client tor-chanmgr tor-dirclient tor-dirmgr tor-guardmgr ``` Additionally, these broke for other fiddly reasons: `tor-ptmgr` implements traits from tor-chanmgr, which has a breaking change above. `arti-hyper` exposes types from arti-client in its API.
* | Run "fixup features" in preparation for a release.Nick Mathewson2023-08-011-1/+1
|/
* retry-error: Provide fmt_error_with_sources in retry-errorIan Jackson2023-07-192-16/+4
| | | | | This code came from tor-error. So now tor-error depends on retry-error.
* clippy: tor-error: Use convert::identity for into_internal!Ian Jackson2023-07-101-0/+4
| | | | | | | | | | This launders the closure so that clippy's clippy::redundant_closure_call can't see it. We can't have a local #[allow] because it would be on an expression, which isn't allowed on stable. This avoids having to use more clumsy idioms at call sites.
* Run maint/add_warning to actually apply new lint allowsIan Jackson2023-07-104-0/+4
|
* Fix warn_report and error_report macros.Nick Mathewson2023-07-071-4/+10
| | | | | | | | | Originally they didn't check err.kind(), since err.kind() can never increase their severity. We lost that behavior with !1386, and we became dependent on it with arti!1383. Since they both merged at the same time, CI broke. This patch restores their original behavior.
* tor-error: tracing module: Use macro to generate macrosIan Jackson2023-07-072-91/+54
| | | | | | | | | | This abolishes some quintuplication. The output is identical except that: * The syntax display in the rustdoc output for the resulting macros seems to have somewhat less whitepsace. * The whimsical error messages in the examples are all identical. Ah well.
* tor-error: tracing module: Fix link to tracing macroIan Jackson2023-07-071-1/+1
|
* Merge branch 'report-bugs-v2' into 'main'Nick Mathewson2023-07-073-1/+199
|\ | | | | | | | | Optional tracing support in tor-error for error reporting See merge request tpo/core/arti!1379
| * event_report: assert correctness of format endingNick Mathewson2023-07-072-0/+23
| | | | | | | | | | (Also, document that this static assertion is the reason why you are seeing a confusing error message.)
| * tor-error: Add optional tracing supportNick Mathewson2023-07-073-1/+176
| | | | | | | | | | | | | | | | | | | | The main contribution here is a set of convenience macros for logging error `Report`s. Notably, this macros always logs `Internal` and `BadAspiUsage` errors at `WARN`, unless they are already at `ERROR` or more. This is a little tricky because `tracing::event!()` requires its Level argument to be a constant.
* | Run add_warning to remove `missing_panics_doc` deny.Nick Mathewson2023-07-061-1/+0
|/ | | | Closes #950.
* Add TODO comments about possibly migrating away from the backtrace crate.Nick Mathewson2023-07-051-0/+2
|
* Remove semver.md files for 1.1.6Nick Mathewson2023-06-301-3/+0
|
* Bump patchlevel versions on crates with smaller changesNick Mathewson2023-06-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Done with the commands below. The following crates have had various changes, and should get a patchlevel bump. Since they are pre-1.0, we do not need to distinguish new APIs from other changes. ``` cargo set-version --bump patch -p arti-client cargo set-version --bump patch -p safelog cargo set-version --bump patch -p tor-bytes cargo set-version --bump patch -p tor-cert cargo set-version --bump patch -p tor-circmgr cargo set-version --bump patch -p tor-config cargo set-version --bump patch -p tor-consdiff cargo set-version --bump patch -p tor-dirclient cargo set-version --bump patch -p tor-dirmgr cargo set-version --bump patch -p tor-error cargo set-version --bump patch -p tor-hsservice cargo set-version --bump patch -p tor-linkspec cargo set-version --bump patch -p tor-llcrypto cargo set-version --bump patch -p tor-netdir cargo set-version --bump patch -p tor-netdoc cargo set-version --bump patch -p tor-proto cargo set-version --bump patch -p tor-rpcbase cargo set-version --bump patch -p tor-socksproto ``` This crate has new features, but no new non-experimental Rust APIs. So even though it is post-1.0, it gets a patchlevel bump. ``` cargo set-version --bump patch -p arti ```
* tor-error: Make KeystoreFsPermissions experimental for nowIan Jackson2023-06-291-0/+3
| | | | Let's defer this decision.
* tor-error: Add KeystoreAccessFailed, KeystoreFsPermissions to ErrorKind.Gabriela Moldovan2023-06-282-1/+21
|
* tor-error: Add KeystoreCorrupted to ErrorKind.Gabriela Moldovan2023-06-282-0/+11
|
* tor-error: Mark define_asref_dyn_std_error as non-experimentalNick Mathewson2023-06-231-1/+0
| | | | | (I see no problems with this macro. In the worst case, we deprecate it someday.)
* tor-error: Stabilize OnionService error kindsNick Mathewson2023-06-221-7/+0
|
* tor-error: typo fix in a comment.Nick Mathewson2023-06-221-1/+1
|