Gabriela Moldovan
f6456d469d
tor-error: Add a TODO regarding HS desc parsing errors.
...
Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-05-03 17:25:36 +01:00
Gabriela Moldovan
c2cb96a623
Clarify what the new ErrorKinds mean.
...
Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-05-03 17:25:29 +01:00
Gabriela Moldovan
c6fccbbb01
hsclient: Use a real HsDesc instead of an unparsed string.
...
Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-05-03 17:25:21 +01:00
Nick Mathewson
1904cfc8b9
Increment crate versions.
...
Because of the errorkind bumps, we're calling this a breaking change
in everything lower-level than `arti`.
Generated with:
```
cargo set-version -p tor-basic-utils --bump minor
cargo set-version -p tor-async-utils --bump minor
cargo set-version -p caret --bump minor
cargo set-version -p fs-mistrust --bump minor
cargo set-version -p safelog --bump minor
cargo set-version -p retry-error --bump minor
cargo set-version -p tor-error --bump minor
cargo set-version -p tor-config --bump minor
cargo set-version -p tor-events --bump minor
cargo set-version -p tor-units --bump minor
cargo set-version -p tor-rtcompat --bump minor
cargo set-version -p tor-rtmock --bump minor
cargo set-version -p tor-rpcbase --bump minor
cargo set-version -p tor-llcrypto --bump minor
cargo set-version -p tor-protover --bump minor
cargo set-version -p tor-bytes --bump minor
cargo set-version -p tor-hscrypto --bump minor
cargo set-version -p tor-socksproto --bump minor
cargo set-version -p tor-checkable --bump minor
cargo set-version -p tor-cert --bump minor
cargo set-version -p tor-linkspec --bump minor
cargo set-version -p tor-cell --bump minor
cargo set-version -p tor-proto --bump minor
cargo set-version -p tor-netdoc --bump minor
cargo set-version -p tor-consdiff --bump minor
cargo set-version -p tor-netdir --bump minor
cargo set-version -p tor-congestion --bump minor
cargo set-version -p tor-persist --bump minor
cargo set-version -p tor-chanmgr --bump minor
cargo set-version -p tor-ptmgr --bump minor
cargo set-version -p tor-guardmgr --bump minor
cargo set-version -p tor-circmgr --bump minor
cargo set-version -p tor-dirclient --bump minor
cargo set-version -p tor-dirmgr --bump minor
cargo set-version -p tor-hsclient --bump minor
cargo set-version -p tor-hsservice --bump minor
cargo set-version -p arti-client --bump minor
cargo set-version -p arti-rpcserver --bump minor
cargo set-version -p arti-config --bump minor
cargo set-version -p arti-hyper --bump minor
cargo set-version -p arti --bump patch
cargo set-version -p arti-bench --bump patch
cargo set-version -p arti-testing --bump patch
```
2023-05-03 08:31:11 -04:00
Nick Mathewson
e37b017342
tor-error: Add ErrorKinds for RPC errors.
...
These are experimental for now so that we can change them without
breaking semver.
2023-04-12 13:30:24 -04:00
Ian Jackson
b6533b31aa
Merge branch 'msrv-1.65' into 'main'
...
Increase Arti MSRV to 1.65
Closes #815
See merge request tpo/core/arti!1131
2023-04-12 09:34:05 +00:00
Nick Mathewson
c596ded74a
Merge branch 'bug804' into 'main'
...
s/ProtocolFailed/ProtocolViolation/g where possible
Closes #804
See merge request tpo/core/arti!1121
2023-04-11 21:33:25 +00:00
Nick Mathewson
104d64589d
Increment MSRV to 1.65 in every crate.
2023-04-11 15:31:12 -04:00
tranna
51b5ba6681
Use an Enum for the description request
2023-04-10 18:37:45 +00:00
Neel Chauhan
5d61ff04d1
s/ProtocolFailed/ProtocolViolation/g where possible
2023-04-08 07:47:28 -07:00
Ian Jackson
bf9a7826de
tor-error: Rename ErrorKind::TorDirectoryUsable (from ...Broken)
...
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1117#note_2893986
(Not going to squash this as it has a semantic conflict with !1118 , so
needs a little special handling there.)
2023-04-06 11:06:18 +01:00
Ian Jackson
0e8384bcb4
tor-error: Introduce ErrorKind::TorDirectoryBroken
...
We will use this for a lack of HS directories. (These aren't chosen
according to any local restrictions, so the problems with EK::NoPath
and EK::NoExit don't arise.)
2023-04-05 15:11:17 +01:00
Ian Jackson
c5f6b2e3a5
tor-error: Add missing footnote
...
I C&P this from tor-dirmgr, and missed this part.
2023-03-31 18:45:40 +01:00
gabi-250
11a70925fd
Fix duplicated licence in Cargo.toml
2023-03-31 17:44:30 +00:00
Ian Jackson
3e22e881f3
tor-error: Add OnionServiceNotRunning error
...
We'll want this later. Define it now, though, since we've discussed
it here
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1099#note_2892020
2023-03-31 18:01:36 +01:00
Ian Jackson
68e5711684
tor-error: Put OnionService errors behind a new experimental-api feature
2023-03-31 17:57:24 +01:00
Ian Jackson
307af3714f
tor-error: Document cargo feature
2023-03-31 17:56:32 +01:00
Ian Jackson
c6a10387e3
tor-error: Errors for hidden services
...
So far these are just the errors that occur during descriptor
fetch. There will be more later as we have more code in tor-hsconn.
This is very user-facing; use the "onion service" terminology.
2023-03-31 17:53:40 +01:00
Nick Mathewson
7c1b6a5a81
Bump the patch version of every crate that had API additions
...
These crates had API or behavior changes that may affect downstream
crates. Fortunately, they're all version 0.x, and don't need minor
bumps for this.
2023-02-01 10:36:29 -05:00
Nick Mathewson
a6dd92843e
Allow clippy::unchecked_duration_subtraction in tests
...
This panics on error, and we're fine with a panic on misbehavior in
tests.
2023-01-27 08:28:02 -05:00
Nick Mathewson
bf04641c68
Disable clippy::unlinlined-format-args
...
This warning kind of snuck up on us! (See #748 ) For now, let's
disable it. (I've cleaned it up in a couple of examples, since
those are meant to be more idiomatic and user-facing.)
Closes #748 .
2023-01-27 08:27:47 -05:00
Dimitris Apostolou
892c6eaadf
Fix typos
2023-01-07 20:35:54 +02:00
eta
118050e54c
Merge branch 'test-lints' into 'main'
...
Add test lint blocks to all "mod test"
See merge request tpo/core/arti!937
2023-01-06 17:16:09 +00:00
Emil Engler
8579bc66a8
doc: consistent summary line for the READMEs
...
This commit introduces a consistency to the summary line of all
README.md files in each and every crate.
2022-12-20 14:31:47 +01:00
Ian Jackson
8a28cb2d14
tor-error: tests: Add a test case for Report and Bug wrapping
2022-12-15 14:37:08 +00:00
Ian Jackson
125a455bdc
test lint blocks: Add many many automatically
...
This is precisely the result of running the rune in
maint/adhoc-add-lint-blocks.
2022-12-12 18:00:30 +00:00
Ian Jackson
b132536b32
tor-error: Provide ErrorReport extension trait with .report() method
2022-12-12 16:40:51 +00:00
Ian Jackson
bd46e2ae84
tor_error: Promote internal StdError alias to report
...
The std::error::Error repetition was getting rather repetitively
repetitious, and is about to get more so.
2022-12-12 16:40:51 +00:00
Nick Mathewson
e0aeda3071
Remove semver.md files now that 1.1.0 is released.
2022-11-30 17:10:29 -05:00
Nick Mathewson
38bef96b99
Bump the minor version of every crate.
...
We made this job easy this time around: by incrementing our MSRV, we
have forced ourselves to do at least a minor bump everywhere.
2022-11-30 15:10:16 -05:00
Nick Mathewson
7f923b9dfe
Rename LocalLoginFailed to ExternalToolFailed.
2022-11-29 10:32:59 -05:00
Nick Mathewson
eebfe8300e
Document better what LocalProtocolViolation does not cover.
2022-11-29 10:29:54 -05:00
Nick Mathewson
4b5be3685f
ptmgr: Fill in some error-related code; resolve TODOs.
2022-11-28 17:29:23 -05:00
Nick Mathewson
936920b26e
bump rust-version to 1.60 in every crate.
2022-11-10 10:57:33 -05:00
Ian Jackson
8fbff3a27f
Use ErrorKind::TorAccessFailed for misbehaving bridges
...
(Use semantic linefeed for the doc comment.)
2022-11-08 18:52:57 +00:00
Nick Mathewson
932fe48eaf
Run add_warnings.
2022-11-03 11:06:02 -04:00
Ian Jackson
48f48841e1
Require derive_more 0.99.3
...
0.99.[012] have a bug https://github.com/JelteF/derive_more/issues/114
which makes the Deref derive for bridgedesc::StateGuard not work
and therefore breaks minimal-versions CI.
It seems simpler to require the newer version everywhere.
2022-11-03 11:37:23 +00:00
Ian Jackson
f2a08a15cd
tor-error: Tidy up use of thiserror::Error
...
1. Import it, as we do elsewhere, and use that import.
2. Use thiserror to generate the Display impl, rather than
derive_more, as we do for errors elsewhere.
(tor_error still needs derive_more::Display for ErrorKind.)
2022-10-24 19:38:46 +01:00
Ian Jackson
d7783dd956
tor-error: Rename truncated module to misc
...
This has no external API change, but makes space for other
miscellaneous errors to arrive later.
2022-10-24 19:38:46 +01:00
Ian Jackson
77ddddb1f8
tor-error: make HasRetryTime object-safe
...
We could in the future provide a version of abs_retry_time which took
an &dyn closure if that turns out to be wanted.
I think this isn't a semver break because trait implementors are
allowed to relax bounds.
2022-10-21 16:08:48 +01:00
Ian Jackson
f84d8777db
cargo fmt to remove blank lines
...
Apparently cargo fmt doesn't like these, which my perl rune didn't
delete.
This commit is precisely the result of `cargo fmt`.
2022-10-12 15:29:04 +01:00
Ian Jackson
d9910dba08
Replace all README copies in src/lib.rs with includes
...
The feature we want is `#[doc = include_str!("README.md")]`, which is
stable since 1.54 and our MSRV is now 1.56.
This commit is precisely the result of the following Perl rune:
perl -i~ -0777 -pe 's{(^//!(?!.*\@\@).*\n)+}{#![doc = include_str!("../README.md")]\n}m' crates/*/src/lib.rs
2022-10-12 15:29:03 +01:00
Ian Jackson
82ad9eea5f
Allow "clippy::single_char_pattern" in tests.
...
This lint exists for perf reasons, and this is rarely relevant in
tests.
Using double quoted str is generally cognitively less burdensome.
2022-10-12 13:50:29 +01:00
Ian Jackson
9705ef3fea
Merge branch 'bridge-parse' into 'main'
...
Parse (and format) bridge lines
See merge request tpo/core/arti!745
2022-10-03 20:13:02 +00:00
Nick Mathewson
05868fea7f
Merge branch 'socks_client' into 'main'
...
Implement a SOCKS client handshake
See merge request tpo/core/arti!746
2022-10-03 17:23:24 +00:00
Nick Mathewson
f5389b53e9
Bump crates that have had no API changes.
2022-10-03 09:47:09 -04:00
Ian Jackson
98f92d870e
tor-error::internal: Remove a redundant suppression
...
Spotted this in passing.
2022-09-30 17:08:14 +01:00
Nick Mathewson
4b992cbd89
New ErrorKind::LocalProtocolFailed.
...
This type is by analogy to `RemoteProtocolFailed`; we'll use it for
cases when the Socks proxy refuses to talk to us.
2022-09-27 12:30:20 -04:00
trinity-1686a
cb9f085f77
force no inlining on internal_macro_test
...
it may fix this test when running in release, where the function gets inlined, so its name does not appear in the backtrace
2022-09-09 17:29:59 +02:00
Nick Mathewson
a7d9d2ceb1
Add a dbg!() to diagnose #570 .
...
This won't fix anything, but it will let us see what the backtrace
looks like when it fails.
2022-09-08 09:58:05 -04:00