summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | Document breaking changes to DownloadSchedule etc.Ian Jackson2022-04-261-0/+5
| | |
| * | DownloadSchedule: Rename field to "attempts"Ian Jackson2022-04-262-12/+12
| | | | | | | | | | | | | | | | | | | | | This is actually a number of *attempts* not a number of *retries*. The setter method was already called "attempts". This chnages the deserialisation of the config.
| * | DownloadSchedule: Abolish accessors in DownloadScheduleConfigIan Jackson2022-04-263-42/+19
| | | | | | | | | | | | We can just make the fields pub(crate).
| * | DownloadSchudule: Have NetworkConfig contain BuildersIan Jackson2022-04-264-96/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use sub_builder. We must do something special for defaults. This involves moving the actual default values for retry_bootstrap and retry_microdescs into config.rs, since they need to access the fields of the un-built version of the structure. (An alternative would be to generate "weak setters" which do not override previous settings, but derive_builder does not offer to generate them and that seems overkill.)
| * | DownloadSchedule: Abolish new() methodIan Jackson2022-04-264-38/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead, everyone should use DownloadScheduleBuilder. The new() method would in any case be useless in a moment, since we're going to embed DownloadScheduleBuilder in the NetworkConfig, not DownloadSchedule. The call sites in the tests are all about to change again.
| * | DownloadSchedule: tests: Do not try to set parallelism to 0Ian Jackson2022-04-262-13/+11
| | | | | | | | | | | | | | | | | | | | | | | | The current behaviour is to treat 0 as indicating "use the default", which is quite strange. We are going to get rid of that. The new way will be to reject zero, during DownloadScheduleBuilder::build, Add a test case for that.
| * | DownloadSchedule: Provide builderIan Jackson2022-04-261-1/+42
| | |
* | | Merge branch 'msrv_1_56' into 'main'Nick Mathewson2022-04-2681-302/+287
|\ \ \ | |/ / |/| | | | | | | | Increase our MSRV to 1.56. See merge request tpo/core/arti!472
| * | Merge branch 'main' into 'msrv_1_56'Nick Mathewson2022-04-2617-179/+376
| |\ \ | |/ / |/| | | | | | | | | | | # Conflicts: # crates/tor-config/Cargo.toml # crates/tor-dirmgr/src/state.rs # doc/semver_status.md
* | | Merge branch 'config-sub-list' into 'main'Nick Mathewson2022-04-2616-167/+348
|\ \ \ | | | | | | | | | | | | | | | | Introduce macro for ThingListBuilder, and use for AuthorityListBuilder See merge request tpo/core/arti!471
| * | | list-builder: Provide tests of all methodsIan Jackson2022-04-251-0/+31
| | | | | | | | | | | | | | | | | | | | Because the macro output is private, if we miss one out of the tests, it doesn't fail due to dead code :-).
| * | | list_builder: Allow the struct to not be pubIan Jackson2022-04-251-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Really, we probably don't want any of these not to be pub, but it triggers "unreachable pub" in my test cases, and making it not pub by mistake seems not very serious, and likely to be noticed. Making the struct private in the test cases has the useful effect of checking that all the methods are tested.
| * | | list_builder: Use $crate namespaced importsIan Jackson2022-04-253-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | I don't think we need to bother with things in the prelude, but doing it for serde and ConfigBuildError seems nice. Noticed while writing a test case.
| * | | Document defaults for all the config listsIan Jackson2022-04-255-4/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | And add an imprecation in define_list_config_builder's doc comment do do so in future for other invocations of the macro. Add add the missing full stops.
| * | | define_list_config_builder: Provide example of item_buildIan Jackson2022-04-251-0/+30
| | | | | | | | | | | | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/471#note_2798027
| * | | define_list_config_builder: Expand generated docs for methods etc.Ian Jackson2022-04-251-4/+16
| | | | | | | | | | | | | | | | | | | | Requested in https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/471#note_2798022
| * | | Add semver note about added macros in tor-condfigIan Jackson2022-04-251-0/+4
| | | |
| * | | Add semver notes for AuthorityListBuilder, PredictedPortsListBuilderIan Jackson2022-04-251-0/+2
| | | | | | | | | | | | | | | | These were omitted in the earlier commits.
| * | | Rename macro_first_nonempty (from macro_coalesce_args)Ian Jackson2022-04-253-4/+4
| | | | | | | | | | | | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/471#note_2798026
| * | | Rename ThingListBuilder::replace (from set)Ian Jackson2022-04-256-15/+15
| | | | | | | | | | | | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/471#note_2798024
| * | | Use better syntax for doc comment attributeIan Jackson2022-04-255-23/+11
| | | | | | | | | | | | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/471#note_2798020
| * | | Introduce PredictedPortsListBuilderIan Jackson2022-04-253-31/+39
| | | | | | | | | | | | | | | | | | | | | | | | This means that `NetworkConfig::initial_predicted_ports` is now like the other list-like things, returning `&mut list_builder` with the same `set()` and `append()` methods.
| * | | config list-builder: Allow overriding the per-item build methodIan Jackson2022-04-254-2/+17
| | | | | | | | | | | | | | | | | | | | This will be useful especially for simple lists where the entry doesn't need a separate builder type.
| * | | macro_coalesce_args: New helper macroIan Jackson2022-04-251-0/+30
| | | |
| * | | Introduce AuthorityListBuilder in NetworkConfigBuilderIan Jackson2022-04-256-40/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NetworkConfigBuilder needs to not contain any validated structs, so that its serde does not expose the validated details. AuthorityListBuilder is what ought to go here - and it contains Vec<AuthorityBuilder>, not Vec<Authority>. As a consequence, many places now deal with AuthorityBuilder, rather than Authority.
| * | | Fix error return type of AuthorityBuilderIan Jackson2022-04-252-0/+6
| | | |
| * | | Introduce define_list_config_builder macroIan Jackson2022-04-254-94/+134
| | | | | | | | | | | | | | | | | | | | | | | | This replaces two almost-identical sets of structs and impls. More are on the way, as per https://gitlab.torproject.org/tpo/core/arti/-/issues/447
| * | | logging: Drop a pointless .within() callIan Jackson2022-04-251-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since "logfiles: Introduce LogfileListConfigBuilder", this code is in LogfileListConfigBuilder::build(), which is called by derive_builder's generated LoggingConfig::build(), and which will add a file context itself due to the `sub_builder` feature. So this is otiose. And, we are about to replace this whole thing with macro_rules-generated code (which won't do this).
* | | | Merge branch 'abstime-sum' into 'main'Ian Jackson2022-04-251-12/+29
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | retry-error: Provide AbsRetryTime::from_sub and use it See merge request tpo/core/arti!470
| * | | | AbsRetryTime::from_sum: Provide a test caseIan Jackson2022-04-251-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | As requested in https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/470#note_2798015
| * | | | AbsRetryTime::from_sum: Add missing full stopIan Jackson2022-04-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/470#note_2797945
| * | | | retry-error: Provide AbsRetryTime::from_sub and use itIan Jackson2022-04-251-12/+14
| | | | | | | | | | | | | | | | | | | | This same calculation was in the code three times.
| | | * | Update semver_status to note that all crates have had a breaking change.Nick Mathewson2022-04-251-0/+5
| | | | |
| | | * | squash! Bump every crate's edition to 2021.Nick Mathewson2022-04-2545-64/+0
| | | | | | | | | | | | | | | | | | | | | | | | | Remove all `use` statements for `TryFrom` and `TryInto`. These are now redundant in Rust 2021.
| | | * | Bump every crate's edition to 2021.Nick Mathewson2022-04-2533-33/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an automated change made with a perl one-liner and verified with grep -L and grep -l. Some warnings are introduced with this change; they will be removed in subsequent commits. See arti#208 for older discussion on this issue.
| | | * | Add 'rust-version = "1.56"' to every Cargo.toml file.Nick Mathewson2022-04-2533-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change was made automatically with a perl one-liner, and confirmed with `grep -L`. The `rust-version` field itself was introduced in 1.56.0.
| | | * | Reformat all not-yet-reformatted Cargo.toml files.Nick Mathewson2022-04-2528-202/+214
| | | | | | | | | | | | | | | | | | | | | | | | | There are no semantic changes here; only formatting. This is in preparation for other changes (wrt MSRV and edition)
| | | * | Increase our MSRV to 1.56.Nick Mathewson2022-04-252-2/+2
| |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our support policy says that we can update to any Rust released at least 6 months ago; 1.56 came out on 21 October 2021. This doesn't yet change any code: it just increases the version we say we need in our README, and the version we test against in CI. Our main justification for this change is to be able to upgrade to newer versions of our dependencies, including `async_executors` >= 0.5, `aes` >= 0.8, and `cipher` >= 0.4.
* | | | Merge branch 'integers' into 'main'Ian Jackson2022-04-252-7/+55
|\| | | | |/ / |/| | | | | | | | Better handling of integer overflows See merge request tpo/core/arti!466
| * | tor-error: Handle integer overflowsSamanta Navarro2022-04-231-4/+27
| | | | | | | | | | | | | | | | | | | | | If duration addition overflows, then continue with Never. Caching the AbsRetryTime constructed with duration from supplied function also reduces the overhead of earliest_absolute.
| * | retry-error: Handle integer overflowSamanta Navarro2022-04-231-3/+28
| |/ | | | | | | | | In theory n_errors could overflow, which is an error in Rust. The check is cheap and I have added a test for it.
* | Merge branch 'experimental-v3ident-public' into 'main'Ian Jackson2022-04-251-0/+5
|\ \ | | | | | | | | | | | | Authority: make v3ident public under experimental-api See merge request tpo/core/arti!463
| * | Authority: make v3ident public under experimental-apiChristian Grigis2022-04-221-0/+5
| | |
* | | Merge branch 'fix-typos' into 'main'Ian Jackson2022-04-250-0/+0
|\ \ \ | | | | | | | | | | | | | | | | Fix typos bothering rust-nightly pipeline See merge request tpo/core/arti!464
| * | | Fix typos bothering rust-nightly pipelineChristian Grigis2022-04-222-2/+2
| | |/ | |/|
* | | Merge branch 'test' into 'main'Ian Jackson2022-04-251-0/+2
|\ \ \ | | | | | | | | | | | | | | | | tor-basic-utils: Add RetryDelay::reset test See merge request tpo/core/arti!467
| * | | tor-basic-utils: Add RetryDelay::reset testSamanta Navarro2022-04-231-0/+2
| |/ /
* | | Merge branch 'type-skewestimate' into 'main'Ian Jackson2022-04-252-2/+2
|\ \ \ | |/ / |/| | | | | | | | fix typo in doc See merge request tpo/core/arti!469
| * | fix typo in doctrinity-1686a2022-04-252-2/+2
|/ /
* | Merge branch 'config-sub' into 'main'eta2022-04-2220-342/+259
|\ \ | |/ |/| | | | | Replace much handwritten config code with use of derive_builder See merge request tpo/core/arti!462