-
Notifications
You must be signed in to change notification settings - Fork 32
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
fix: fixing sdk merge #1564
Conversation
start: dapi_request.start.clone(), | ||
} | ||
.into()) | ||
//todo: transform this into PlatformVersionedTryFrom |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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.
6cad150
into
rs-sdk/merge-1.0-with-new-proto
Issue being fixed or feature implemented
What was done?
How Has This Been Tested?
Breaking Changes
Checklist:
For repository code-owners and collaborators only