-
Notifications
You must be signed in to change notification settings - Fork 83
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
Simplify connection serialization from nodejs #749
Conversation
Codecov Report
@@ Coverage Diff @@
## main #749 +/- ##
==========================================
+ Coverage 47.27% 54.66% +7.38%
==========================================
Files 381 381
Lines 32908 37155 +4247
Branches 7052 8085 +1033
==========================================
+ Hits 15558 20310 +4752
+ Misses 12700 10892 -1808
- Partials 4650 5953 +1303
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
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.
Not related to the code itself, but rather to the base branch.
I think it would be best to merge #739 and merge this into main afterwards.
The current state of #739 behaves exactly the way main currently does. This PR changes that, which is why I think it deserves it's separate spot for code history's reasons.
ab86492
to
e6e7716
Compare
3a68c32
to
70fc9c7
Compare
… 22 hosts Signed-off-by: Patrik Stas <patrik.stas@absa.africa>
Signed-off-by: Patrik Stas <patrik.stas@absa.africa>
Signed-off-by: Patrik Stas <patrik.stas@absa.africa>
Signed-off-by: Patrik Stas <patrik.stas@absa.africa>
Signed-off-by: Patrik Stas <patrik.stas@absa.africa>
Signed-off-by: Patrik Stas <patrik.stas@absa.africa>
Signed-off-by: Patrik Stas <patrik.stas@absa.africa>
6309949
to
13fff79
Compare
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.
Looks good!
export interface IInitVCXOptions { | ||
libVCXPath?: string; | ||
} | ||
|
||
export interface ISerializedData<T> { |
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.
Note: we agreed to remove the assumptions this interface makes about the serialization format (i.e. containing source_id
, data
, version
or any other fields, but the assumption of it being a JSON will stay for now).
source_id
as part of constructed JS objects / TS classes, see changes in classVcxBase
source_id
. That led me to generalizing signature for its static method_deserialize
such the serialized data to be deserialized are simply a JSON object (expressed asRecord<string, unknown>
in TS) instead of previous more strict definitionobjData: ISerializedData<{ source_id: string }>
which couldn't acommodate different serialization format ofConnection
state machine.ISerializedData
, as this is expression of certain assumption as to how that serialized data looks like. The only thing which should be held by TS classes is the numeric rust handleConnection
serialization such that in serialized to (removing extradata
level in hierarchy, removes duplicated fieldsource_id
, removesversion
)Signed-off-by: Patrik Stas patrik.stas@absa.africa