summaryrefslogtreecommitdiff
path: root/crates/tor-rtmock
Commit message (Collapse)AuthorAgeFilesLines
* Bump all the unstable tor- and arti- crates to 0.22.0.Gabriela Moldovan2024-09-031-5/+5
| | | | | | | | | | Done using: ``` for crate in $(./maint/list_crates | rg '^(tor|arti-)'); do cargo set-version -p $crate 0.22.0 done ```
* oneshot-fused-workaround: Set the initial version to 0.1.0.Gabriela Moldovan2024-09-031-1/+1
| | | | This is the first time we're publishing this, so let's start at 0.1.0.
* Run fixup-features in preparation for release.Gabriela Moldovan2024-09-031-1/+1
|
* tor-rtmock: remove dependency on tor-async-utilsJim Newsome2024-08-281-2/+1
| | | | | Now that `oneshot-fused-workaround` is its own crate, `tor-rtmock` doesn't need `tor-async-utils`.
* extract tor_async_utils::oneshot into ::oneshot-fused-workaroundJim Newsome2024-08-284-3/+5
| | | | | | | | | | | | | | Having this in the `tor-async-utils` crate prevents us from doing both of the following without introducing a circular dependency: * using it in `tor-rtmock` (which we currently do, particularly in tests). * using `tor-rtmock` to test things in `tor-async-utils`. We don't do this yet, but it is generally sensible to do so. In particular we want to move the `stream_peak` module there, which is currently tested with `tor-rtmock`. Moving this into its own crate avoids this circular dependency.
* Merge branch '1144-std-backtrace' into 'main'David Goulet2024-08-122-35/+9
|\ | | | | | | | | | | | | Use std::backtrace instead of backtrace crate Closes #1144 See merge request tpo/core/arti!2301
| * Match previous backtrace formattingRobin Leander Schröder2024-08-081-1/+1
| | | | | | | | | | std::backtrace::Backtrace's Display looks the same as backtrace_rs::Backtrace's Debug
| * Use std::backtrace instead of backtrace crateRobin Leander Schröder2024-08-012-34/+8
| | | | | | | | | | Removes resolve_backtraces from rtmock since it is no longer needed as stdlib's backtraces automatically lazily resolve without needing a &mut.
* | Don't need to tell docs.rs to enable `docsrs` cfgKunal Mehta2024-08-021-1/+0
| | | | | | | | | | It now does it automatically, see <https://docs.rs/about/builds#detecting-docsrs>.
* | Bump versions for tor- and arti- crates to 0.21.0Nick Mathewson2024-08-011-6/+6
|/ | | | | | | | | | This is the result of: ``` for crate in $( ./maint/list_crates |grep '^\(tor\|arti-\)' ); do cargo set-version -p $crate 0.21.0 done ```
* tor-rtmock docs: Add some more discussion of the simulated timeIan Jackson2024-07-301-1/+17
|
* tor-rtmock docs: We have CoarseTimeProvider nowIan Jackson2024-07-301-2/+3
| | | | Improve/replace some out-of-date notes in the docs.
* Update to derive-deftly 0.14Ian Jackson2024-07-081-1/+1
| | | | | This removes the deprecated syntaxes. Updating now will prevent us re-introducing the old syntaxes, which we updated in arti!2209.
* Update versions of 0.x tor-* and arti-* cratesIan Jackson2024-06-271-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | nailing-cargo -uE set-version -p arti-client 0.20.0 nailing-cargo -uE set-version -p arti-relay 0.20.0 nailing-cargo -uE set-version -p arti-rpcserver 0.20.0 nailing-cargo -uE set-version -p tor-async-utils 0.20.0 nailing-cargo -uE set-version -p tor-basic-utils 0.20.0 nailing-cargo -uE set-version -p tor-bytes 0.20.0 nailing-cargo -uE set-version -p tor-cell 0.20.0 nailing-cargo -uE set-version -p tor-cert 0.20.0 nailing-cargo -uE set-version -p tor-chanmgr 0.20.0 nailing-cargo -uE set-version -p tor-checkable 0.20.0 nailing-cargo -uE set-version -p tor-circmgr 0.20.0 nailing-cargo -uE set-version -p tor-config 0.20.0 nailing-cargo -uE set-version -p tor-consdiff 0.20.0 nailing-cargo -uE set-version -p tor-dirclient 0.20.0 nailing-cargo -uE set-version -p tor-dirmgr 0.20.0 nailing-cargo -uE set-version -p tor-error 0.20.0 nailing-cargo -uE set-version -p tor-geoip 0.20.0 nailing-cargo -uE set-version -p tor-guardmgr 0.20.0 nailing-cargo -uE set-version -p tor-hsclient 0.20.0 nailing-cargo -uE set-version -p tor-hscrypto 0.20.0 nailing-cargo -uE set-version -p tor-hsrproxy 0.20.0 nailing-cargo -uE set-version -p tor-hsservice 0.20.0 nailing-cargo -uE set-version -p tor-keymgr 0.20.0 nailing-cargo -uE set-version -p tor-linkspec 0.20.0 nailing-cargo -uE set-version -p tor-llcrypto 0.20.0 nailing-cargo -uE set-version -p tor-log-ratelim 0.20.0 nailing-cargo -uE set-version -p tor-memquota 0.20.0 nailing-cargo -uE set-version -p tor-netdir 0.20.0 nailing-cargo -uE set-version -p tor-netdoc 0.20.0 nailing-cargo -uE set-version -p tor-persist 0.20.0 nailing-cargo -uE set-version -p tor-proto 0.20.0 nailing-cargo -uE set-version -p tor-protover 0.20.0 nailing-cargo -uE set-version -p tor-ptmgr 0.20.0 nailing-cargo -uE set-version -p tor-relay-selection 0.20.0 nailing-cargo -uE set-version -p tor-rpcbase 0.20.0 nailing-cargo -uE set-version -p tor-rtcompat 0.20.0 nailing-cargo -uE set-version -p tor-rtmock 0.20.0 nailing-cargo -uE set-version -p tor-socksproto 0.20.0 nailing-cargo -uE set-version -p tor-units 0.20.0 Each of which runs a rune like cargo set-version --offline -p tor-units 0.20.0
* Update to itertools 0.13.0Ian Jackson2024-06-251-1/+1
| | | | | | | No code changes needed. Precisely nailing-cargo -Eu upgrade --incompatible -p itertools
* Require strum 0.26.3Ian Jackson2024-06-251-1/+1
| | | | | | | | | | | | We're about to update to iterools 0.13.0. We must therefore have a version of strum which is not affected by https://github.com/Peternator7/strum/issues/358 Precisely git-grep -l '^strum' | xargs perl -i~ -pe 's{"0\.26"}{"0.26.3"}' No changes to lockfile - we're already using 0.26.3, except perhaps in the minimal versions test.
* Update to derive-deftly 0.13.0Ian Jackson2024-06-251-1/+1
| | | | | | | No code changes needed. Precisely nailing-cargo -Eu upgrade --incompatible -p derive-deftly
* tls: Support export keying material (RFC 5705)David Goulet2024-06-182-0/+15
| | | | | | | | | | | | | Add a function to get the keying material as detailed by RFC 5705. Because native-tls doesn't have such support, there is a place holder panic!() for now. This means that for the forseable future, relay would only work with rustls until we figure out a solution for native-tls. Closes #1432 Signed-off-by: David Goulet <[email protected]>
* Change deftly syntax to post 0.12.1 versionIan Jackson2024-06-172-2/+2
| | | | | | | | | | | * Change `pub` to `export` * Change the `=` in define to `:` * Change `pub_template_semver_check` to `template_export_semver_check` Right now, 0.12.1 supports both syntaxes. I have verified this branch also compiles with https://gitlab.torproject.org/Diziet/rust-derive-deftly/-/merge_requests/402 ee171ffaf56d7dcb7d75584054921153fe19b222
* Update to derive-deftly 0.12.1Ian Jackson2024-06-171-1/+1
| | | | | | * Bump in Cargo.toml * Deal with `${Xmeta as ...}` incompatible change, by always specifying an `as`, and changing `as tokens`.
* Bump all the unstable tor- and arti- crates to 0.19.Gabriela Moldovan2024-06-051-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The unstable crates are: - tor-error - tor-config - tor-units - tor-geoip - tor-rtcompat - tor-rtmock - tor-log-ratelim - tor-rpcbase - tor-memquota - tor-llcrypto - tor-protover - tor-bytes - tor-hscrypto - tor-socksproto - tor-checkable - tor-cert - 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 - arti-client - arti-rpcserver - arti-hyper - tor-basic-utils - tor-async-utils Done using ``` for p in "${unstable[@]}"; do cargo set-version -p $p 0.19; done ``` where `unstable` contains the list above
* Upgrade to latest priority-queue.Nick Mathewson2024-05-311-1/+1
|
* Re-run maint/add_warning.Nick Mathewson2024-05-061-2/+2
| | | | This commit is automatically generated.
* Bump versions of 0.x tor-* and arti-* cratesIan Jackson2024-04-301-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | for p in `cat ../u`; do cargo set-version --locked --offline -p $p; done where u contains tor-basic-utils tor-async-utils tor-error tor-config tor-units tor-geoip tor-rtcompat tor-rtmock tor-log-ratelim tor-rpcbase tor-memquota tor-llcrypto tor-protover tor-bytes tor-hscrypto tor-socksproto tor-checkable tor-cert 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 arti-client arti-rpcserver arti-hyper
* Suppress a spurious dead code lintIan Jackson2024-04-251-0/+1
|
* Upgrade derive-deftly requirement to 0.10.3Nick Mathewson2024-04-111-1/+1
| | | | We're taking this for the fix to derive-deftly#52.
* tor-rtmock: Remove a todo commentIan Jackson2024-04-031-5/+0
| | | | derive-deftly 0.10.x rejects unrecognised `#[deftly]` attributes.
* Switch to derive-deftlyIan Jackson2024-04-036-28/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the combination of a number of separate commits, many of which were generated by seddery, and then rebased and squashed. Cargo.toml perl -i~ -pe 's{^derive-adhoc}{derive-deftly = "0.10"}' crates/*/Cargo.toml (not regenerated during rebase) update Cargo.lock `cargo fetch` without --locked (regenerated during rebase) seddery git-ls-files | grep '\.rs$' | xargs perl -i~ -pe 's{^use derive_adhoc}{use derive_deftly}' git-ls-files | grep '\.rs$' | xargs perl -i~ -pe 's{\bdefine_derive_adhoc\b}{define_derive_deftly}g' git-ls-files | grep '\.rs$' | xargs perl -i~ -pe 's{\bAdhoc\b}{Deftly}g if m{derive}' git-ls-files | grep '\.rs$' | xargs perl -i~ -pe 's{\#\[derive_adhoc\b}{#[derive_deftly}g' git-ls-files | grep '\.rs$' | xargs perl -i~ -pe 's{use derive_adhoc}{use derive_deftly}' git-ls-files | grep '\.rs$' | xargs perl -i~ -pe 's{\bderive_adhoc\b}{derive_deftly_adhoc} if m{use.*deftly}' git-ls-files | grep '\.rs$' | xargs perl -i~ -pe 's{\bderive_adhoc!}{derive_deftly_adhoc!}' (not regenerated during rebase) Manually add `#[derive_deftly_adhoc]` where needed. seddery git-ls-files | grep '\.rs$' | xargs perl -i~ -pe 's{\#\[adhoc\b}{#[deftly}g' git-ls-files | grep '\.rs$' | xargs perl -i~ -pe 's{\bderive_adhoc_template}{derive_deftly_template}' (not regenerated during rebase) Manually fix up an import Manually update some builder attrs Manually fix up tor_rtmock::time_core This was missed in my seddery, due to me rebasing the branch and not redoing the seddery.
* Update unstable `tor/arti-*` crates to 0.17.0.Nick Mathewson2024-04-021-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Done with: ``` CRATES=" tor-basic-utils tor-async-utils tor-error tor-config tor-events tor-units tor-geoip tor-rtcompat tor-rtmock tor-log-ratelim tor-rpcbase tor-llcrypto tor-protover tor-bytes tor-hscrypto tor-hspow tor-socksproto tor-checkable tor-cert tor-linkspec tor-cell tor-proto tor-netdoc tor-consdiff tor-netdir tor-relay-selection tor-congestion tor-persist tor-chanmgr tor-ptmgr tor-guardmgr tor-circmgr tor-dirclient tor-dirmgr tor-keymgr tor-hsclient tor-hsservice tor-hsrproxy arti-client arti-rpcserver arti-config arti-hyper arti-bench arti-testing " for crate in $CRATES; do cargo set-version -p "$crate" 0.17.0 done ```
* tor-rtmock: Change word in commentIan Jackson2024-04-021-1/+1
| | | | | This was incorrect usage, as pointed out in https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2052#note_3012727
* tor-rtmock: Use MockTimeCore in time.rs too (fmt)Ian Jackson2024-03-251-6/+12
|
* tor-rtmock: Use MockTimeCore in time.rs tooIan Jackson2024-03-251-23/+18
|
* tor-rtmock: Introduce MockTimeCoreIan Jackson2024-03-252-25/+82
| | | | | | | | | | | | | It bothered me that when I added a `MockCoarseTimeProvider` to the mock time providers, I had to manually grep to check that there weren't places the time was updated where I ought to also update the coarse time. Prove that the code is right by hiding all the times together in a struct that prevents un-synchronised updates. This is part 1, where we move the fields from simple_time::State to the new struct.
* tor-rtmock: time_core: rename from coarse_time (fmt)Ian Jackson2024-03-251-1/+1
|
* tor-rtmock: time_core: rename from coarse_timeIan Jackson2024-03-254-3/+3
| | | | | | We're going to put more in here. (Yes, I know we just invented this...)
* tor-rtmock: Rename coarsetime module to coarse_timeIan Jackson2024-03-254-3/+3
| | | | | Modules with the same name as external crates don't work well with our MSRV.
* tor-rtcompat: Make Runtime imply CoarseTimeProvider, etc. (fmt)Ian Jackson2024-03-251-2/+2
|
* tor-rtcompat: Make Runtime imply CoarseTimeProvider, etc.Ian Jackson2024-03-251-0/+8
| | | | We must also impl CoarseTimeProvider for mocked runtimes.
* tor-rtmock: impl CoarseTimeProvider for mocked time providersIan Jackson2024-03-254-1/+70
|
* tor-rtmock: Implement from_real in terms of from_wallclockIan Jackson2024-03-251-1/+1
| | | | This reduces duplication a little.
* Run maint/add_warning.Nick Mathewson2024-03-136-0/+6
|
* deny clippy::unchecked_duration_subtractiontrinity-1686a2024-02-291-0/+1
|
* Bump minor versionsIan Jackson2024-02-051-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bump the minor version of these crates, and update the in-tree dependencies. Recently published as fresh crates, let's just assume there are breaking changes: fslock-guard test-temp-dir Breaking API change affecting many many downstream crates: tor-rtcompat Downstream crates which we're (conservatively) assuming have tor-rtcompat types in their APIs: tor-rtmock tor-log-ratelim tor-rpcbase tor-llcrypto tor-protover tor-bytes tor-hscrypto tor-hspow tor-socksproto tor-checkable tor-cert tor-linkspec tor-cell tor-proto tor-netdoc tor-consdiff tor-netdir tor-congestion tor-persist tor-chanmgr tor-ptmgr tor-guardmgr tor-circmgr tor-dirclient tor-dirmgr tor-keymgr tor-hsclient tor-hsservice tor-hsrproxy arti-client arti-rpcserver arti-config arti-hyper arti-bench arti-testing
* clippy: Use Result::cloned in several placesIan Jackson2024-01-311-1/+1
|
* Require tracing-test 0.2.4Ian Jackson2024-01-311-1/+1
| | | | | | Apparently we need https://github.com/dbrgn/tracing-test/pull/17 too.
* Require tracing-test 0.2.2Ian Jackson2024-01-311-1/+1
| | | | | | | | We need this bugfix https://github.com/dbrgn/tracing-test/pull/15 for `#[traced_test]` when `Result` is redefined. Fixes the tests with minimal-versions.
* Upgrade to strum 0.26Nick Mathewson2024-01-301-1/+1
|
* Patchlevel version bumps in preparation for 1.1.12.Nick Mathewson2024-01-091-2/+2
| | | | | | | | | | | | | This crate doesn't have a meaningful public API, so it just gets a patchlevel bump: arti These crates had nonbreaking changes, and get a patchlevel bump: tor-rtcompat fs-mistrust tor-llcrypto tor-cert
* Breaking version bumps in preparation for 1.1.12.Nick Mathewson2024-01-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These crates have breaking changes on their own: tor-error tor-netdoc tor-dirmgr tor-keymgr Because of the breaking change in tor-error, and the fact that basically every crate publicly depends on tor-error (by implementing ErrorKind), we need to call this a breaking change on all of the following: tor-config tor-geoip tor-rtmock tor-log-ratelim tor-rpcbase tor-bytes tor-hscrypto tor-socksproto tor-cell tor-proto tor-netdoc tor-netdir tor-persist tor-chanmgr tor-ptmgr tor-guardmgr tor-circmgr tor-dirclient tor-dirmgr tor-keymgr tor-hsclient tor-hsservice tor-hsrproxy arti-client arti-rpcserver arti-config arti-hyper arti-testing
* Fix typosDimitris Apostolou2024-01-081-1/+1
|