summaryrefslogtreecommitdiff
path: root/crates/tor-config
Commit message (Collapse)AuthorAgeFilesLines
...
* config sources tests: Introduce test of reading directoryIan Jackson2022-08-251-0/+29
|
* config sources: Supporting reading directoriesIan Jackson2022-08-252-12/+107
|
* config sources: Introduce scan() and FoundConfigFilesIan Jackson2022-08-252-46/+136
| | | | | | | | | | | | | | We're going to need to do config file reading in two phases. Right now this isn't actually necessary, because the set of files is fixed since we don't support dynamically scanning directories. But the new API will be needed in a moment. Code motion and API changes, but no overall functional change. Review with `git show -b` may be helpful. The new API also provides for dealing with directories, but right now that doesn't happen.
* tor-config sources: Remove some unneeded .to_string() from testsIan Jackson2022-08-251-4/+4
|
* enable doc_auto_cfg feature on every crate when documenting for docs.rstrinity-1686a2022-08-242-0/+4
|
* tor-config: resolve_option_general: Add semver noteIan Jackson2022-08-231-0/+1
|
* tor-config: resolve_option_general: Add TODO about exampleIan Jackson2022-08-231-0/+5
|
* Fix syntax in doc comment.Nick Mathewson2022-08-231-1/+1
|
* tor-config: Provide resolve_option_general, for T: !Default etc.Ian Jackson2022-08-221-4/+43
| | | | | | | | | At one point in this MR I thought I was going to want this for arti::cfg::ListenConfig (which we don't want to be Default). In fact ListenConfig is being handled specially, but having written this function it seemed sensible to keep it. Since resolve_option becomes a wrapper for it, the existing tests exercise it.
* Add semver notesIan Jackson2022-08-171-0/+2
|
* Fix typos in comments.eta2022-08-171-1/+1
|
* tor-config: Introduce PaddingLevelIan Jackson2022-08-163-0/+115
| | | | This will be used for controlling channel padding, for now.
* tor-config: Introduce ReconfigureError::BugIan Jackson2022-08-161-0/+4
| | | | Reconfigurations might fail due to internal errors.
* Update shellexpand, and switch to non-forkIan Jackson2022-08-051-1/+1
| | | | | | | | Now we have bus>1 ownership of the crate name `shellexpand`. I have made a release, and retired `shellexpand-fork`. The new shellexpand release switches to a (quite similarly) unforked version of `dirs`.
* Bump patch versions on crates that have new APIs.Nick Mathewson2022-08-011-1/+1
| | | | | | | | | | | | | | Do _not_ bump the dependency versions on crates that have had no changes since arti 0.0.5, since those crates do not depend on the new APIs. ``` cargo set-version -p tor-basic-utils --bump patch cargo set-version -p tor-llcrypto --bump patch git restore crates/tor-checkable git restore crates/tor-consdiff git restore crates/tor-rtmock ```
* Bump minor version on crates with deps with breaking changes.Nick Mathewson2022-08-011-1/+1
| | | | | | | | | | | | | | | This performs the transitive closure of the last operation: everything that depends on a crate with a breaking change gets the version which it depends on bumped. ``` cargo set-version -p tor-proto --bump minor cargo set-version -p tor-netdoc --bump minor cargo set-version -p arti-hyper --bump minor cargo set-version -p arti-bench --bump minor cargo set-version -p arti-testing --bump minor cargo set-version -p tor-config --bump minor ```
* Bump minor versions on all crates that have had breaking changes.Nick Mathewson2022-08-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | Done with these commands: ``` cargo set-version -p fs-mistrust --bump minor cargo set-version -p tor-bytes --bump minor cargo set-version -p tor-socksproto --bump minor cargo set-version -p tor-cert --bump minor cargo set-version -p tor-linkspec --bump minor cargo set-version -p tor-cell --bump minor cargo set-version -p tor-netdir --bump minor cargo set-version -p tor-persist --bump minor cargo set-version -p tor-chanmgr --bump minor cargo set-version -p tor-guardmgr --bump minor cargo set-version -p tor-circmgr --bump minor cargo set-version -p tor-dirclient --bump minor cargo set-version -p tor-dirmgr --bump minor cargo set-version -p arti-client --bump minor cargo set-version -p arti --bump minor ```
* fix nighly clippytrinity-1686a2022-07-232-5/+5
|
* Bump crate and dependency versions.Nick Mathewson2022-06-241-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These were done with the following commands: ``` cargo set-version -p tor-basic-utils --bump patch cargo set-version -p fs-mistrust --bump minor cargo set-version -p tor-error --bump patch cargo set-version -p tor-config --bump patch cargo set-version -p tor-units --bump patch cargo set-version -p tor-rtcompat --bump minor cargo set-version -p tor-llcrypto --bump patch cargo set-version -p tor-bytes --bump minor cargo set-version -p tor-socksproto --bump minor cargo set-version -p tor-cert --bump minor cargo set-version -p tor-cell --bump minor cargo set-version -p tor-proto --bump minor cargo set-version -p tor-netdoc --bump patch cargo set-version -p tor-netdir --bump minor cargo set-version -p tor-persist --bump patch cargo set-version -p tor-chanmgr --bump minor cargo set-version -p tor-guardmgr --bump minor cargo set-version -p tor-circmgr --bump patch cargo set-version -p tor-dirclient --bump patch cargo set-version -p tor-dirmgr --bump minor cargo set-version -p arti-client --bump patch cargo set-version -p arti --bump minor cargo set-version -p arti-bench --bump minor cargo set-version -p arti-testing --bump minor ```
* clippy: Consolidate many lints in maint/add_warningIan Jackson2022-06-241-0/+9
| | | | | | Found these by disabling the nightly dbg macro special case. Now, we have a mechanism for globally adding suppressions to tests, we can use that instead.
* Run maint/add_warning crates/*/src/{lib,main}.rsIan Jackson2022-06-231-0/+3
| | | | Update all lint blocks
* tor-config: style fixes on CfgPathError.Nick Mathewson2022-06-221-6/+6
|
* tor-config: Don't format source error as part of error messageNick Mathewson2022-06-221-2/+2
| | | | This is one I missed earlier.
* impl_standard_builder: Allow for !DefaultIan Jackson2022-06-161-13/+54
|
* tor-config: impl_standard_builder: handle contexts with local ResultIan Jackson2022-06-161-1/+1
|
* config: Suppose that we might extend resolve_option to non-T::DefaultIan Jackson2022-06-101-0/+2
| | | | | As per point 3 in https://gitlab.torproject.org/tpo/core/arti/-/issues/488
* config: Do not strip_option for journald (and in future)Ian Jackson2022-06-101-0/+3
| | | | | As per point 1 in https://gitlab.torproject.org/tpo/core/arti/-/issues/488
* Fix typosDimitris Apostolou2022-06-053-6/+6
|
* tor-config: Fix a doc linkIan Jackson2022-06-011-1/+1
| | | | Nightly cargo doc complaints about this.
* Merge branch 'lint' into 'main'Ian Jackson2022-05-311-0/+3
|\ | | | | | | | | | | | | lints: Make lint blocks consistent and ensure they stay that way Closes #469 See merge request tpo/core/arti!557
| * lints: Add let_unit_value allow to all cratesIan Jackson2022-05-311-0/+1
| | | | | | | | | | From running add_warning, with manual picking of the right hunks/lines.
| * lints: Add lint block delimiters to every crateIan Jackson2022-05-311-0/+2
| | | | | | | | | | | | This was the result of: maint/add_warning crates/*/src/{lib,main}.rs and then manually curating the results.
* | Merge branch 'config-test' into 'main'Ian Jackson2022-05-312-2/+110
|\ \ | | | | | | | | | | | | arti config: Check that example config is exhaustive See merge request tpo/core/arti!546
| * | tor-config: Suppress unwrap lint in testsIan Jackson2022-05-311-0/+1
| | | | | | | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/546#note_2808892
| * | tor-config: resolve_option tests: disable rsutfmtIan Jackson2022-05-311-0/+1
| | |
| * | tor-config: Add comprehensive tests for resolve_optionIan Jackson2022-05-311-0/+71
| | |
| * | 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