Ian Jackson
27bdc97141
Merge branch 'clippy' into 'main'
...
clippy: Suppress needless_pass_by_value in tests
See merge request tpo/core/arti!1535
2023-08-23 13:24:18 +00:00
Ian Jackson
42df88d6bf
Run maint/add_warning to add lint block everywhere
2023-08-23 10:34:00 +01:00
Ian Jackson
919c955f0f
tor-rtmock: Relax Sync bound on spawned tasks in MockExecutor
...
Sync is actually otiose - and I'm about to have some test cases with
futures that aren't Sync.
2023-08-23 09:59:37 +01:00
Ian Jackson
6918a7869e
tor-rtmock: Expose time_until_next_timeout on MockRuntime
2023-08-23 09:59:37 +01:00
Nick Mathewson
cec6d0ce33
Run add_warnings on all files.
2023-08-04 07:45:04 -04:00
Nick Mathewson
1e96d1b95a
Remove semver.md files now that 1.1.7 is out.
2023-08-01 12:55:52 -04:00
Nick Mathewson
3acdf102c7
Increment patchlevel versions of crates with minor changes
...
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
```
2023-08-01 10:57:55 -04:00
Nick Mathewson
6f2ae59603
Update minor versions on crates that have had breaking changes
...
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.
2023-08-01 10:51:25 -04:00
Ian Jackson
3e2a909707
Run cargo +nightly fmt to format many let ... else ...
...
rustfmt has grown opinions about how let ... else ... ought to be
formatted. They don't always agree with our previous manual
decisions.
I think our policy is to always insist on rustfmt. When that version
of rustfmt hits stable, our CI will start to fail for everyone.
(Right now this discrepancy just causes trouble for contributors who
are using nightly by default.)
2023-07-24 13:46:05 +01:00
Nick Mathewson
a783a4f932
Upgrade to latest derive-adhoc.
2023-07-17 10:24:38 -04:00
Ian Jackson
473447a82e
Run maint/add_warning to actually apply new lint allows
2023-07-10 13:49:51 +01:00
Nick Mathewson
0b6cc7ba5e
Add exceptions for some cases of diverging_sub_expression
...
See here for documentation on the lint:
https://rust-lang.github.io/rust-clippy/master/index.html#/diverging_sub_expression
The issue here, from what I can tell, is that the lint triggers
whenever you use a diverging expression as a function body within an
2023-07-10 12:33:21 +01:00
gabi-250
2db3e73434
Merge branch 'da-task' into 'main'
...
RFC: tor-rtmock: Use derive-adhoc for composite runtimes
See merge request tpo/core/arti!1381
2023-07-10 10:53:23 +00:00
Ian Jackson
6e495d8400
tor-rtmock: Use derive-adhoc for composite runtimes
2023-07-07 10:26:44 +01:00
Nick Mathewson
03f9f9987a
Run add_warning to remove `missing_panics_doc` deny.
...
Closes #950 .
2023-07-06 14:32:23 -04:00
Ian Jackson
de97288c53
tor-rtmock: statically assert that the macro makes a Runtime impl
2023-07-06 15:58:42 +01:00
Ian Jackson
f0168b5220
tor-rtmock: Use the same specified field for BlockOn and Spawn
...
These are always the same and probably always will be.
2023-07-06 15:58:42 +01:00
Ian Jackson
0b8b965cf7
tor-rtmock: Add semver.md
2023-07-06 15:14:41 +01:00
Ian Jackson
6ed8e0b669
tor-rtmock: task: Fix a typo
...
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1375#note_2919976
2023-07-06 15:14:41 +01:00
Ian Jackson
7e7428611e
tor-rtmock: task: clarify progress_until_stalled a little
2023-07-06 15:14:41 +01:00
Ian Jackson
6aff623c08
tor-rtmock: Runtime: Expand on "allowed" documentation
2023-07-06 15:14:41 +01:00
Ian Jackson
02293bd42d
tor-rtmock: task: Remove a () assignment
...
Discussion:
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1375#note_2919928
2023-07-06 15:14:41 +01:00
Ian Jackson
89994142d3
tor-rtmock: task: Abolish TaskFutureInfo alias (fmt)
2023-07-06 15:14:41 +01:00
Ian Jackson
78071c30ef
tor-rtmock: task: Abolish TaskFutureInfo alias
...
Requested by:
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1375#note_2919926
2023-07-06 15:14:41 +01:00
Ian Jackson
55329fe85b
tor-rtmock: Net: Make UDP sockets un-constructable
...
This will hopefully mean anyone trying to use this will notice that
it's not implemented.
Prompted by:
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1375#note_2919925
2023-07-06 15:14:41 +01:00
Ian Jackson
5a05960958
tor-rtmock: Add a cross-reference from MockSleepRuntime::wait_for
2023-07-06 15:14:41 +01:00
Ian Jackson
dc28b320f4
tor-rtmock: MockRuntime: provide test_with_various
...
In both fallible and infallible variants, for convenience.
2023-07-06 15:14:40 +01:00
Ian Jackson
e23b1e00b5
tor-rtmock: MockExecutor: Configurable scheduling policy
2023-07-06 15:14:40 +01:00
Ian Jackson
be632ba0f9
tor-rtmock: Provide MockRuntime
2023-07-06 15:14:40 +01:00
Ian Jackson
67941488ab
tor-rtmock: Unit tests for MockExecutor
2023-07-06 15:14:40 +01:00
Ian Jackson
d82ed8d793
tor-rtmock: Provide MockExecutor
2023-07-06 15:14:40 +01:00
Ian Jackson
70fdd92030
tor-rtmock: impl Default for MockNetProvider
2023-07-06 15:14:40 +01:00
Ian Jackson
24da490ef5
tor-rtmock: impl Default for MockNetProvider (prep)
...
We want MockNetProvider to be Default.
In this commit: impl Default for MockNetwork and use it in new().
2023-07-06 15:14:40 +01:00
Ian Jackson
29cc83b35e
tor-rtmock: impl Default for MockSleepProvider
...
Pick an arbitrary start time roughly now. This will do for many
tests.
2023-07-06 15:14:40 +01:00
Ian Jackson
395a616c9f
tor-rtmock: net: "Provide" a UDP "implementation" which doesn't work
...
Nothing in our tree actually *uses* the UDP in tests.
We want a mock UDP provider that isn't part of a real runtime, so that
we can make a totally-mock runtime for properly controlled testing.
It seems best to make this part of MockNetProvider rather than a
separate type.
2023-07-06 15:14:40 +01:00
Ian Jackson
070a934451
tor-rtmock: Introduce impl_runtime_prelude (fmt)
2023-07-06 15:14:40 +01:00
Ian Jackson
492699d522
tor-rtmock: Introduce impl_runtime_prelude
...
This deduplicates some imports, which would otherwise be about to
become triplicated.
2023-07-06 15:14:40 +01:00
Ian Jackson
97e817b330
tor-rtmock: Introduce impl_runtime! macro
...
This deduplicates some trait delegation.
We want this now because we're about to introduce a third mock
runtime, so this would become triplication otherwise.
2023-07-06 15:14:40 +01: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
ac90cb7500
Upgrade async-trait requirement to 1.54
...
We need the fix from [82d69902], which first appeared in async-trait
version 1.54. (Technically we only need this fix in tor-hsclient,
but we may as well update our minimal async-trait version everywhere.)
[82d69902]: 82d6990253
2023-06-12 13:15:59 -04: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
Nick Mathewson
e845a553f3
Upgrade tracing to 0.1.36.
...
This is the first version to impl Value for String.
With luck, this will get minimal_versions CI passing.
2023-05-03 11:09:21 -04: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
Nick Mathewson
9ef115a7fb
Patchlevel bumps for crates whose dependencies just changed.
...
These crates had no changes until just a moment ago. But since
we updated the versions on some of their dependents, they have now
changed themselves. Thus they get patchlevel bumps.
```
tor-rtmock
tor-protover
tor-socksproto
tor-consdiff
tor-chanmgr
tor-dirclient
tor-hsservice
```
2023-03-31 08:30:14 -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
66f594a4b6
Bump the patch-level version of crates with _minor_ changes.
...
These changes influence behavior, but not effect compatibility.
(If I messed up, and any crate except for `arti` has non-breaking
API changes, that's still fine, since they are all version
0.x.)
2023-02-01 10:23:58 -05: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