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

implement binary packed repeated encoding #145

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wuzzeb
Copy link
Contributor

@wuzzeb wuzzeb commented Feb 27, 2019

There is a bug with the current repeated encoding: it skips default values. Say you have a ResizeArray with [1, 2, 3, 0, 4]. The writeRepeated will call froto.Encoding.fromVarint which ignores writing default values, in particular the 0 will not be written. Froto.Encoding has fromRequired versions of each, so I first started fixing the bug by changing the code to call froto.Encoding.fromRequiredVarint and similar for primitive repeated fields. But then I realized froto also has some packed encoding helpers but they couldn't be used directly because froto uses a list type instead of seq or resizearray. Therefore, I use some of the WireFormat.Pack utilities and recreate the packed primitive fields.

Unfortunately, I can't get the build working on my laptop (Linux), paket is giving me some errors. So we will see what the CI server says about the build. If it fails, I will have to look into getting paket working...

@7sharp9
Copy link
Contributor

7sharp9 commented Feb 28, 2019

@wuzzeb Looks like the CI failed, although azure is down right now so I cant see the failure 🤦‍♂️

@7sharp9
Copy link
Contributor

7sharp9 commented Mar 5, 2019

These are the errors:

D:\a\1\s\src\Falanx.Proto.Codec.Binary\Codec.fs(28,5): error FS0010: Incomplete structured construct at or before this point in type definition 

[D:\a\1\s\src\Falanx.Proto.Codec.Binary\Falanx.Proto.Codec.Binary.fsproj] [D:\a\1\s\build.proj]
         D:\a\1\s\src\Falanx.Proto.Codec.Binary\Codec.fs(40,21): error FS0010: Unexpected symbol '=' in member definition [D:\a\1\s\src\Falanx.Proto.Codec.Binary\Falanx.Proto.Codec.Binary.fsproj] [D:\a\1\s\build.proj]

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.

2 participants