summaryrefslogtreecommitdiff
path: root/crates/tor-config
Commit message (Collapse)AuthorAgeFilesLines
* Bump crate versions in preparation for Arti 1.0.0 release.Nick Mathewson2022-09-011-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because we want to work more on ensuring that our semver stability story is solid, we are _not_ bumping arti-client to 1.0.0 right now. Here are the bumps we _are_ doing. Crates with "minor" bumps have had API breaks; crates with "patch" bumps have had new APIs added. Note that `tor-congestion` is not bumped here: it's a new crate, and hasn't been published before. ``` tor-basic-utils minor fs-mistrust minor tor-config minor tor-rtcompat minor tor-rtmock minor tor-llcrypto patch tor-bytes patch tor-linkspec minor tor-cell minor tor-proto minor tor-netdoc patch tor-netdir minor tor-persist patch tor-chanmgr minor tor-guardmgr minor tor-circmgr minor tor-dirmgr minor arti-client minor arti-hyper minor arti major arti-bench minor arti-testing minor ```
* Fix a rustdoc link error.Nick Mathewson2022-08-311-1/+1
|
* Merge branch 'refactor-anyhow-arti-crate' into 'main'Nick Mathewson2022-08-313-5/+4
|\ | | | | | | | | Remove `anyhow` from `tor-config` crate See merge request tpo/core/arti!707
| * Remove `anyhow` from `tor-config` crateArturo Marquez2022-08-283-5/+4
| |
* | tor-config: DisfavouredKey: Linkify DisplayIan Jackson2022-08-301-1/+1
| |
* | tor-config: DisfavouredKey: Widen applicability of .to_string()Ian Jackson2022-08-301-1/+1
| | | | | | | | And linkify it.
* | Add documentation note on `to_string()` usage for DisfavouredKey.Alexander Færøy2022-08-301-0/+2
|/
* Merge branch 'clippy' into 'main'Nick Mathewson2022-08-261-0/+8
|\ | | | | | | | | tor-config: tests: Apply standard lint block in sources.rs See merge request tpo/core/arti!694
| * tor-config: tests: Apply standard lint block in sources.rsIan Jackson2022-08-251-0/+8
| | | | | | | | Fixes a spurious clippy warning on nightly, about a dbg!
* | Improve error from bad escapes in a toml config.Nick Mathewson2022-08-255-16/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Whereas previously we would say: ``` target/debug/arti: error: invalid escape character in string: `Z` at line 9 column 14 in ../../.config/arti/arti.toml ``` we now say: ``` target/debug/arti: error: invalid escape character in string: `Z` at line 9 column 14 in ../../.config/arti/arti.toml (If you wanted to include a literal \ character, you need to escape it by writing two in a row: \\) ``` The implementation is a bit of a hack, I'm afraid, but I don't think it's all that bad. Closes #549.
* | Bump toml dependencyIan Jackson2022-08-251-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | We need 60b874308e6792a73cc00517a60bbef60a12e3cc Mixed type arrays (#358) for a test case in tor-config. While we're here, drop the dupe entry in tor-config. (In principle we could make this increase only in tor-config's dev-dependencies, but that seems unnecessarily fiddly.)
* | tor-config Listen: Rename localhost_port_legacy (from _deprecated)Ian Jackson2022-08-251-2/+2
| | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/602#note_2830847
* | tor-config Listen: Add a note about EADDRINUSEIan Jackson2022-08-251-0/+1
| | | | | | | | | | Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/602#note_2830848
* | tor-config; Listen: Return addresses in groups for error behaviourIan Jackson2022-08-251-8/+20
| | | | | | | | | | Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/602#note_2830766
* | tor-config: Provide resolve_alternative_specsIan Jackson2022-08-251-0/+78
| |
* | tor-config: Support tracking deprecated config keysIan Jackson2022-08-252-10/+69
| |
* | tor-config: Introduce ResolutionResultsIan Jackson2022-08-254-21/+53
| | | | | | | | This will allow us to handle new kinds of warnigns etc.
* | tor-config: Rename UnrecognizedKey to DisfavouredKeyIan Jackson2022-08-251-18/+18
| | | | | | | | We're going to want the to use the same type for deprecated keys.
* | tor-config: Provide misc::ListenIan Jackson2022-08-252-0/+311
| |
* | tor-config misc tests: Add standard lint suppression blockIan Jackson2022-08-251-0/+8
|/
* tor-config: semver.md: Document change to ConfigurationSource enumIan Jackson2022-08-251-1/+2
|
* tor-config source: just ConfigurationSource, not FoundConfigFileIan Jackson2022-08-251-60/+21
| | | | | FoundConfigFile existed to hide something that ConfigurationSource now exposes.
* tor-config: Replace dir detection with ConfigurationSource enumIan Jackson2022-08-252-31/+81
| | | | | | | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/682#note_2830860 And subsequent IRC discussion. Having done the work as per review comments, I don't much like the result. It's quite un-ergonomiuc. If we can't have fs autodetection, I think syntactic autodetection within sources.rs would be nearly as nice. However, I seem to be outvoted. At least the externally visible functionality (of an arti binary, say) is reasonably ergonomic.
* tor-config: Provide is_syntactically_directory helper functionIan Jackson2022-08-251-0/+48
|
* tor-config: MustRead: Make publicIan Jackson2022-08-251-1/+2
| | | | I think this ought to be exhaustive.
* config watch: Fix and reduce debounce intervalIan Jackson2022-08-251-0/+1
| | | | | | | | The parameter to FileWatcher::new is not a polling time fallback; it is a "debounce time". Events are always delayed by at least this much. 10s is much too long for this. 1s is more appropriate.
* config sources: Read arti.d as well as arti.tomlIan Jackson2022-08-251-8/+10
| | | | Fixes #474 aka #271
* config sources tests: Test results of directory scanIan Jackson2022-08-251-1/+12
|
* config sources tests: Break out sources_nodefaultsIan Jackson2022-08-251-5/+12
|
* 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