Conversation
jangko
reviewed
Feb 16, 2023
arnetheduck
reviewed
Feb 16, 2023
arnetheduck
reviewed
Feb 16, 2023
Menduist
reviewed
Feb 16, 2023
Menduist
reviewed
Feb 16, 2023
Menduist
reviewed
Feb 16, 2023
Menduist
reviewed
Feb 16, 2023
Menduist
reviewed
Feb 17, 2023
Menduist
reviewed
Feb 17, 2023
Menduist
reviewed
Feb 17, 2023
arnetheduck
reviewed
Feb 21, 2023
| else: | ||
| static: doAssert ProtoType is SomeFixed64 | ||
| ProtoType.SomeFixed64 | ||
| WireKind.Fixed64 |
Member
There was a problem hiding this comment.
the assert here should remain
arnetheduck
reviewed
Feb 21, 2023
| stream.readFieldPackedInto(fieldVar, header, ProtoType) | ||
| else: | ||
| stream.readFieldInto(fieldVar, header, ProtoType) | ||
| elif ProtoType is ref and defined(ConformanceTest): |
Member
There was a problem hiding this comment.
why does the conformance test need this? there are no ref semantics in protobuf afair
Contributor
Author
There was a problem hiding this comment.
Because some tests are recursive (using this message for example). And without using a reference, nim loops, until it crashes, trying to compile it. A (better?) alternative could be to use a PBOption in case of recursive messages.
Collaborator
There was a problem hiding this comment.
Won't work:
import stew/results
type
A = object
b: Opt[B]
B = object
a: Opt[A]test.nim(3, 3) Error: illegal recursion in type 'A'
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Using the conformance_test_runner from https://github.com/protocolbuffers/protobuf
This PR adds several things in order to make the test executable, such as
Currently, there's a lot of tests that fail mainly because of #40 which has not been merged yet (writing all-defaults proto3 object fields creates a lot of error, for example)