aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-config
Commit message (Collapse)AuthorAgeFilesLines
...
| * | config: Provide tor_config::resolve_option and resolve journaldIan Jackson2022-05-301-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Canonicalise the `logging.journald` setting in the validated configuration. Now it will never be `Some("")`, even if that is what was written in the config file. This allows us to write `journald = ""` in the example configuration. (Without the canonicalisation the default builder produces `None` and the example would produce `Some("")`, which are semantically identical but fail the test.) See https://gitlab.torproject.org/tpo/core/arti/-/issues/488 for some background.
| * | tor-config: Drop Serialize and Deserialize from a test typeIan Jackson2022-05-301-2/+1
| |/ | | | | | | | | These violate our rule that *built* structs ought not to be desr. But this is just in a test.
* | Merge branch 'tor-config-tests' into 'main'Nick Mathewson2022-05-314-1/+122
|\ \ | | | | | | | | | | | | Add a few coverage-based tests to tor-config. See merge request tpo/core/arti!540
| * | Add a few coverage-based tests to tor-config.Nick Mathewson2022-05-314-1/+122
| | | | | | | | | | | | There's nothing major here, but it does fill in a few gaps.
* | | Merge branch 'dbg' into 'main'Nick Mathewson2022-05-311-0/+5
|\ \ \ | |_|/ |/| | | | | | | | Revert "Remove dbg!()s in tor-config" See merge request tpo/core/arti!552
| * | Revert "Remove dbg!()s in tor-config"Ian Jackson2022-05-271-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | This was done because Nightly Rust complained about these, despite them all being in tests. That is now fixed upstream: https://github.com/rust-lang/rust-clippy/issues/8758 https://github.com/rust-lang/rust-clippy/pull/8838 This reverts commit 9d26a91886990b08dc5b6033c290d417489c61fc.
* | | Lexically sort Cargo.toml dependenciesOrhun Parmaksız2022-05-281-5/+4
|/ / | | | | | | | | | | Utilize cargo-sort: https://github.com/DevinR528/cargo-sort Signed-off-by: Orhun Parmaksız <[email protected]>
* | Regenerate version bump from previous commit.arti-v0.4.0Nick Mathewson2022-05-271-3/+3
| | | | | | | | | | | | | | This commit was made by reverting the previous commit, then re-running the script I used to generate it. In theory there should be no semantic changes: only changes due to improved formatting from cargo edit.
* | Semantic version changes for Arti 0.4.0 releaseNick Mathewson2022-05-271-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I followed the following procedure to make these changes: * I used maint/changed_crates to find out which crates had changed since 0.3.0. * I used grep and maint/list_crates to sort those crates in topological (dependency) order. * I looked through semver_status to find which crates were listed as having semver-relevant changes (new APIs and breaking changes). * I scanned through the git logs of the crates with no semver-relevant changes listed to confirm that, indeed, they had no changes. For those crates, I incremented their patch-level version _without_ changing the version that other crates depend on. * I scanned through the git logs of the crates with no semver-relevant changes listed to confirm that, indeed, they had no obvious breaking changes. * I treated all crates that depend on `arti` and/or `arti-client` as having breaking changes. * I identified crates that depend on crates that have changed, even if they have not changed themselves, and identified them as having a non-breaking change. * For all of the crates, I used `cargo set-version -p $CRATE --bump $STATUS` (where `STATUS` is `patch` or `minor`) to update the versions, and the depended-upon versions.
* | Update tor-config README.md.Nick Mathewson2022-05-271-1/+41
| |
* | Fix a link with nightly rustdocNick Mathewson2022-05-261-1/+1
|/
* Merge branch 'config-split' into 'main'Ian Jackson2022-05-263-6/+791
|\ | | | | | | | | | | | | Break TorClientConfig out of ArtiConfig and warn on unknown config keys Closes #459 and #417 See merge request tpo/core/arti!529
| * tor-config: load: clippy: adopt two suggestionsIan Jackson2022-05-261-3/+2
| | | | | | | | We can have mem::take, hooray.
| * tor-config: load: Add missing "not".Ian Jackson2022-05-261-1/+1
| | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/529#note_2807331
| * tor-config: load: Make UnrecognizedKeys not pubIan Jackson2022-05-261-1/+1
| | | | | | | | | | | | | | This was a slip. As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/529#note_2807330
| * tor-config: load: Add reversed testIan Jackson2022-05-251-0/+3
| |
| * tor-config: Add duplicative doc comments as per reviewIan Jackson2022-05-251-1/+6
| |
| * tor-config: load: example: Document what it does and who might write itIan Jackson2022-05-251-0/+16
| |
| * tor-config: load: Add a newlineIan Jackson2022-05-251-0/+1
| | | | | | | | This makes the function a tiny bit clearer.
| * tor-config: load: Write actual definition of the Resolvable traitIan Jackson2022-05-251-2/+18
| | | | | | | | | | This is not a doc comment because we don't want it to be public: it must refer to private fields, etc.
| * tor-config: load: Explain why not write out macro call n timesIan Jackson2022-05-251-0/+2
| |
| * tor-config: docs: add more docs about load, esp. traitsIan Jackson2022-05-251-0/+23
| |
| * tor-config: docs: add a lot of context and overview and xrefsIan Jackson2022-05-252-1/+57
| |
| * tor-config: load: Avoid destructuring assignmentIan Jackson2022-05-251-2/+2
| | | | | | | | Not available in our MSRV.
| * tor-config: load: Intersection: add more commentaryIan Jackson2022-05-251-5/+48
| |
| * tor-config: load: Drop a needless call to .into_iter()Ian Jackson2022-05-251-1/+0
| | | | | | | | I think this is a leftover from a previous version of this expression.
| * tor-config: load: Fix a misleading commentIan Jackson2022-05-251-1/+1
| | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/529#note_2807070
| * tor-config: load: Rename shorter_letIan Jackson2022-05-251-2/+2
| | | | | | | | | | Instead of the wrong "prefix_len". As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/529#note_2807068
| * tor-config: load: DocsIan Jackson2022-05-251-2/+2
| |
| * tor-config: Typo fixes (as per review comments)Ian Jackson2022-05-251-4/+4
| |
| * tor-config: load: Introduce UnrecognizedKeys enumIan Jackson2022-05-251-23/+52
| | | | | | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/529#note_2807078 This is in fact much clearer than the Option.
| * Run rustfmt following renamingIan Jackson2022-05-252-2/+3
| | | | | | | | Split into its own commit to avoid churn in the rename commits.
| * tor-config: Rename resolve_return_unrecognized, ..._ignore_...Ian Jackson2022-05-252-5/+5
| | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/529#note_2807077
| * tor-config: Rename "ignored" to "unrecognized" throughoutIan Jackson2022-05-252-45/+45
| | | | | | | | | | As per review comments https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/529#note_2807076
| * tor-config: Example for load moduleIan Jackson2022-05-242-0/+47
| |
| * tor-config: Tests for ignored config key handlingIan Jackson2022-05-241-0/+56
| |
| * tor-config: Track and (by default) warn on ignored config keysIan Jackson2022-05-242-7/+103
| |
| * tor-config: Tests for support functions for tracking ignored keysIan Jackson2022-05-241-0/+80
| |
| * tor-config: Support functions for tracking ignored config keysIan Jackson2022-05-242-0/+170
| | | | | | | | This turns out to need quite a complicated algorithm.
| * Split TorClientConfig out of ArtiConfig, and Resolvable traitIan Jackson2022-05-242-0/+87
| | | | | | | | | | | | | | | | | | | | | | | | This gets rid of `#[serde(flatten)]` which prevents serde_ignored (and other kinds of introspection) from working properly. The price is now that the toplevel has to deal with two configuration objects. The Resolvable trait is overkill right now, but is going to do More Things in a moment. In particular, we need the impl on tuples, so that the whole config can be processed in one go.
| * tor-config: Introduce Builder trait and ConfigReolveErrorIan Jackson2022-05-242-5/+60
| | | | | | | | | | | | | | | | | | We are going to need this for some generic code which is going to appear shortly. Having it produced by impl_standard_builder seems best. But that does mean being able to disable it, so extra stuff in the macro. Nothing uses this trait yet. ConfigResolveError is not used now either, but will be in a moment.
| * tor-config: Add a lint allowIan Jackson2022-05-241-0/+1
| | | | | | | | | | | | | | I don't understand why this isn't tripping all the time. Maybe because this is in a macro. Anyway, I am going to add a new invocation of this macro from within a test where, empirically, it trips.
* | Merge branch 'bug475' into 'main'Ian Jackson2022-05-251-1/+6
|\ \ | |/ |/| | | | | | | | | ConfigurationSources: Allow config files to be world-readable. Closes #475 See merge request tpo/core/arti!528
| * ConfigurationSources: Allow config files to be world-readable.Nick Mathewson2022-05-241-1/+6
| | | | | | | | Fixes #475.
* | fs-mistrust: make Mistrust have a corresponding Builder type.Nick Mathewson2022-05-241-2/+2
|/ | | | | This is an approximately minimal revision to get Builder in place; subsequent commits will clean up the API.
* Add a couple of "pub use" to make nightly rustdoc pass.Nick Mathewson2022-05-201-0/+3
|
* Remove dbg!()s in tor-configNick Mathewson2022-05-201-5/+0
| | | | This should satisfy our CI and turn it green again.
* Merge branch 'arti-config-2' into 'main'Nick Mathewson2022-05-133-0/+253
|\ | | | | | | | | Abolish arti-config, replacing with tombstone crate See merge request tpo/core/arti!508
| * tor-config: Provide useful documentation for sources moduleIan Jackson2022-05-131-0/+14
| |
| * arti-config abolition: Move functionality to tor-configIan Jackson2022-05-132-0/+237
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This crate no longer has any reason to exist. All its remaining functionality is generic enough to go into tor-config. In this commit, we move the contents of lib.rs into a new file in tor-config. It contains: * Code motion * The minimal "mod" and "use" changes * The minimal doc comment * A new a compat alias for ConfigurationSources. The compat alias is there because various crates currently speak of arti_config::ConfigurationSources and it is most convenient to fix them up after the type is available in tor_config.