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

Give serialization derives a pair of eyes #127

Merged
merged 2 commits into from
May 11, 2022
Merged

Conversation

nagisa
Copy link
Collaborator

@nagisa nagisa commented May 9, 2022

Best viewed commit-by-commit.

This is in a way a test drive for near/nearcore#6596

nagisa added 2 commits May 9, 2022 16:14
This is a functionality that isn't being utilized. We're relying on
`rkyv` for (de-)serialization and storage-at-rest purposes. Users are
encouraged to store rkyv payloads inside their serde containers if they
need to do so.
Admittedly Rkyv{Des,S}erialize doesn't really read much better than
`rkyv::*` and it is made clearer that it is an external derive as per
nearcore#6596.
@nagisa nagisa requested review from Ekleog and matklad May 9, 2022 13:49
@matklad matklad requested review from mina86 and removed request for mina86 May 9, 2022 13:55
Copy link
Contributor

@matklad matklad left a comment

Choose a reason for hiding this comment

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

I wonder if we might now have some dead error variants somewhere? Quick ctrl+f didn't show up anything, but I wouldn't be surprised if we were wrapping up serde errors somewhere...

@nagisa
Copy link
Collaborator Author

nagisa commented May 11, 2022

A lot of error handling in wasmer can be summarized as “a lot of strings”, so it isn't inconceivable to me that there wouldn't be a separate error variant for this. Another reason I have to believe this is probably not the case is that there isn't actually anywhere in the code that utilizes serde to produce encodings. Users AFAIU were expected to do so externally (which makes sense).

@nagisa nagisa merged commit 3d24229 into near-main May 11, 2022
@nagisa nagisa deleted the nagisa/serialize branch May 11, 2022 17:41
@mina86
Copy link

mina86 commented May 11, 2022

I am deeply offended by this PR! It is preposterous that it was merged!

It should say ‘quartet of eyes’!

;)

@matklad
Copy link
Contributor

matklad commented May 11, 2022

@mina86 I added you review by accident, but, given that I've already distracted you, the context for this mistake is that we are debating whether doing similar treatment to nearcore would be a good idea, and I though you might have opinions here. See near/nearcore#6596 for ctx ::)

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.

3 participants