Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fixing sdk merge #1564

Merged
merged 14 commits into from
Nov 6, 2023

Conversation

QuantumExplorer
Copy link
Contributor

Issue being fixed or feature implemented

What was done?

How Has This Been Tested?

Breaking Changes

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have added "!" to the title and described breaking changes in the corresponding section if my code contains any
  • I have made corresponding changes to the documentation if needed

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

start: dapi_request.start.clone(),
}
.into())
//todo: transform this into PlatformVersionedTryFrom
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

You don't need specialized trait like PlatformVersionedTryFrom if you convert from specialized struct into more generic one (eg. from GetDocumentsRequestV0 to GetDocumentsRequest). There is no point where we could use version info in this conversion.

And, thanks to strong typing, I don't see any use of PlatformVersionedTryFrom when going from generalized to specialized (GetDocumentsRequest -> GetDocumentsRequestV0). If we use impl TryFrom<GetDocumentsRequest> for GetDocumentsRequestV0, the compiler will imply expected version based on the context in which you use this.

(This comment only applies to dapi-grpc types, night be different in drive/dpp internals)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PlatformVersionedTryFrom does not go from GetDocumentsRequest to GetDocumentsRequestV0, it is for conversion to a versioned structure based on the PlatformVersion. So when I say we should use PlatformVersionedTryFrom, it is so we know exactly what GetDocumentsRequest to use based on the platform version we provide.

@QuantumExplorer QuantumExplorer merged commit 6cad150 into rs-sdk/merge-1.0-with-new-proto Nov 6, 2023
2 checks passed
@QuantumExplorer QuantumExplorer deleted the fix/fixingSDKMerge branch November 6, 2023 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants