| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
| |
This commit executes maint/add_warning with the just added change to
deny string slices except in tests.
I recommend auditing this by checking out the previous commit followed
by running the script yourself and then verifying that the diff is
identical to this commit.
This commit makes cargo clippy fail. We will add exceptions in the next
commit.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In order to implement this part of #1856, we will internally divide
requests into two kinds: "Waitable" and "Pollable". Waitable
requests are the kind that we have now: They are created with an
"execute" method. They each have their own response queue and their
own condvar, and in order to see if they have any responses, the
caller needs to call some kind of request-specific method.
Pollable requests are the ones we will add. They are created with a
"submit" method, and associated with a user-provided tag.
They all share the same queue and the same condvar.
To see if any of them have a response, the caller will run a
function that returns tagged responses.
In order to support this division, this commit:
- turns `RequestState` into an enum,
- makes `ResponseQueue` into its own type,
- Adds a trait that will be implemented by every type that can
identify a response queue.
|
| | |
|
| |
|
|
|
| |
This will be necessary since, in order to make the RPC stuff
nonblocking, we'll need a better API than just `Box<dyn Read>` etc.
|
| |
|
|
| |
Closes #1588.
|
| |
|
|
| |
Run maint/add_warning
|
| |
|
|
|
|
|
|
|
|
| |
The two main causes of errors were:
- Since some of the lifetime rules have changed, we no longer need
to do as many "bind a variable and immediately return it"
patterns, and so clippy now warns about them.
- We needed to adjust the explicit captures (`use<...>`)
in a couple of our RPIT instances.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Example:
```text
warning: doc list item overindented
--> crates/arti-rpc-client-core/src/conn/connimpl.rs:322:9
|
322 | /// indicates that no more messages will be received for this request.
| ^^^ help: try using ` ` (2 spaces)
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items
note: the lint level is defined here
--> crates/arti-rpc-client-core/src/lib.rs:8:9
|
8 | #![warn(clippy::all)]
| ^^^^^^^^^^^
= note: `#[warn(clippy::doc_overindented_list_items)]` implied by `#[warn(clippy::all)]`
```
|
| |
|
|
| |
Change `..UnixAddress...` to `...AfUnixAddress..`.
|
| |
|
|
|
| |
This variant breaches the new guidelines about AF_UNIX terminology.
And its purpose is unclear and it's not used.
|
| |
|
|
|
|
|
| |
We want to explain better what has happened, not only with the final
fatal error, but with any nonfatal errors that occurred in the middle.
Closes #1826.
|
| |
|
|
| |
Closes #1650.
|
| |
|
|
|
| |
This type explains where every error came from, and explains why
each declined connect point was declined.
|
| |
|
|
|
|
|
|
| |
Also change corresponding message.
This way, it will be clear that we're just reporting that Arti
gave us an error—not that the error necessarily means that the
authentication itself was "wrong".
|
| |
|
|
|
|
|
|
|
|
|
| |
The execute_internal_ok method converts every error response into an
internal error; as such, it's only appropriate when there is no way
for a well-behaved Arti instance to give an error response.
But we had been using it in a few places where errors were possible
under other circumstances.
This commit fixes that behavior, and adds documentation to help
avoid it.
|
| | |
|
| |
|
|
| |
Closes #1753
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Expose ArtiRpcConnBuilder and appropriate C wrapper functions in
our FFI code, and wrap those functions in our python wrapper.
This breaks the old C API, but that's allowed since the API
is still experimental.
Some design decisions:
* I've wrapped the builder in a Mutex, so that we can continue
our FFI rule that we do not require non-Rust code to wrap `&mut`.
* I've removed the non-builder connect() function from the C API
as extraneous.
* I've made a single function to prepend elements to the search
path.
|
| | |
|
| |
|
|
|
|
|
|
|
| |
This commit covers the major points of the design:
Parsing the environment, parsing and resolving connect points,
connecting to Arti, and handling errors.
There are a few areas that need to be fixed,
all marked with XXXXs.
|
| |
|
|
| |
These are new in Rust 1.83.
|
| |
|
|
|
| |
Previously we implied that it was only for strings,
which isn't the case.
|
| | |
|
| |
|
|
|
| |
Arti has a MSRV of rust 1.77 which supports C string literals, so
'c_str_macro' isn't needed.
|
| |\
| |
| |
| |
| | |
artilib: Take a different approach to sealing a pair of traits.
See merge request tpo/core/arti!2472
|
| | |
| |
| |
| | |
This resolves a "TODO MSRV" comment.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Without this check, our socks code can enter an infinite loop
if a socket is closed at the wrong time.
Resolves TROVE-2024-011.
Fixes #1635.
|
| |/
|
|
|
|
|
|
| |
We now have a single type to represent the error
"A request that we made internally didn't get a result we expected."
The functions to generate these requests are now centralized too.
Closes #1587.
|
| |
|
|
|
|
| |
This is done so that we can make "not authenticated" a non-internal
error, under the theory that someday unauthenticated connections
might be exposed.
|
| |
|
|
|
| |
There's a blocking TODO here about exposing socks error codes that
I still need to solve.
|
| |
|
|
|
|
| |
Requires #1523.
Implements #1524.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Its underlying function previously took `&mut RpcHandle`,
which was an accident waiting to happen. Now it takes `&RpcHandle`
and includes a Mutex to prevent multiple threads from waiting for
updates on the same request ID at once.
As an alternative, we *could* try to update connimpl::Receiver to
allow multiple simultaneous listeners on the same request ID.
But that would (I think) require a lot more bookkeeping, and thus
would be a bit more error-prone.
Closes #1532.
|
| |
|
|
|
|
| |
(This function manipulates an ArtiRpcStatus;
and we try to have all of the ffi functions in this library
begin with "arti_rpc_".)
|
| |
|
|
|
| |
This API allows the caller to launch a request and then watch for
updates on it.
|
| |
|
|
|
|
|
|
| |
Previously, we had in_ptr_opt for functions that want to take
a nullable `*const T` without consuming it.
This is the equivalent for taking a nullable `*mut T` without
consuming it.
|
| |
|
|
|
|
|
|
| |
Previously, we had out_ptr_opt for functions that wanted to return a
newly allocated `ArtiRpcFoo` via a `struct ArtiRpcFoo **` argument.
But we didn't have a way to return non-allocated `int` via an `int
*` argument. This code provides that.
|
| |\
| |
| |
| |
| | |
Fix a pair of typos in an ffi comment.
See merge request tpo/core/arti!2310
|
| | | |
|
| | |
| |
| |
| | |
Closes #1501.
|
| |/
|
|
| |
(This is an errno or a GetLastError.)
|
| |
|
|
|
| |
Rust 1.70 (our MSRV) will not allow us to use a trait from a private
module in this way, unfortunately.
|
| | |
|
| | |
|
| | |
|
| | |
|