| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
| |
I realised a way this could happen without there being a bug.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allow a `Config` to represent "this is supposed to be disabled".
This involves wrapping the actual built configuration in an IfEnabled.
We treat max = usize::MAX, or max being unspecified, as "disable".
We can now reporting an error during config building if max is set but
we're compiling the feature out. Conversely, we can now make
`MemoryQuotaTracker::new()` unconditional, since enabled
confiogurations are uninhabited when the feature is compiled out.
We change how we derive the setters, deriving them from the Builder.
I chose to abolish the use of derive_builder. See the new comment on
ConfigBuilder.
|
| | |
|
| |
|
|
|
| |
We're about to change the config behaviour; adding these tests first
allows us to demonstrate the changes.
|
| |
|
|
|
|
|
|
|
|
| |
Done using:
```
for crate in $(./maint/list_crates | rg '^(tor|arti-)'); do
cargo set-version -p $crate 0.22.0
done
```
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Code motion of byte_qty.rs, and minimal necessary supporting changes.
|
| |
|
|
|
|
|
| |
We're going to make this into a proper public type.
It's going to move into a different crate, where there's no prelude,
so give it a bespoke set of imports too.
|
| |
|
|
|
|
|
| |
Code motion, part 1.
Also explain in comments at the top of the new module why we are doing
this at all rather than using an existing thing.
|
| |
|
|
|
|
| |
This makes more sense than having them alphabetical.
Noticed while I was working on moving other code.
|
| |\
| |
| |
| |
| | |
Add and use `PeekableStream` and `UnobtrusivePeekableStream`
See merge request tpo/core/arti!2345
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| | |
Reported at
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2351#note_3062292
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| | |
This will hopefully allow much caller code to be compiled out.
The users (IsParticipant impls) don't generally need to bother with
it - they can just ignore it.
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| | |
Now if we run doctests without the feature enabled, we test that a
no-op MemoryQuotaTracker works.
Those tests aren't currently run in CI, but they will be after !2350.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Wrap up most of the structures in IfEnabled.
Sadly this diff is very noisy. I experimented with macros for the
little enabled check at the start of each function but they didn't
really help.
We don't test this yet. We'll do a smoke test of this later.
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| | |
We're going to bind self_ to something more complicated, in each of
these functions, and that's what all these field references etc. will
need to refer to.
Do this mechanical change first for clarity.
|
| | |
| |
| |
| | |
EnabledToken is pub because it's going to appear in public APIs.
|
| | | |
|
| |/
|
|
| |
This will make some later diffs easier to read.
|
| |
|
|
| |
We use `debug!` (tracing logging) everywhere else. Use it here too.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
Each queue has two `Participation`s, not just one.
This didn't matter in the `lifecycle` test, because one of the two
Participations was never touched since it was cloned, and a fresh
clone starts out with a cache of zero.
But we're about to reuse this code in a context where both
Participations end up with a cache.
|
| | |
|
| |
|
|
|
| |
Discussed here
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2292#note_3059928
|
| |
|
|
| |
It's not a unit. It's `MpscUnboundedSpec` that's a unit
|
| |
|
|
|
|
|
| |
And MpscUnboundedSpec too.
As discussed in
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2292#note_3059516
|
| |
|
|
|
| |
Prompted by
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2292#note_3059543
|
| |
|
|
|
| |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2292#note_3059520
|
| |
|
|
|
| |
Fixes the livelock possibility discussed here
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2292#note_3059519
|
| |
|
|
|
|
|
|
| |
This will let us call mpsc::Receiver::close.
We have it take Pin, even though we don't really want that for our use
case, because if you use StreamUnobtrusivePeeker with a non-Unpin
stream you'll ant that.
|
| |
|
|
|
| |
Prompted by
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2292#note_3059518
|
| |
|
|
|
| |
Requested by
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2292#note_3059517
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
We'll use this in a moment.
|
| |
|
|
|
| |
We're going to want the one for Participation - it saves us an
annoying Option. Let's provide the one for WeakAccount too.
|