| 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.
|
| |
|
|
|
|
|
|
|
|
|
| |
When the circ-padding feature is enabled, we use maybenot, which does
not yet support rand 0.10. In the meantime, enabling this feature pulls
in rand 0.9. This is not ideal, but should be okay as a temporary
situation.
This also replaces the use of ReseedingRng (which was removed in 0.10)
with the reseeding_rng crate. This is somewhat less performant, but it
should be okay.
|
| |
|
|
|
| |
Since we are no longer calling these types "streams" I've decided to
revert to the old name for this module.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
rustfmt doesn't like to touch things inside macros. These were
misformatted as a result, with long lines and in one case a missing
space.
|
| |
|
|
|
|
|
|
|
|
|
| |
Per discussion, it makes more sense to have the API be one
that gets called when our IO interests change.
Additionally, this commit removes the try_reading and try_writing
booleans, as previously discussed.
I've left a couple of XXXX comments where more documentation or
thought is likely needed.
|
| |
|
|
|
|
|
| |
This API provides the necessary functionality to use an RpcConn
inside a poll-like event loop.
This is part of #1856.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
This commit finally adds a `RpcConn::submit()` method to send a
request without having to wait on it specifically, and an
`RpcConn::wait()` method to wait for the next response from _any_
such request.
Thanks to the previous patches, this is relatively simple!
This is part of #1856.
|
| |
|
|
|
|
| |
In order to implement tagged pollable requests, we need a separate
response queue for them, and we need to dispatch requests to that
queue as appropriate.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
| |
All the tests still pass!
|
| |
|
|
|
| |
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.
|
| |
|
|
| |
Run maint/add_warning
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
| |
- The Rng::gen() functions have been renamed to Rng::random().
|
| |
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
In general, we try to obey the convention that an error's Display
method does not display that error's sources.
Part of #1650.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes #1831.
I'm doing this because switching from the socketpair crate to an
ersatz connect-to-localhost socketpair made the test pass.
My windows skills are weak, but it appears possible that you aren't
supposed to simultaneously have a blocking ReadFile and a blocking
WriteFile to a named pipe from separate threads? At least, that's
consistent with our findings in !2758.
I first saw this hack in perl, when I needed it in 2003.
I am displeased that it is still apparently needed in 2025.
|
| |
|
|
| |
This was the slowest test in our suite.
|
| | |
|
| | |
|
| |
|
|
|
| |
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.
|
| |
|
|
|
|
| |
It looks like !2729 and !2722 raced with each other, because we're still
using the old name for `EmptyReply` (and so `arti-rpc-client-core`
doesn't currently compile on `main`).
|
| |\
| |
| |
| |
| |
| |
| | |
rpc: Implement request cancellation
Closes #818
See merge request tpo/core/arti!2722
|
| | |
| |
| |
| |
| |
| |
| | |
I hope that this limitation is acceptable;
the alternative involves some significant refactoring to give
Request a Weak reference to RpcConn -- but RpcConn isn't currently
kept in an Arc<> at all, and so we'd need some fairly heavy hacking.
|
| | | |
|
| |/
|
|
|
|
|
|
| |
Our now convention here in rpclib is that a struct holding a
request's parameters is called `FooParams`, and a struct holding
that request's reply is called `FooReply`.
Closes #1586
|
| |
|
|
|
|
| |
Previously we never released the intermediary cookie-auth object,
which would have left it kicking around on the RPC server side
until we finally closed our connection.
|
| | |
|
| |
|
|
| |
Closes #1753
|
| | |
|
| |
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| | |
|
| |
|
| |
Co-authored-by: gabi-250 <[email protected]>
|
| |
|
|
|
|
|
|
| |
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 about DataStreams, so we should make it less confusing.
This commit is _just_ about the file renaming, with no associated
function renaming.)
|
| |
|
|
|
| |
There's a blocking TODO here about exposing socks error codes that
I still need to solve.
|
| |
|
|
|
|
| |
Requires #1523.
Implements #1524.
|