aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-rtmock
Commit message (Collapse)AuthorAgeFilesLines
...
* Bump the minor version of every published crate except for `arti`.Nick Mathewson2025-08-281-9/+9
| | | | | | | | Per policy, we bump the minor version of every tor-*, arti-* crate on each release. We have updated our MSRV, so we're treating this as a breaking change for our non-(arti/tor)-prefixed crates too.
* tor-rtmock: MockTimeCore: fix docsIan Jackson2025-08-121-2/+2
|
* tor-rtmock: Slightly clean up CrateGetters macroIan Jackson2025-08-121-4/+5
| | | | | | | I want to use this as an example in a talk. Add a blank line that makes it more readable, and generate only one impl block with many methods.
* Switch Cargo.toml files to edition 2024.Nick Mathewson2025-08-078-22/+18
| | | | | | | | | | | | | | First, run ``` git grep -l "^edition =" | xargs perl -i -pe 's/^edition *=.*/edition = "2024"/;' ``` Second, manually verify that all Cargo.toml files have changed, and nothing else has changed. Third, run cargo fmt again.
* Update code for Edition 2024Nick Mathewson2025-08-071-13/+21
| | | | | | | | | | | | | | | | | | 1. Run cargo fix --edition 2. Selectively revert the "if let"->"match" changes. These changes are meant to protect us from the lifetime changes for "if let" bindings in Rust 2024. But we're not actually relying on the old lifetime rules anywhere, and the match syntax here is quite ugly. 3. Automatically revert `$pat:expr_2021` to `$pat:expr`. (We don't actually want to restrict the expression syntax that our macros accept). Done with `git grep -l expr_2021 | xargs perl -i -pe 's/expr_2021/expr/g;'` 4. Run cargo fmt.
* Set MSRV to 1.85.Nick Mathewson2025-08-051-1/+1
|
* Bump version of tor-basic-utilsIan Jackson2025-08-051-1/+1
| | | | This was accidentally omitted from my version bump script.
* Version bumps for 1.4.6Ian Jackson2025-08-051-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Made with the following shell script: export CARGO='nailing-cargo -Eu' # Non-functional changes only maint/bump_nodep hashx # Special $CARGO set-version -p arti 1.4.6 # Additional features, no breaking changes, depended on in tree $CARGO set-version -p safelog 0.4.8 # Unconditional bump to 0.33.0 xargs -I P <<END $CARGO set-version -p P 0.33.0 tor-error tor-general-addr tor-geoip tor-rtcompat tor-rtmock tor-async-utils tor-config tor-config-path tor-rpc-connect tor-log-ratelim tor-rpcbase tor-memquota tor-units tor-llcrypto tor-bytes tor-protover tor-checkable tor-cert tor-key-forge tor-hscrypto tor-socksproto tor-linkspec tor-cell tor-proto tor-netdoc tor-consdiff tor-netdir tor-relay-selection tor-persist tor-chanmgr tor-ptmgr tor-guardmgr tor-circmgr tor-dirclient tor-dirmgr tor-keymgr tor-hsclient tor-hsservice tor-hsrproxy tor-relay-crypto arti-client arti-relay arti-rpcserver arti-ureq arti-rpc-client-core END
* Bump derive-deftly to 1.2.0Ian Jackson2025-08-041-1/+1
| | | | No upstream changes that break our code.
* Bump all the unstable tor- and arti- crates to 0.32.0.Gabriela Moldovan2025-07-071-7/+7
| | | | | | | | | | Done using: ``` for crate in $(./maint/list_crates | rg '^(tor|arti-)'); do cargo set-version -p $crate 0.32.0 done ```
* Bump the versions of the non-{arti-,tor-} crates.Gabriela Moldovan2025-07-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The non-{arti-,tor-} crates are: ``` ./maint/list_crates | rg -v '^(tor|arti)' oneshot-fused-workaround slotmap-careful test-temp-dir fslock-guard hashx equix caret fs-mistrust safelog retry-error ``` We split them in the following categories: * crates with no changes (no version bumps): None ``` maint/changed_crates -v "arti-v$LAST_VERSION" 2>&1 >/dev/null | grep -i "no change" | grep -v '\(tor\|arti\)-' ``` * crates that only have non-functional changes (bump the patch version): - oneshot-fused-workaround - slotmap-careful - test-temp-dir - fslock-guard - hashx - equix - caret - safelog - retry-error * crates where APIs were broken (bump minor): - fs-mistrust (the implicit once_cell feature was removed) The bumps from this commit were created using this script: ``` PATCH=" oneshot-fused-workaround slotmap-careful test-temp-dir fslock-guard hashx equix caret safelog retry-error " for crate in $PATCH; do cargo set-version --bump patch -p $crate; done MINOR=" fs-mistrust " for crate in $MINOR; do cargo set-version --bump minor -p $crate; done ```
* tor-rtcompat, tor-rtmock: Allow unused functions.Gabriela Moldovan2025-07-071-0/+1
| | | | These only serve as a compile-time check.
* Temporarily suppress mismatched_lifetime_syntaxes.Gabriela Moldovan2025-07-071-0/+1
| | | | See #2060.
* Upgrade to derive-deftly 1.1.0.Gabriela Moldovan2025-07-071-1/+1
| | | | | | I had to also bump `toml` to `0.8.23`, because `toml 0.8.22` is incompatible with `serde_spanned 0.6.9` (which is automatically pulled in because of the d-d upgrade).
* tor-rtmock: Use subthread_spawn for spawn_blocking.Wesley Aptekar-Cassels2025-06-091-38/+6
| | | | Fixes: #2033
* release: Bump all tor-/arti- crates to 0.31.0.Alexander Hansen Færøy2025-06-051-7/+7
| | | | | | | | This was done using: for crate in $(./maint/list_crates | grep -P '^tor-|^arti-'); do cargo set-version -p $crate 0.31.0 done
* ./maint/cargo_sort: Run cargo-sort on the entire workspace.Gabriela Moldovan2025-05-271-1/+7
| | | | | | | | | | | | | | | | | | | The [latest version] of `cargo-sort` is more opinionated than the previous one, and is now causing the `rust-checks` job to fail on `main`. This commit applies the fixes needed to satisfy the new `cargo-sort` rules. These changes were generated by running `cargo sort --workspace` several times, until `cargo sort --check --workspace` finally succeeded (it couldn't fix all the errors in one go, for some reason). I have omitted the changes `cargo-sort` made to the top-level `Cargo.toml`, to preserve the topological ordering of the workspace members. Closes #2014 [latest version]: https://github.com/DevinR528/cargo-sort/blob/f066ae80e5e6f5c1d8f0e2b8099461dcb97d9656/changelog.md#200
* *: use std::io::Error::other in many placesNick Mathewson2025-05-152-11/+4
| | | | | | | The `IoError::other` function is an easier way to say `IoError::new(IoErrorKind::Other, ...)`. It's been around since 1.74, but clippy started warning about the more verbose version in 1.87.
* rtmock: use Option::replace instead of mem::replaceNick Mathewson2025-05-151-8/+6
| | | | | Option::replace has been around since 1.31, but the clippy warning is new.
* All crates: bump rust-version to 1.83.Nick Mathewson2025-05-131-1/+1
|
* release: Bump all unstable tor/arti crates to 0.30.0Wesley Aptekar-Cassels2025-05-012-10/+7
| | | | | | | | ``` for crate in $(./maint/list_crates | rg '^(tor|arti-)'); do cargo set-version -p $crate 0.30.0 done ```
* Update rand requirement to 0.9.1Nick Mathewson2025-04-291-1/+1
| | | | | (This is going to be a _requirement_, since rand 0.9.1 has a behavioral change from 0.9.0)
* Run cargo update.Wesley Aptekar-Cassels2025-04-291-1/+1
| | | | | I updated everything except rand, because the new version of rand interacts with #1903, thus requiring more care.
* tor-rtcompat: task tests: Allow a clippy lintIan Jackson2025-04-101-0/+1
| | | | | This doesn't seem to happen with my local compiler. Anyway, suppress it. I don't think we want to split up this function.
* tor-rtcompat: task: Break out subthread_yieldIan Jackson2025-04-101-30/+36
| | | | | This gets rid of a clippy complaint about subthread_block_on_future being too complicated.
* tor-rtcompat: task tests: Allow a clippy lintIan Jackson2025-04-101-0/+1
|
* tor-rtcompat: BlockOn: relax bounds on reenter_block_onIan Jackson2025-04-092-2/+2
| | | | The future no longer needs to be `Send + 'static`.
* tor-rtmock: task: subthread_block_on_future; Yield a bit moreIan Jackson2025-04-091-2/+18
|
* tor-rtmock: task tests: New subhtread_pingpong testIan Jackson2025-04-091-1/+43
| | | | | | | | This test demonstrates that the intended use pattern compiles and works. It couldn't exist until now because we couldn't conveniently make a `Send + 'static` future out of `rx.next()`.
* tor-rtmock: task: Redo subthread_block_on_future; poll on the subthread (fmt)Ian Jackson2025-04-091-14/+3
|
* tor-rtmock: task: Redo subthread_block_on_future; poll on the subthreadIan Jackson2025-04-092-68/+65
| | | | | | | | | | | | | | | | | | Previously we put the future into the data structure, had the exeuctor poll it there, and only woke up the subthread when the future was ready. Now, instead, we put a new TaskFutureInfo variant into the data structure, and the executor context switches to the subthread every time. Then we poll the future on the subthread. Moving the future into the data structure meant we had to do use a proxy future to store the return value. Now that's not needed any more. Now the future doesn't need to be Send + 'static. Fixes #1933.
* tor-rtmock: task: Minor refactoringIan Jackson2025-04-091-4/+6
| | | | | | Eliminate the data_ variable and instead use a block scope. This seems a bit nicer, and will align slightly better with forthcoming changes.
* tor-rtmock: task: import Left and RightIan Jackson2025-04-091-3/+3
|
* tor-rtmock: task: impl Debug for TaskFutureInfoIan Jackson2025-04-091-1/+3
|
* tor-rtmock: task: Break out Waker::make_wakerIan Jackson2025-04-091-5/+10
| | | | We're going to introduce a new call site for this.
* tor-rtmock: Improve a commentIan Jackson2025-04-091-1/+6
| | | | Be clearer that `fut` is only `None` during the main loop.
* tor-rtmock: Fix a commentIan Jackson2025-04-091-1/+1
| | | | | | SubthreadFuture was a type in some early version of this branch, that it's not in-tree now. subthread_spawn returns impl Future and the concrete type is a channel receiver.
* Remove semver.md files post-release.Gabriela Moldovan2025-04-011-10/+0
|
* Bump all the unstable tor- and arti- crates to 0.29.0.Gabriela Moldovan2025-03-311-7/+7
| | | | | | | | | | Done using: ``` for crate in $(./maint/list_crates | rg '^(tor|arti-)'); do cargo set-version -p $crate 0.29.0 done ```
* Upgrade strum dependency to 0.27.1.Gabriela Moldovan2025-03-271-1/+1
| | | | | | | | | In 0.27.0, strum's MSRV was bumped to 1.66.1, but that's okay because ours is 1.77. We aren't affected by any of its [breaking changes]. [breaking changes]: https://github.com/Peternator7/strum/blob/master/CHANGELOG.md#0270
* AF_UNIX terminology: Rename two error structsIan Jackson2025-03-241-2/+2
| | | | | | We change `NoUnixAddressSupport` to `NoAfUnixSocketSupport` because it doesn't make much sense to talk about support for the addresses separately from support for the sockets.
* Upgrade rand dependency to 0.9.Nick Mathewson2025-03-181-1/+1
| | | | | | (Per discussion at #1774, we think the changes are acceptable.) This commit won't compile on its own; subsequent commits will fix it.
* tor-rtmock: Add since= to deprecateds (formatting)Ian Jackson2025-03-061-1/+2
|
* tor-rtmock: Add since= to deprecatedsIan Jackson2025-03-062-2/+2
| | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2843#note_3169975
* tor-rtmock: Fiddle with a comment formatIan Jackson2025-03-061-2/+3
| | | | For some reason rustfmt wants to mess with this. Forestall it.
* tor-rtmock: Actually apply deprecated attr to deprecated time.rsIan Jackson2025-03-065-5/+36
|
* tor-rtcompat: Rename spawn_thread to spawn_blockingIan Jackson2025-03-042-9/+9
| | | | Let's use Tokio terminology here.
* tor-rtcompat: Remove the TODO re #1835Ian Jackson2025-03-041-3/+0
| | | | This is the TODO we are fixing with this MR.
* tor-rtcompat: Explain Sendness of reenter_block_on futureIan Jackson2025-03-041-0/+1
| | | | | | | Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2810#note_3167975 Also allow ourselves the option of changing this in the future.
* tor-rtmocK; Detect wrong-context blocking_io and spawn_threadIan Jackson2025-03-042-0/+20
|