| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
| |
Mostly relating to typos and dependencies.
|
| | |
|
| | |
|
| |
|
|
|
| |
This contains configuration types that are shared between arti and
arti-rely.
|
| |
|
|
|
|
| |
This will allow this code to be shared between arti and arti-relay.
See: #2470
|
| |
|
|
|
| |
This will allow this code to be shared between arti and arti-relay,
and will also likely be useful for others in the ecosystem.
|
| | |
|
| |
|
|
|
|
|
|
| |
This commit adds #[allow(clippy::string_slice)] to all functions in the
code where string slices are used, alongside a TODO comment.
We do this add the function header to have it consistent, as things like
expression based allow's are still experimental.
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Typos found with codespell
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
This will improve the error message for problems similar to
arti#2240, if they recur.
|
| |
|
|
|
|
| |
This should fix the main part of arti#2240.
This is an instance of arti#2267 ("Path::parent has funny behavior")
|
| |
|
|
| |
It seems this config is for tokio-console and not the RPC.
|
| | |
|
| |
|
|
|
|
|
| |
This is the pattern we used elsewhere with the "rpc" option.
IMO, this kind of thing is another argument in favor if
arti#1704 (redoing config types using derive-deftly.)
|
| |
|
|
|
|
| |
This is controlled by a new option, `logging.tokio_console.enabled`.
It requires building with `--cfg tokio_unstable`. See documentation
and comments for more information.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
We may want to add a way to opt out of this check, if someone asks for
it. Checking for "localhost" and "127.0.0.1" is not a very robust check
for a loopback interface, and it's possible that there could be other
situations we can't detect where HTTP is safe (private network,
WireGuard tunnel, etc). But I don't expect those to be likely to come up
in practice, so this should be fine for now.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
First, run
```
git grep -l "^edition =" |
xargs perl -i -pe 's/^edition *=.*/edition = "2024"/;'
```
Second, manually verify that all Cargo.toml files have changed,
and nothing else has changed.
Third, run cargo fmt again.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. Run cargo fix --edition
2. Selectively revert the "if let"->"match" changes.
These changes are meant to protect us from the lifetime changes
for "if let" bindings in Rust 2024.
But we're not actually relying on the old lifetime rules
anywhere, and the match syntax here is quite ugly.
3. Automatically revert `$pat:expr_2021` to `$pat:expr`.
(We don't actually want to restrict the expression syntax
that our macros accept).
Done with
`git grep -l expr_2021 | xargs perl -i -pe 's/expr_2021/expr/g;'`
4. Run cargo fmt.
|
| |
|
|
| |
Fixes #2024
|
| |
|
|
|
| |
Closes #1763.
Closes #1862.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a big change across multiple crates since there isn't a good way
to break it up.
This changes the signature of `CfgPath::path` to:
```
pub fn path(&self, path_resolver: &CfgPathResolver) -> Result<PathBuf, CfgPathError> {
```
Making this change means that our global `CfgPathResolver` needs to be
stored in the 'arti-client' library instead of `tor-config-path`, and
must be passed through to anything that calls `path` to expand the
variables.
|
| |
|
|
|
| |
Also updated other packages to get `CfgPath` directly from
`tor-config-path' instead of 'tor-config'.
|
| |
|
|
|
| |
std::backtrace::Backtrace's Display looks the same as
backtrace_rs::Backtrace's Debug
|
| |
|
|
|
| |
Removes resolve_backtraces from rtmock since it is no longer needed as
stdlib's backtraces automatically lazily resolve without needing a &mut.
|
| |
|
|
| |
Closes #1298
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Since Rust 1.66, std's default works properly for enums, provided that
the default variant is a unit.
Review all uses of `#[educe(default)]` on enums and replace them with
std where possible, which is most of them.
In 1.66 and later, std's `#[derive(Default)]` doesn't infer any
generic bounds on the derived impl, where it's an enum - since the
unit variant can always be constructed. So this change doesn't add
any generic bounds and is not API-visible.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I identified the cases to replace by searching for the string
`.report()`. There are a few that I didn't change:
* A couple of cases that used anyhow::Error,
* One case that reported two Errors.
* Two cases in `tor_hsclient::err` that just did
`error!("Bug: {}")`.
I have also not audited the cases in `tor-hsclient` where we're using
`tor_error::Report` manually.
Nonetheless, closes #949.
|
| |\
| |
| |
| |
| |
| |
| | |
arti: Add a `logging.time_granularity` option with 1s default.
Closes #551
See merge request tpo/core/arti!1376
|
| | |
| |
| |
| |
| |
| |
| | |
This lets us provide less information in our logs: in particular, it
lets us avoid logging with microsecond precision.
Closes #551.
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The original version of our panic handler would allocate a string
for the panic `Location`. But if we're panicking we'd like to keep
allocations to a minimum: so instead format the `Location`
conditionally.
This also drops a useless `std::borrow::Cow`. (The possibility of a
"Don't have a `Cow`" commit message was considered and rejected.)
|
| | | |
|
| |/
|
|
|
|
|
| |
(Also leaves installed the default handler that sends messages to
stderr.)
Closes #921.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Previously we always assumed that the console was ephemeral, and so
we disabled safe logging. But the console can be piped to journald.
And even if we enforce isatty there's no guarantee that the user
isn't using some kind of terminal that logs to disk or something.
Best just to enable SafeLogging unconditionally. I've added a note
about where and how we might re-enable this.
Closes #553.
|
| |
|
|
|
|
|
|
| |
For example, see
https://tpo.pages.torproject.net/core/doc/rust/arti/fn.run.html :
this isn't labeled as `experimental-api`, but it should be.
These APIs were found by poking around in the `arti` crate.
|
| |
|
|
|
| |
Previously we logged at "debug", but that's not meant to
user-facing.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The remaining unconditionally public APIs are those related to our
configuration objects, and the main_main() API.
The rationale for making main_main() public is to have an actual
entry point.
The rationale for making the config APIs public is:
1. We really do intend for others to be able to read our
configuration files using this API.
2. The structure of our configuration files is already part of our
interface.
Closes #530.
|