Nick Mathewson
03f9f9987a
Run add_warning to remove `missing_panics_doc` deny.
...
Closes #950 .
2023-07-06 14:32:23 -04:00
Nick Mathewson
40768a9f61
Bump versions on crates with nonfunctional changes
...
These crates have had nonfunctional changes only, mostly due to !1271 ,
or ac90cb7500
, or documentation changes: crates that depend on
them do not require a version bump.
```
arti-bench
arti-config
arti-hyper
arti-testing
caret
fs-mistrust
retry-error
tor-async-utils
tor-basic-utils
tor-chanmgr
tor-checkable
tor-congestion
tor-consdiff
tor-events
tor-guardmgr
tor-persist
tor-protover
tor-ptmgr
tor-rtcompat
tor-rtmock
tor-units
```
2023-06-30 08:30:55 -04:00
Ian Jackson
161b9844da
lints: Run maint/add_warning to actually apply new lints
2023-06-21 12:15:41 +01:00
Nick Mathewson
daf5ecc153
Bump crate versions in preparation for v1.1.5 release.
...
Generated with the following commands:
```
cargo set-version --bump minor -p tor-cell
cargo set-version --bump minor -p tor-linkspec
cargo set-version --bump minor -p tor-proto
cargo set-version --bump minor -p tor-netdoc
cargo set-version --bump minor -p tor-circmgr
cargo set-version --bump patch -p tor-cert
cargo set-version --bump patch -p tor-basic-utils
cargo set-version --bump patch -p tor-rpcbase
cargo set-version --bump patch -p tor-llcrypto
cargo set-version --bump patch -p tor-hscrypto
cargo set-version --bump patch -p tor-checkable
cargo set-version --bump patch -p tor-async-utils
cargo set-version --bump patch -p caret
cargo set-version --bump patch -p fs-mistrust
cargo set-version --bump patch -p safelog
cargo set-version --bump patch -p retry-error
cargo set-version --bump patch -p tor-error
cargo set-version --bump patch -p tor-config
cargo set-version --bump patch -p tor-events
cargo set-version --bump patch -p tor-units
cargo set-version --bump patch -p tor-rtcompat
cargo set-version --bump patch -p tor-rtmock
cargo set-version --bump patch -p tor-protover
cargo set-version --bump patch -p tor-bytes
cargo set-version --bump patch -p tor-socksproto
cargo set-version --bump patch -p tor-consdiff
cargo set-version --bump patch -p tor-netdir
cargo set-version --bump patch -p tor-congestion
cargo set-version --bump patch -p tor-persist
cargo set-version --bump patch -p tor-chanmgr
cargo set-version --bump patch -p tor-ptmgr
cargo set-version --bump patch -p tor-guardmgr
cargo set-version --bump patch -p tor-dirclient
cargo set-version --bump patch -p tor-dirmgr
cargo set-version --bump patch -p tor-hsclient
cargo set-version --bump patch -p tor-hsservice
cargo set-version --bump patch -p arti-client
cargo set-version --bump patch -p arti-rpcserver
cargo set-version --bump patch -p arti-config
cargo set-version --bump patch -p arti-hyper
cargo set-version --bump patch -p arti
cargo set-version --bump patch -p arti-bench
cargo set-version --bump patch -p arti-testing
```
2023-06-01 10:03:05 -04:00
Nick Mathewson
7a5373c110
Run fixup-features --no-annotate for initial Cargo.toml fixes.
...
This does the following:
- Gives every crate a `full`.
- Cause every `full` to depend on `full` from the lower-level
crates.
- Makes every feature listed _directly_ in `experimental` depend
on `__is_experimental`.
2023-05-15 09:07:21 -04:00
Gabriela Moldovan
c4def3cfca
tor-basic-utils: Add unbounded range (..) test.
...
Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-05-13 12:49:10 +01:00
Gabriela Moldovan
ef53c4235d
tor-basic-utils: Update combinatorial test to randomly choose an open or closed bound.
...
Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-05-13 12:49:06 +01:00
Gabriela Moldovan
27ae57e543
tor-basic-utils: Add rangebounds test with time ranges.
...
Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-05-13 12:49:03 +01:00
Gabriela Moldovan
9d4db38d4d
tor-basic-utils: Assert witness is not part of the intersection.
...
Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-05-13 12:48:59 +01:00
Gabriela Moldovan
18c78c3ad3
tor-basic-utils: Log the ranges/intersection on assertion failure.
...
Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-05-13 12:48:56 +01:00
Gabriela Moldovan
094287e677
tor-checkable: Implement RangeBounds for TimerangeBound.
...
By implementing `RangeBounds` for `TimerangeBound`, we get
`RangeBoundsExt` for free. This will enable `parse_decrypt_validate` to
easily compute the intersection of the `TimerangeBound`s its layers.
Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-05-13 12:48:49 +01:00
Gabriela Moldovan
11c39b5657
tor-basic-utils: Add a helper function to deduplicate test code.
...
Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-05-13 12:48:44 +01:00
Gabriela Moldovan
872f5da4b2
tor-basic-utils: Add RangeBoundsExt trait.
...
Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-05-13 12:48:41 +01:00
Gabriela Moldovan
6b9e37e07c
tor-netdir: Shuffle the list of HS dirs used for downloading descriptors.
...
We'll probably need the hsdir list to be shuffled deterministically for
testing purposes (this might be desirable, for example, when we write a
test for HS descriptor download retries).
Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-05-04 17:53:58 +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
104d64589d
Increment MSRV to 1.65 in every crate.
2023-04-11 15:31:12 -04:00
Ian Jackson
7f51394e6e
impl_debug_hex: Fix syntax error in usage template
...
Corrects the doc and fixes a rustdoc warning.
2023-04-11 19:31:10 +01:00
Ian Jackson
9de3c1e307
tor-basic-utils: Provide impl_debug_hex
2023-03-31 19:10:06 +01:00
Nick Mathewson
2ab5348ab2
Remove semver.md files.
2023-03-31 09:24:41 -04:00
Nick Mathewson
e208fb15ad
Bump crate versions that have breaking changes
...
These crates have had breaking changes. They are pre-1.0, so they get
a minor bump.
```
tor-basic-utils
tor-config
```
2023-03-31 08:28:06 -04:00
Nick Mathewson
a62affd66e
Move functionality from tor_basic_utils to tor_async_utils
...
This commit is mostly code movement; I'd recommend reviewing it
with git's `--color-moved` option.
2023-03-29 13:57:11 -04:00
Ian Jackson
c1ae509ce6
Introduce and use ends_with_ignore_ascii_case
...
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1056#note_2884428
2023-03-08 18:27:42 +00:00
Ian Jackson
440a0eb74f
tor-basic-utils: Provide str.strip_suffix_ignore_ascii_case
...
We're going to want this for cheaply stripping ".onion" from things.
2023-03-08 17:26:47 +00:00
Nick Mathewson
592d6bf8a3
Bump the patch version of each crate with _trivial_ changes.
...
These crates have not had changes to their behavior; as such it is
not necessary to bump their dependencies to require the new versions.
2023-02-01 10:10:36 -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
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
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
baf78361e8
test lint blocks: Do some semi-manually
...
This is the hunks from running the rune in maint/adhoc-add-lint-blocks
but which require some subsequent manual fixup: usually, deleting
now-superfluous outer allows, but in some cases manually putting back
lints that the adhoc script deleted.
2022-12-12 18:00:29 +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
Ian Jackson
c82cda85d6
tor-basic-utils: DropNotifyWatchSender: use DropNotifyEofSignallable
...
This will help avoid the programmer making the mistake I made here:
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/852#note_2854029
2022-11-23 17:50:05 +00:00
Ian Jackson
63a799a118
tor-basic-utils: DropNotifyWatchSender test: introduce I
...
We do want to test this with a non-Option type, but we are going to
have to wrap it up.
2022-11-23 17:50:01 +00:00
Ian Jackson
91536da10a
tor-basic-utils: Provide helper for serde flexible parsing
2022-11-21 14:58:24 +00:00
Nick Mathewson
936920b26e
bump rust-version to 1.60 in every crate.
2022-11-10 10:57:33 -05:00
Ian Jackson
f50da3efa1
define_accessor_trait: Allow specification of other items
2022-11-03 15:43:41 +00:00
Ian Jackson
64de9f74be
define_accessor_trait: Allow specification of supertraits
2022-11-03 15:43:41 +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
9796d615f8
tor-basic-utils: Provide an implementation of BinaryHeap::retain
...
This is currently nightly-only and is blocked on an unresolved API
question:
https://github.com/rust-lang/rust/issues/71503
2022-10-27 10:46:03 +01:00
Nick Mathewson
15ac14a5d9
n_key_set: clean up some wide lines
2022-10-24 08:08:56 -04:00
Nick Mathewson
ef1c0cd282
n_key_set: Re-insert by_foo_mut() accessors, but make them unsafe.
2022-10-24 08:04:02 -04:00
Nick Mathewson
d648446201
Fix some litter in a doc comment.
2022-10-24 07:59:42 -04:00
Nick Mathewson
24e62d3197
n_key_set: Add ability to modify entries in the map.
...
The keys can change: if they do, then the entry is removed from its
previous position and inserted at the new one, possibly displacing
others.
2022-10-24 07:58:45 -04: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
Nick Mathewson
5a5f96aa37
n_key_set: Fix bugs in API documentation.
...
For whatever reason, rustdoc didn't like these multiline strings
in `doc` attributes.
2022-10-04 16:05:40 -04:00
Nick Mathewson
f8382d4978
n_key_set: Wrap "where" clauses in square brackets too.
...
Otherwise, there is a parsing ambiguity. :(
2022-10-04 16:05:40 -04:00