Conversation
|
|
||
| impl Client { | ||
| /// Connect to a gRPC server and create a new Client instance. | ||
| #[allow(clippy::result_large_err)] |
There was a problem hiding this comment.
Why is this lint here?
| /// Proto checkpoint summary. Use `response.summary()?.summary()` to convert | ||
| /// to SDK type. | ||
| pub summary: Option<iota_grpc_types::v1::checkpoint::CheckpointSummary>, | ||
| /// Proto validator signature. Use `response.signature()?.signature()` to |
There was a problem hiding this comment.
This is a bit awkward. Why not have a summary and summary_grpc or something?
| /// ``` | ||
| pub async fn get_objects( | ||
| &self, | ||
| refs: &[(ObjectId, Option<Version>)], |
There was a problem hiding this comment.
Since the most common use-case is to use None for version always, shouldn't we have a function that skips that and accepts a list of only object IDs?
There was a problem hiding this comment.
But then we would increase the API surface by another function. What if you want to make a batch call and for some you want the version, and for others not. I would prefer to leave it like it is if you don't mind.
There was a problem hiding this comment.
I really think the most likely use-case is to call this with no versions
thibault-martinez
left a comment
There was a problem hiding this comment.
Please add a workflow to check that grpc has been generated
18c4f0c to
72acef8
Compare
| authors = ["IOTA Foundation <[email protected]>"] | ||
| edition = "2024" | ||
| license = "Apache-2.0" | ||
| publish = false |
There was a problem hiding this comment.
We want to publish it in the future?
| publish = false |
Same for the grpc types
| - name: Run Cargo Udeps | ||
| run: cargo +nightly udeps ${{ matrix.flags }} | ||
|
|
||
| proto-build: |
There was a problem hiding this comment.
Any other checks that would make sense to run in the CI? Are the e2e tests only in the iota repo for now?
| } | ||
|
|
||
| pub fn add_field_path(&mut self, path: &str) -> &mut Self { | ||
| if self.wildcard || !is_valid_path(path) { |
There was a problem hiding this comment.
Don't want to return an error (Result) if it's not a valid path?
Description of change
This PR moves the
iota-grpc-types,iota-grpc-clientand theiota-proto-buildcrates from the monorepository to the iota-rust-sdk.Should be rebased and merged after #1061
How the change has been tested