<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/arti.git/crates/arti-rpc-client-core/src/msgs, branch arti-v1.2.8</title>
<subtitle>mirror of https://gitlab.torproject.org/tpo/core/arti
</subtitle>
<id>http://git.dilluti0n.com/mirrors/arti.git/atom?h=arti-v1.2.8</id>
<link rel='self' href='http://git.dilluti0n.com/mirrors/arti.git/atom?h=arti-v1.2.8'/>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/'/>
<updated>2024-08-07T12:21:28Z</updated>
<entry>
<title>rpclib: Rename ParsedRequest to ParsedRequestFields</title>
<updated>2024-08-07T12:21:28Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2024-08-06T14:07:07Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=c05d234ced1e126ae975314484dd409c98f2f983'/>
<id>urn:sha1:c05d234ced1e126ae975314484dd409c98f2f983</id>
<content type='text'>
This name change should emphasize that the (module-private)
`ParsedRequestFields` type is only for parsing, and we aren't
supposed to actually construct them for our own requests.

With this change, and the others on the branch, there's no longer a
risk of trying to serialize a ParsedRequestFields (since it doesn't
implement Serialize), or to deserialize a Request (since it doesn't
implement Deserialize).

Closes #1511.
</content>
</entry>
<entry>
<title>rpclib: Use JsonValue to re-encode requests.</title>
<updated>2024-08-07T12:21:28Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2024-08-06T14:02:55Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=46c06e389ff71f819751001b916f509689acab4a'/>
<id>urn:sha1:46c06e389ff71f819751001b916f509689acab4a</id>
<content type='text'>
As with responses, we previously used a strategy that could have
failed in the future, if we forgot to add an "unexpected_fields"
member to one of our structs.

Closes #1512.
</content>
</entry>
<entry>
<title>rpclib: Unify error type for ValidatedRequest failure.</title>
<updated>2024-08-07T12:21:28Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2024-08-06T13:05:02Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=5756400a33f1a4e35d676aaa90bad69ac34aaab2'/>
<id>urn:sha1:5756400a33f1a4e35d676aaa90bad69ac34aaab2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>rpclib: Refactor request canonicalization</title>
<updated>2024-08-07T12:21:28Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2024-08-06T12:50:24Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=2eaa2dc0c902411b83365e9e2f11da268f98a8fd'/>
<id>urn:sha1:2eaa2dc0c902411b83365e9e2f11da268f98a8fd</id>
<content type='text'>
This lets us make a couple of types module-private,
and prepares the way for using the serde_json::Value trick on
requests too.
</content>
</entry>
<entry>
<title>rpclib: Ensure that re-encoded responses end with NL</title>
<updated>2024-08-07T12:21:28Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2024-08-06T12:33:19Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=97efbdb6f305e6fa2158777a3f9171861a145961'/>
<id>urn:sha1:97efbdb6f305e6fa2158777a3f9171861a145961</id>
<content type='text'>
</content>
</entry>
<entry>
<title>rpclib: Use JsonValue to re-encode responses</title>
<updated>2024-08-07T12:21:28Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2024-08-06T12:06:27Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=8e3d728e08588e485146d8e14854622659d77ee3'/>
<id>urn:sha1:8e3d728e08588e485146d8e14854622659d77ee3</id>
<content type='text'>
This approach keeps the property that we still preserve any
unrecognized fields, but takes a different approach.  Instead of
using our own `structs` to round-trip the json, we use a
`serde_json::Value`, to ensure that we cannot forget to add the
`unexpected_fields` element to a struct.
</content>
</entry>
<entry>
<title>Merge branch 'rpc-reencoding' into 'main'</title>
<updated>2024-08-05T18:07:58Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2024-08-05T18:07:58Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=32d95e1c99843f598afbfb85e30885d6bc2182fe'/>
<id>urn:sha1:32d95e1c99843f598afbfb85e30885d6bc2182fe</id>
<content type='text'>
rpc-client-core: Always re-encode requests and responses, and preserve unrecognized struct fields.

Closes #1491

See merge request tpo/core/arti!2312</content>
</entry>
<entry>
<title>rpclib: Apply serde(default) to RpcMeta::updates.</title>
<updated>2024-08-05T16:54:44Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2024-08-05T16:54:44Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=2e5172690103cb9b60310fcdadfe441c01ca4a19'/>
<id>urn:sha1:2e5172690103cb9b60310fcdadfe441c01ca4a19</id>
<content type='text'>
This enable a `meta` object to have no `updates` field set.
</content>
</entry>
<entry>
<title>rpclib: re-encode responses from arti, and preserve fields.</title>
<updated>2024-08-04T18:14:48Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2024-08-04T18:14:48Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=c611e138941342e3655bbb1ace50a963ab730bc9'/>
<id>urn:sha1:c611e138941342e3655bbb1ace50a963ab730bc9</id>
<content type='text'>
We want to re-encode responses to avoid possible mismatch between
how arti-rpc-client-core parses messages and how the user application
parses messages.  (In theory this shouldn't be necessary so long as
arti-rpc-client-core and arti have the same json implementation,
and arti-rpc-client-core is only used for talking to arti.
But those assumptions might change in the future.)

Closes #1491.

We want to preserve fields so that, if Arti adds any new elements
to response or error in the future, and the client knows about them,
they won't be lost simply because arti-rpc-client-core hasn't heard
of them.
</content>
</entry>
<entry>
<title>rpclib: preserve unrecognized request fields</title>
<updated>2024-08-04T14:36:28Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2024-08-04T14:36:28Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=ffba394c4e2df46f2a7130251b20b32df44f04e7'/>
<id>urn:sha1:ffba394c4e2df46f2a7130251b20b32df44f04e7</id>
<content type='text'>
When writing a request, we want to keep any fields that we don't
recognize, in case the application (and arti) know about some
field that we haven't heard of.
</content>
</entry>
</feed>
