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
Nick Mathewson
b3f989d689
Update patch-versions on crates without API changes.
...
Since our last round of releases, these crates have had either
trivial changes, or changes that did not affect their APIs.
Therefore we are bumping their versions, but not changing which
versions of them other crates depend on.
2022-09-01 08:45:02 -04:00
trinity-1686a
7f939fa480
enable doc_auto_cfg feature on every crate when documenting for docs.rs
2022-08-24 18:22:41 +02:00
Nick Mathewson
20435aea75
Bump crate and dependency versions.
...
These were done with the following commands:
```
cargo set-version -p tor-basic-utils --bump patch
cargo set-version -p fs-mistrust --bump minor
cargo set-version -p tor-error --bump patch
cargo set-version -p tor-config --bump patch
cargo set-version -p tor-units --bump patch
cargo set-version -p tor-rtcompat --bump minor
cargo set-version -p tor-llcrypto --bump patch
cargo set-version -p tor-bytes --bump minor
cargo set-version -p tor-socksproto --bump minor
cargo set-version -p tor-cert --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 patch
cargo set-version -p tor-netdir --bump minor
cargo set-version -p tor-persist --bump patch
cargo set-version -p tor-chanmgr --bump minor
cargo set-version -p tor-guardmgr --bump minor
cargo set-version -p tor-circmgr --bump patch
cargo set-version -p tor-dirclient --bump patch
cargo set-version -p tor-dirmgr --bump minor
cargo set-version -p arti-client --bump patch
cargo set-version -p arti --bump minor
cargo set-version -p arti-bench --bump minor
cargo set-version -p arti-testing --bump minor
```
2022-06-24 12:00:22 -04:00
Ian Jackson
589c6e52bb
Run maint/add_warning crates/*/src/{lib,main}.rs
...
Update all lint blocks
2022-06-23 19:15:42 +01:00
Ian Jackson
abea103bb0
tor-error: Fix a broken intra-doc link
...
I didn't spot this in review amongst the other messages from Nightly.
2022-06-10 13:45:30 +01:00
trinity-1686a
6c6998a65b
try to differentiate transient from nontransient error
2022-06-08 16:02:01 +01:00
Ian Jackson
fec706c2f3
lints: Make lint blocks consistent
...
The remaining consequences of running add_warning
2022-05-31 15:24:11 +01:00
Ian Jackson
4f42101554
lints: Add let_unit_value allow to all crates
...
From running add_warning, with manual picking of the right
hunks/lines.
2022-05-31 15:23:52 +01:00
Ian Jackson
ba0843da4a
lints: Add lint block delimiters to every crate
...
This was the result of:
maint/add_warning crates/*/src/{lib,main}.rs
and then manually curating the results.
2022-05-31 13:00:31 +01:00
Nick Mathewson
9d36925700
Move tor-error crate to the "rust-patterns" category.
...
There is no "tor" category; crates.io warned about this.
2022-05-27 14:02:17 -04:00
Nick Mathewson
b232365a75
Semantic version changes for Arti 0.4.0 release
...
I followed the following procedure to make these changes:
* I used maint/changed_crates to find out which crates had changed
since 0.3.0.
* I used grep and maint/list_crates to sort those crates in
topological (dependency) order.
* I looked through semver_status to find which crates were listed as
having semver-relevant changes (new APIs and breaking changes).
* I scanned through the git logs of the crates with no
semver-relevant changes listed to confirm that, indeed, they had
no changes. For those crates, I incremented their patch-level
version _without_ changing the version that other crates depend on.
* I scanned through the git logs of the crates with no
semver-relevant changes listed to confirm that, indeed, they had
no obvious breaking changes.
* I treated all crates that depend on `arti` and/or `arti-client` as
having breaking changes.
* I identified crates that depend on crates that have changed, even
if they have not changed themselves, and identified them as having
a non-breaking change.
* For all of the crates, I used `cargo set-version -p $CRATE --bump
$STATUS` (where `STATUS` is `patch` or `minor`) to update the
versions, and the depended-upon versions.
2022-05-27 09:01:20 -04:00
Ian Jackson
273879cb14
Placate rustfmt
...
I found the previous layout *much* better. Ah well.
2022-05-17 15:04:10 +01:00
Ian Jackson
298b2421f0
Do backtrace string matching test only on some platforms.
...
"Fixes" #455 by suppressing the test.
This is !509 redux.
2022-05-17 15:03:46 +01:00
eta
9d8ce43298
Revert "Merge branch 'backtrace' into 'main'"
...
This reverts merge request !509
2022-05-16 15:01:02 +00:00
Ian Jackson
777b2c123f
Do backtrace string matching test only on Linux
...
"Fixes" #455 by suppressing the test.
2022-05-16 15:00:43 +00:00
Nick Mathewson
4262e9d0ec
Merge branch 'use-fs-mistrust'
2022-05-09 15:27:25 -04:00
Nick Mathewson
8509ffff7a
Add new FsPermissions ErrorKind.
2022-05-09 14:40:29 -04:00
Nick Mathewson
7b93091f57
Bump the version of every* crate to 0.3.0
...
* Except for safelog and fs-mistrust, which are new.
2022-05-06 10:03:15 -04:00