| Commit message (Collapse) | Author | Age | Files | Lines | ||
|---|---|---|---|---|---|---|
| ... | ||||||
| * | netdoc parse2: tests: Better error messages from error tests | Ian Jackson | 2025-09-29 | 1 | -2/+2 | |
| | | ||||||
| * | netdoc parse2: tests: Use ==== for dividers in output | Ian Jackson | 2025-09-29 | 1 | -1/+1 | |
| | | | | | Otherwise it's easy to get confuseed by ---- dividers for Objects. | |||||
| * | netdoc parse2: poc: Make test functions throw anyhow::Result | Ian Jackson | 2025-09-29 | 1 | -5/+4 | |
| | | | | | For reasons, TestResult doesn't print error sources. | |||||
| * | netdoc parse2: Fix keyword parsing to hate nul, not digit zero (!) | Ian Jackson | 2025-09-29 | 1 | -1/+1 | |
| | | ||||||
| * | netdoc parse2: Use $P::Result throughout | Ian Jackson | 2025-09-29 | 2 | -5/+6 | |
| | | | | | | This is needed when using these macros in a namespace with a local redefinition of `Result`. | |||||
| * | netdoc parse2: Fix a compile_error! invocation | Ian Jackson | 2025-09-29 | 1 | -1/+1 | |
| | | | | | I triggered this error and it didn't work right. | |||||
| * | Bump MSRV from 1.85 to 1.85.1 | Nick Mathewson | 2025-09-09 | 1 | -1/+1 | |
| | | | | | Closes #2107 | |||||
| * | Produce better error messages from bad field types (fmt) | Ian Jackson | 2025-09-02 | 2 | -4/+16 | |
| | | | | | Worsify formatting as demanded by rustfmt. | |||||
| * | Produce better error messages from bad field types | Ian Jackson | 2025-09-02 | 2 | -0/+25 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this change, this diff > --- a/crates/tor-netdoc/src/parse2/poc/netstatus.rs > +++ b/crates/tor-netdoc/src/parse2/poc/netstatus.rs > @@ -24,5 +24,4 @@ pub enum NdaNetworkStatusVersion { > /// `params` value > #[derive(Clone, Debug, Default, Deftly)] > -#[derive_deftly(ItemValueParseable)] > #[non_exhaustive] > pub struct NdiParams { gives the errors below. So the first reported error points to the errant field, albeit with the slightly mendacious phrasing "this call". Previously there was only the 2nd message. Disagnosing that requires hunting through the document struct looking for fields of the right type, which can be seriously awkward when there are type aliases involved as there often are in tor-netdoc. > error[E0277]: the trait bound `parse2::poc::netstatus::NdiParams: parse2::traits::ItemValueParseable` is not satisfied > --> crates/tor-netdoc/src/parse2/poc/netstatus/flavoured.rs:27:10 > | > 27 | #[derive(Deftly, Clone, Debug)] > | ^^^^^^ the trait `parse2::traits::ItemValueParseable` is not implemented for `parse2::poc::netstatus::NdiParams` > ... > 55 | pub params: NdiParams, > | ------ required by a bound introduced by this call > | > = help: the following other types implement trait `parse2::traits::ItemValueParseable`: > () > (T0, T1) > (T0, T1, T2) > (T0, T1, T2, T3) > (T0, T1, T2, T3, T4) > (T0, T1, T2, T3, T4, T5) > (T0, T1, T2, T3, T4, T5, T6) > (T0, T1, T2, T3, T4, T5, T6, T7) > and 16 others > note: required by a bound in `parse2::multiplicity::ItemSetMethods::check_item_value_parseable` > --> crates/tor-netdoc/src/parse2/multiplicity.rs:109:59 > | > 109 | fn check_item_value_parseable(self) where Self::Each: ItemValueParseable {} > | ^^^^^^^^^^^^^^^^^^ required by this bound in `ItemSetMethods::check_item_value_parseable` > > error[E0277]: the trait bound `parse2::poc::netstatus::NdiParams: parse2::traits::ItemValueParseable` is not satisfied > --> crates/tor-netdoc/src/parse2/derive.rs:438:34 > | > 438 | let item = ItemValueParseable::from_unparsed(item)?; > | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `parse2::traits::ItemValueParseable` is not implemented for `parse2::poc::netstatus::NdiParams` > | > ::: crates/tor-netdoc/src/parse2/poc/netstatus/flavoured.rs:27:10 > | > 27 | #[derive(Deftly, Clone, Debug)] > | ------ in this derive macro expansion > | > = help: the following other types implement trait `parse2::traits::ItemValueParseable`: > () > (T0, T1) > (T0, T1, T2) > (T0, T1, T2, T3) > (T0, T1, T2, T3, T4) > (T0, T1, T2, T3, T4, T5) > (T0, T1, T2, T3, T4, T5, T6) > (T0, T1, T2, T3, T4, T5, T6, T7) > and 16 others > = note: this error originates in the macro `derive_deftly_template_NetdocParseable` which comes from the expansion of the derive macro `Deftly` (in Nightly builds, run with -Z macro-backtrace for more info) | |||||
| * | tor-netdoc: parse2: Bind a `selector` local | Ian Jackson | 2025-09-02 | 1 | -1/+2 | |
| | | | | | We're going to reuse this. | |||||
| * | Update to derive-deftly 1.3.0 | Ian Jackson | 2025-09-02 | 1 | -1/+1 | |
| | | ||||||
| * | tor-netdoc: parse2: derive: Remove an unneeded nested ${concat } | Ian Jackson | 2025-09-02 | 1 | -1/+1 | |
| | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3186#note_3249820 | |||||
| * | tor-netdoc: parse2: Speak of non-structural *items* rather than fields | Ian Jackson | 2025-09-02 | 1 | -1/+1 | |
| | | ||||||
| * | tor-netdoc: parse2: Explicitly define "structural item" | Ian Jackson | 2025-09-02 | 1 | -0/+7 | |
| | | ||||||
| * | tor-netdoc: parse2: Report unexpected subdoc multiplicity at the intro item | Ian Jackson | 2025-09-02 | 2 | -3/+5 | |
| | | ||||||
| * | tor-netdoc: multiplicity: Introduce can_accumulate | Ian Jackson | 2025-09-02 | 1 | -2/+20 | |
| | | | | | | | We're going to use this to check that we can accept a sub-document before we parse it. That will make the error come out in the right place. | |||||
| * | tor-netdoc: parse2 tests: Add test case for flattening | Ian Jackson | 2025-09-02 | 1 | -2/+42 | |
| | | ||||||
| * | tor-netdoc: parse2 tests: Use sval in one place rather than open-coding | Ian Jackson | 2025-09-02 | 1 | -1/+1 | |
| | | ||||||
| * | tor-netdoc: parse2: Provide flattening and NetdocParseableFields | Ian Jackson | 2025-09-02 | 4 | -8/+155 | |
| | | ||||||
| * | tor-netdoc: parse2: Preparatory rework for flattening | Ian Jackson | 2025-09-02 | 1 | -8/+10 | |
| | | | | | | Change from two loops over fields and two ${when}, to one loop with ${select1}. There will be another arm in a moment. | |||||
| * | tor-netdoc: parse2: Specify `for struct` in one of the derives | Ian Jackson | 2025-09-02 | 1 | -1/+1 | |
| | | | | | None of these things support enums or unions. | |||||
| * | tor-netdoc: parse2: tests: Include the test doc in more error msgs | Ian Jackson | 2025-09-02 | 1 | -5/+6 | |
| | | ||||||
| * | Remove semver.md files | Nick Mathewson | 2025-08-28 | 1 | -6/+0 | |
| | | ||||||
| * | Bump the minor version of every published crate except for `arti`. | Nick Mathewson | 2025-08-28 | 1 | -13/+13 | |
| | | | | | | | | | 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. | |||||
| * | Run "fixup-features" | Nick Mathewson | 2025-08-27 | 1 | -2/+2 | |
| | | ||||||
| * | Merge branch 'upgrade_deps' into 'main' | Alexander Hansen Færøy | 2025-08-27 | 1 | -1/+1 | |
| |\ | | | | | | | | | Upgrade various dependencies in preparation for next release See merge request tpo/core/arti!3188 | |||||
| | * | Update phf dependency to 0.13.1 | Nick Mathewson | 2025-08-26 | 1 | -1/+1 | |
| | | | ||||||
| * | | tor-netdoc: parse2: multiplicity: Remove now-obsolete trait items | Ian Jackson | 2025-08-26 | 1 | -12/+0 | |
| | | | ||||||
| * | | tor-netdoc: parse2: Know that we always accumulate into Option<Field> | Ian Jackson | 2025-08-26 | 2 | -2/+2 | |
| | | | ||||||
| * | | tor-netdoc: parse2: Always accumulate into Option<Field> (fmt) | Ian Jackson | 2025-08-26 | 1 | -1/+5 | |
| | | | ||||||
| * | | tor-netdoc: parse2: Always accumulate into Option<Field> | Ian Jackson | 2025-08-26 | 1 | -13/+22 | |
| | | | ||||||
| * | | tor-netdoc: parse2: Break out F_EFFECTIVE_TYPE | Ian Jackson | 2025-08-26 | 1 | -7/+13 | |
| | | | | | | | | | We're going to want to reuse this. | |||||
| * | | tor-netdoc: parse2: Use selector_ rather than open-coding | Ian Jackson | 2025-08-26 | 1 | -1/+1 | |
| | | | | | | | | | We're going to make this depend on $ftype differently. | |||||
| * | | tor-netdoc: parse2: Report subdoc intro item keyword for missing item | Ian Jackson | 2025-08-26 | 3 | -4/+19 | |
| | | | | | | | | | This corrects the error message. | |||||
| * | | tor-netdoc: parse2: More focused tests (error cases) | Ian Jackson | 2025-08-26 | 1 | -0/+84 | |
| | | | ||||||
| * | | tor-netdoc: parse2: More focused tests (success cases) | Ian Jackson | 2025-08-26 | 2 | -0/+182 | |
| | | | | | | | | | | | The netstatus doc poc does test most of the functionality, but I want some tests of edge cases that that misses. | |||||
| * | | tor-netdoc: parse2: Fix doctype_for_error | Ian Jackson | 2025-08-26 | 1 | -3/+4 | |
| |/ | | | | Actually report the intro item, as the docs state. | |||||
| * | tor-netdoc: No longer impl Sealed for RouterStatus (fmt) | Ian Jackson | 2025-08-26 | 1 | -1/+1 | |
| | | ||||||
| * | tor-netdoc: No longer impl Sealed for RouterStatus | Ian Jackson | 2025-08-26 | 3 | -4/+2 | |
| | | | | | | We don't need this since RouterStatus no longer implements any sealed traits. | |||||
| * | tor-netdoc: Soften a TODO | Ian Jackson | 2025-08-26 | 1 | -1/+1 | |
| | | ||||||
| * | tor-netdoc: Fix typo | Ian Jackson | 2025-08-26 | 1 | -1/+1 | |
| | | ||||||
| * | tor-netdoc: Change an allow to an expect | Ian Jackson | 2025-08-26 | 1 | -1/+1 | |
| | | | | | | (This will make the build more fragile, but it will also spot an unnecessary allow.) | |||||
| * | tor-netdoc: Fix some visibilities | Ian Jackson | 2025-08-26 | 1 | -6/+3 | |
| | | ||||||
| * | tor-netdoc: Correct the headings of two modules | Ian Jackson | 2025-08-26 | 2 | -2/+2 | |
| | | | | | | each_variety includes votes, so is "network status documents"; each_flavor is just consensuses. | |||||
| * | tor-netdoc: Apply much rustfmt churn | Ian Jackson | 2025-08-26 | 5 | -16/+13 | |
| | | ||||||
| * | tor-netdoc: Provide some Vote things | Ian Jackson | 2025-08-26 | 9 | -95/+109 | |
| | | | | | And export *RouterStatus with the macro, and *Header. | |||||
| * | tor-netdoc: rs: centralise some includes | Ian Jackson | 2025-08-26 | 2 | -13/+8 | |
| | | | | | This will allow them to be shared between each_flavor and each_variety. | |||||
| * | tor-netdoc: Introduce experimental ns-vote feature | Ian Jackson | 2025-08-26 | 7 | -10/+25 | |
| | | | | | | | Now we can start actually having code to do with votes. This feature doesn't actually contain any new API surface yet. | |||||
| * | tor-netdoc: Move all each_variety code to each_flavor | Ian Jackson | 2025-08-26 | 9 | -1470/+1470 | |
| | | | | | | | | The amount we're going to be able to reuse for votes is less than we might hope. This commit is just code motion. | |||||
| * | tor-netdoc: ns variety: Provide for flavour-only items | Ian Jackson | 2025-08-26 | 10 | -26/+141 | |
| | | ||||||
