summaryrefslogtreecommitdiff
path: root/crates/tor-netdoc
Commit message (Collapse)AuthorAgeFilesLines
...
* | tor-netdoc: Paramterise RelayFlagsParser for varying omitted/implied bitsIan Jackson2025-11-181-5/+28
| | | | | | | | Which bits are implied/omitted depends on the document!
* | tor-netdoc: Introduce a RelayFlagsBits type aliasIan Jackson2025-11-181-1/+4
| |
* | tor-netdoc: Test RelayFlags coherence and encodingIan Jackson2025-11-181-0/+41
| |
* | tor-netdoc: Provide for encoding RelayFlagsIan Jackson2025-11-181-1/+22
| | | | | | | | The API is a bit clumsy, but we're mostly going to use it internally.
* | tor-netdoc: RelayFlags: add a macro for keyword parsingIan Jackson2025-11-181-19/+43
| |
* | tor-netdoc: Rename RelayFlags elements for regularity vs specIan Jackson2025-11-183-7/+7
| | | | | | | | | | Add underscores so that the spec keywords and the flag constants correspond (according to `paste`'s case-changing rules).
* | tor-netdoc: Improve docs for RelayFlagsIan Jackson2025-11-181-1/+10
| | | | | | | | | | | | | | * Document the bizarre FromStr impl. That isn't in my way, so I don't intend to fix it. So I've documented it instead. * Mention the naming discrepancy.
* | tor-netdoc: Move RelayFlags into its own moduleIan Jackson2025-11-183-161/+185
| | | | | | | | | | We're going to do a lot more with this and it's less confusing to have it all together.
* | Merge branch 'p2-dedup' into 'main'Ian Jackson2025-11-111-123/+139
|\ \ | | | | | | | | | | | | tor-netdoc: parse2 More deduplication of the derive macro See merge request tpo/core/arti!3455
| * | tor-netdoc: parse2: Improve error message when using with=Ian Jackson2025-11-101-1/+1
| | | | | | | | | | | | | | | This can result in "trait not implemented" errors here. Use the `${paste_spanned}` trick.
| * | tor-netdoc: parse2 derive: deduplicate completionIan Jackson2025-11-101-35/+33
| | |
| * | tor-netdoc: parse2 derive: deduplicate item accumulationIan Jackson2025-11-101-31/+35
| | |
| * | tor-netdoc: parse2 derive: deduplicate item accumulation (prep)Ian Jackson2025-11-101-43/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | Move what is now IF_NONSTRUCTURAL_ACCUMULATE into the common module. It's not yet suitable for reuse. The docs for ACCUMULATE_ITEM_VALUE are still wrong. We'll fix that in a moment.
| * | tor-netdoc: parse2 derive: Provide dtrace in NetdocParseableFieldsIan Jackson2025-11-101-12/+21
| | | | | | | | | | | | | | | | | | This was previously only not done because of the need to c&p. Also, we're going to be expanding some common macros that will use it.
| * | tor-netdoc: parse2 derive: Get rid of $ITEM workaroundIan Jackson2025-11-101-10/+4
| | | | | | | | | | | | The hygiene is fixed in derive-deftly 1.5.x.
* | | Apply deferred rustfmt churnIan Jackson2025-11-103-4/+4
| | |
* | | tor-netdoc: Introduce "encode" feature for the like-named moduleIan Jackson2025-11-104-5/+10
| | | | | | | | | | | | | | | | | | | | | We're going to introduce facilities for encoding more generally, and we'll want a way to enable them. Instead, have a separate feature for *encoding* documents.
* | | tor-netdoc: Rename the `build` module to `encode`Ian Jackson2025-11-105-8/+8
|/ / | | | | | | | | The word "build" so often in Rust means builder pattern. This module contains functions for encoding.
* | Merge branch 'p2-dedup-1' into 'main'Ian Jackson2025-11-102-136/+146
|\ \ | | | | | | | | | | | | tor-netdoc: parse2 derive: Some deduplication See merge request tpo/core/arti!3450
| * | tor-netdoc: Fix typoIan Jackson2025-11-101-1/+1
| | |
| * | tor-netdoc: parse2 derive: deduplicate item parsingIan Jackson2025-11-061-24/+23
| | |
| * | tor-netdoc: parse2 derive: deduplicate item set selectorsIan Jackson2025-11-061-47/+62
| | |
| * | tor-netdoc: parse2 derive: deduplicate F_EFFECTIVE_TYPEIan Jackson2025-11-061-24/+13
| | |
| * | tor-netdoc: parse2 derive: deduplication: field types and keywordsIan Jackson2025-11-061-36/+39
| | | | | | | | | | | | | | | | | | | | | Have the module expect the use site to determine (mostly) the field kind. Document this expectation. Now NetdocParseableCommon can have the keyword-related definitions.
| * | tor-netdoc: parse2 derive: deduplication: start a moduleIan Jackson2025-11-062-9/+13
| | | | | | | | | | | | Put one textually-identical define in it, to start with.
* | | Bump derive-deftly to 1.5.0Ian Jackson2025-11-071-1/+1
|/ / | | | | | | | | | | | | This has the meta attributes with optional values feature and also hygiene rework for modules. The breaking changes don't break arti.
* | Merge branch 'deftly-1.4' into 'main'opara2025-11-061-1/+1
|\ \ | | | | | | | | | | | | Bump derive-deftly to 1.4.0 See merge request tpo/core/arti!3448
| * | Bump derive-deftly to 1.4.0Ian Jackson2025-11-061-1/+1
| |/ | | | | | | | | | | This will let us use the new modules feature. There are no breaking changes to beta features in 1.4.0.
* | Fix name of clippy lint to unchecked_time_subtraction (2)Ian Jackson2025-11-0631-32/+32
| | | | | | | | Run maint/add_warning
* | Use a while let loop (to placate clippy)Ian Jackson2025-11-061-2/+1
|/
* maint: remove all semver.md filesSteven Engler2025-10-301-25/+0
|
* maint: bump minor versions of all published cratesSteven Engler2025-10-291-13/+13
| | | | | | | ```bash readarray -t publish < <(cargo metadata --format-version 1 | jq -r '.packages[] | select((.id | startswith("path+file:///")) and (.rust_version != null) and (.publish == null or .publish == true or .publish != [])) | .name') for package in "${publish[@]}"; do echo "$package:"; cargo set-version --bump minor -p "$package"; done ```
* tor-netdoc: impl ItemArgumentParseable for IgnoredIan Jackson2025-10-232-2/+11
| | | | Change our mind about the logic for encoding an Ignored.
* tor-netdoc: Abolish ArgumentNotPresent alias, completing the renameIan Jackson2025-10-233-9/+6
|
* tor-netdoc: Use NotPresent rather than Option<Ignored> to suppress fieldsIan Jackson2025-10-234-8/+8
|
* tor-netdoc: Add unit tests for NotPresent and Ignored objectsIan Jackson2025-10-231-1/+32
|
* tor-netdoc: Add unit tests for NotPresent itemsIan Jackson2025-10-233-2/+6
|
* tor-netcoc: Introduce NotPresent, for absent multiplicityIan Jackson2025-10-233-9/+88
| | | | | | | | | Currently this is mishandled: the current use sites (in rs/each_variety.rs) use Option<Ignored>, which would reject repeated items with that keyword, which is technically wrong. And encoing will become a problem. Vec<Ignored> would be wrong too. Instead, broaden NotPresent and give it multiplicity impls.
* tor-netdoc: Move parse2 impls on Ignored to types/misc.rsIan Jackson2025-10-232-23/+22
| | | | | | This seems to be where we're putting most of the parse2 impls on these types, now. That makes more sense as parse2 becomes more of a proper thing.
* tor-netdoc: Document new feature in semver.mdIan Jackson2025-10-221-0/+1
|
* tor-netdoc: NetdocParseableFields derive: support flatten (test)Ian Jackson2025-10-221-0/+11
|
* tor-netdoc: NetdocParseableFields derive: support flattenIan Jackson2025-10-221-2/+26
| | | | | | | | | This allows a NetdocParseableFields inside a NetdocParseableFields. The code is rather duplicative with the NetdocParseable implementation. This is due to limitations in derive-deftly; see https://gitlab.torproject.org/Diziet/rust-derive-deftly/-/merge_requests/525 where I'm trying to start to address them.
* tor-netdoc: NetdocParseableFields derive: break out kw variableIan Jackson2025-10-221-1/+3
| | | | We're going to reuse this.
* tor-netdoc: Preamble: Fix garbled doc commentIan Jackson2025-10-221-1/+1
| | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3378#note_3277957
* tor-netdoc: Preamble: rename relay_version field to server_versionIan Jackson2025-10-224-8/+9
| | | | This makes it match the protocol and the spec.
* tor-netdoc: Say Preamble doesn't contain vote-status, in summary.Ian Jackson2025-10-221-1/+1
|
* tor-netdoc: Explain that Preamble doesn't contain vote-status either.Ian Jackson2025-10-221-1/+1
|
* tor-netdoc: Document breaking changes in semver.mdIan Jackson2025-10-221-0/+2
|
* tor-netdoc: netstatus: Preamble: Name the protocols fields in docIan Jackson2025-10-221-0/+2
|
* tor-netdoc: netstatus: Preamble: rename shared rand fields to match docIan Jackson2025-10-223-18/+18
| | | | | We should use the same name everywhere, even if the name in the spec is clumsy (as it is here).