These 45 commits are when the Protocol Buffers files have changed:
| Commit: | e0973cc | |
|---|---|---|
| Author: | menduz | |
| Committer: | GitHub | |
Pass all conformance tests for proto3 (#171)
| Commit: | 81959a3 | |
|---|---|---|
| Author: | menduz | |
| Committer: | GitHub | |
Add protocolbuffers' conformance tests runner (Part 1 of 2) (#170) * make sure to run benchmarks in the CI, update benchmarks to latest zig version * build conformance runner and runee, add github action and update build_utils to make it work * add generated code and failing_tests.txt to keep track of failures * try mlugg/setup-zig * try building root package before benchmark and conformance directories
| Commit: | 4661d0b | |
|---|---|---|
| Author: | menduz | |
update generator to emit correct recursive fields, preserve unknowns and enum aliases
| Commit: | 3aa181a | |
|---|---|---|
| Author: | menduz | |
fix all conformance tests
| Commit: | 6ae4f6e | |
|---|---|---|
| Author: | menduz | |
build conformance runner and runee, add github action and update build_utils to make it work
| Commit: | 5054e15 | |
|---|---|---|
| Author: | menduz | |
add runner
| Commit: | ab9eae6 | |
|---|---|---|
| Author: | menduz | |
issue #156 repro case
| Commit: | c3f8fdc | |
|---|---|---|
| Author: | Francesco Gualazzi | |
| Committer: | GitHub | |
Service and RPC generation (#149) * generate RPC and Services Signed-off-by: inge4pres <fgualazzi@gmail.com> * tests: generate RPC and Services Signed-off-by: inge4pres <fgualazzi@gmail.com> * service-gen: user-provided errors Signed-off-by: inge4pres <fgualazzi@gmail.com> * refactor: helper to refer to errors Signed-off-by: inge4pres <fgualazzi@gmail.com> * latest zig updates to Io API Signed-off-by: inge4pres <fgualazzi@gmail.com> * refactor: enable user-provided ErrorSet and UserDataType for generated services Signed-off-by: inge4pres <fgualazzi@gmail.com> * docs: improve service usage Signed-off-by: inge4pres <fgualazzi@gmail.com> * chore: remove unused code Signed-off-by: inge4pres <fgualazzi@gmail.com> * chore: syntax fix for 0.16.0-dev.2187 Signed-off-by: inge4pres <fgualazzi@gmail.com> --------- Signed-off-by: inge4pres <fgualazzi@gmail.com> Co-authored-by: menduz <github@menduz.com>
| Commit: | 9e3049e | |
|---|---|---|
| Author: | inge4pres | |
| Committer: | inge4pres | |
tests: generate RPC and Services Signed-off-by: inge4pres <fgualazzi@gmail.com>
| Commit: | 89afe70 | |
|---|---|---|
| Author: | Arwalk | |
| Committer: | Arwalk | |
test(generator): added a proto file without package name. This does not compile on purpose.
| Commit: | 0a08d0c | |
|---|---|---|
| Author: | Arwalk | |
| Committer: | Arwalk | |
demo when merging
| Commit: | 0c69509 | |
|---|---|---|
| Author: | inge4pres | |
| Committer: | Arwalk | |
fix: support types with 100+ fields This commit fixes two compilation issues that occur when using zig-protobuf with complex types (e.g., Kubernetes resources): 1. Evaluation exceeds 1000 backwards branches - Added @setEvalBranchQuota(1000000) in parse() function - Complex types with many fields exceeded default branch limit during compile-time field name comparison 2. Cannot assign to constant in to_camel_case() - Changed from mutating camel_cased_string[0] (illegal for const) - to creating a new string with lowercase first character - Fixes 'cannot assign to constant' error Signed-off-by: inge4pres <fgualazzi@gmail.com>
The documentation is generated from this commit.
| Commit: | 4172b7b | |
|---|---|---|
| Author: | Arwalk | |
| Committer: | Arwalk | |
test(generator): added a proto file without package name. This does not compile on purpose.
| Commit: | 6aaf06e | |
|---|---|---|
| Author: | mochalins | |
| Committer: | Arwalk | |
test: Add root namespace tests Signed-off-by: Arwalk <SirAgentProvocateurArwalk@gmail.com>
| Commit: | 472d7dc | |
|---|---|---|
| Author: | Arwalk | |
| Committer: | GitHub | |
Add basic benchmarking (#135) * working benchmarks * moved them to a separate build * moved benchmark to load a pregenerated test file, moved generation of said file to another program * benchmark depends on test * let zbench decide on the iterations * make dataset generation parameterized * fixing benchmarks * removed transitive dependency to zbench, downloading it in .zig-cache * better error messages on missing data for benchmark * moved benchmark in separate build file * Update benchmark/benchmarks.zig Co-authored-by: menduz <github@menduz.com> * using a build.zig.zon file and putting everything into a util directory * fixing root build.zig.zon --------- Co-authored-by: menduz <github@menduz.com>
| Commit: | 02a94ea | |
|---|---|---|
| Author: | mochalins | |
| Committer: | Arwalk | |
test: Add root namespace tests Signed-off-by: Arwalk <SirAgentProvocateurArwalk@gmail.com>
| Commit: | 020a5cc | |
|---|---|---|
| Author: | Arwalk | |
| Committer: | Arwalk | |
moved benchmark to load a pregenerated test file, moved generation of said file to another program
| Commit: | 895ee04 | |
|---|---|---|
| Author: | Arwalk | |
| Committer: | Arwalk | |
test: Added oneof example with a field name that needs to be escaped. This does not compile.
| Commit: | c5c519c | |
|---|---|---|
| Author: | Arwalk | |
| Committer: | Arwalk | |
moved benchmark to load a pregenerated test file, moved generation of said file to another program
| Commit: | 91b7c9a | |
|---|---|---|
| Author: | Arwalk | |
| Committer: | Arwalk | |
moved benchmark to load a pregenerated test file, moved generation of said file to another program
| Commit: | 0be1265 | |
|---|---|---|
| Author: | Arwalk | |
| Committer: | Arwalk | |
test: Added oneof example with a field name that needs to be escaped. This does not compile.
| Commit: | 9759d00 | |
|---|---|---|
| Author: | mochalins | |
| Committer: | Arwalk | |
test: Add root namespace tests Signed-off-by: Arwalk <SirAgentProvocateurArwalk@gmail.com>
| Commit: | a361556 | |
|---|---|---|
| Author: | Arwalk | |
| Committer: | Arwalk | |
moved benchmark to load a pregenerated test file, moved generation of said file to another program
| Commit: | 15ca5ea | |
|---|---|---|
| Author: | Arwalk | |
| Committer: | Arwalk | |
moved benchmark to load a pregenerated test file, moved generation of said file to another program
| Commit: | 51e0071 | |
|---|---|---|
| Author: | Arwalk | |
| Committer: | Arwalk | |
test: Added oneof example with a field name that needs to be escaped. This does not compile.
| Commit: | d70621a | |
|---|---|---|
| Author: | mochalins | |
| Committer: | Arwalk | |
test: Add root namespace tests Signed-off-by: Arwalk <SirAgentProvocateurArwalk@gmail.com>
| Commit: | 79f506d | |
|---|---|---|
| Author: | mochalins | |
| Committer: | Arwalk | |
feat: Remove `init` from generated messages
| Commit: | 5462d92 | |
|---|---|---|
| Author: | mochalins | |
| Committer: | Arwalk | |
test: Add root namespace tests Signed-off-by: Arwalk <SirAgentProvocateurArwalk@gmail.com>
| Commit: | 38faf0d | |
|---|---|---|
| Author: | mochalins | |
| Committer: | Arwalk | |
feat: Remove `init` from generated messages
| Commit: | 9c47a15 | |
|---|---|---|
| Author: | Arwalk | |
| Committer: | Arwalk | |
moved benchmark to load a pregenerated test file, moved generation of said file to another program
| Commit: | 37591ae | |
|---|---|---|
| Author: | Arwalk | |
| Committer: | GitHub | |
69 Self referential types in `oneOf` results in error (#73) * showing it doesnt work even without oneof * WIP * encoding is working * better identification of a managed struct * deinit with managed works * decoding done * zig fmt pass * some cleanup and comments. * if as an expression is cleaner. * Code generator now handles the case of self referential structures. * Decoding context replaced by 2 methods * inlined internal_append * renamed getTarget to getPointer. made equivalent getValue. * zig fmt + added some comments
| Commit: | 42ccf14 | |
|---|---|---|
| Author: | Arwalk | |
| Committer: | GitHub | |
Fix integer encoding (#86) * ensure int32 is always encoded on the same varint size than the rest. Ensure it is also properly decoded. * updated and added tests * encoding zigzag is ok * decoding zigzag is ok. * formatting + activating assertions on msg-long.proto
| Commit: | 57a0ebe | |
|---|---|---|
| Author: | Arwalk | |
| Committer: | GitHub | |
Helping the compiler realize that there is only one kind of error on the encoding path. (#85)
| Commit: | 9619cfe | |
|---|---|---|
| Author: | Arwalk | |
| Committer: | GitHub | |
#74 `dupe()` methods fail to compile (#75) * reproducing the issue * dupe can only make allocator errors, and this was hard to handle for the compiler.
| Commit: | f03003e | |
|---|---|---|
| Author: | kantai-chris | |
| Committer: | GitHub | |
fix: memory leak when decoding Lists of Bytes (#68) * fix: memory leak when decoding Lists of Bytes Messages that include a `repeated` field of type `bytes` are not properly freed due to a missing condition `deinit_field()` which only cares for list of other message types or strings, but not bytes. This commit introduces a new unit test that fails if decoding a message with a list of bytes leaks and fix, that makes the unit test pass. * refactor: use switch instead of if condition In `deinit_field()` we previously used an if condition that checked for different types within a list, but unfortunately this check was not exhaustive. By replacing this check with an switch statement, we now make sure that we have to handle all possible cases, otherwise we'll get a compiler error.
| Commit: | 9115a73 | |
|---|---|---|
| Author: | Libro | |
| Committer: | GitHub | |
JSON (de)serialization (#49) * Json (de)serialization (w/o string fields support) ... Since this project uses ManagedString structs (instead of []const u8), I also need to add jsonParse/jsonStringify method for it * ManagedString support for json (de)serialization * more tests * More tests * Less repetitions * Additional comments for jsonParse/jsonStringify * List detection refactor ... Previously it was made by expecting the type name to be "ArrayListAligned" which was not good since user-defined message could have the same name as built-in ArrayList() struct. * Oneof tests * feat: generated structs' comparison function ... The problem is that std.meta.eql can't properly compare all types (e.g. if struct contains pointer it just compares pointer value itself - that's how it compares ArrayLists). With this "ultimate comparer" function tests looks more clean and less - although the function itself is not that simple and might some tests :) Maybe it'll be useful somewhere outside tests_json.zig (e.g. in other tests) * parseFromSliceLeaky -> parseFromSlice * added test for bytes * added bytes type for differenciation * generator on par with the rest now * decode base64 done * encode base64 done * formatting * WIP: Make JSON tests to fail for a moment ... There was no camelCase conversion for field names (protobuf spec requires us to make it) - how test suite is valid and tests fail as expected * WIP: camelCase field name conversion (some tests still fail) ... Struct field names are being converted as needed but not unions' active tag * WIP: Union support (current JSON tests are passing, need more) * WIP(json): and FieldType are handled explicitly ... In the future there will be new types added (Timestamp, Duration etc.) and when they will be added out JSON parser will break on its (de)serialization - previously these fields would be silently parsed via std.json internal code * Bytes tests are now with the new structure (others are coming) * OneofContainer tests with new project structure * feat(json): NaN/Infinity support + tests for it * typo fix Co-authored-by: James Callahan <35791147+james-callahan@users.noreply.github.com> * typo fix * No temporary allocation for base 64 + removed FieldCollision * formatting * camelCase conversion in comptime ... PR workflow should pass now * Test refactor * Test refactor * Get rid of unnecessary imports * Some test TODOs to make * proper order of operation for base64 encoding. * WIP: Added tests that were expected to fail * Tests for oneof=.Bytes (fails as expected) * Tests for repeated NaNs/infs * fix(json): Proper bytes and numeric serialization ... Not single bytes/numeric fields supported now, but also repeated ones and oneofs * fix(json): Proper bytes and numeric serialization ... Looks like all types are being handled correctly whether it's single/repeated/oneof field (need more tests for sure) * Test for integer/float fields (string->numeric conversion) * Oops ... Forgot to commit these files * .gitattributes added (probably will fix workflow on Windows) * Now gitattributes really applies to JSON files --------- Co-authored-by: Arwalk <siragentprovocateurarwalk@gmail.com> Co-authored-by: James Callahan <35791147+james-callahan@users.noreply.github.com>
| Commit: | d6a9dc3 | |
|---|---|---|
| Author: | menduz | |
| Committer: | GitHub | |
Self contained protoc (#4) * wip * fix ci * readme * fix action * fix windows * better readme * fix windows * canonicalize paths
| Commit: | 9be0f97 | |
|---|---|---|
| Author: | menduz | |
| Committer: | GitHub | |
bootstraps the generator plugin and compiles the plugin with its own … (#17) * bootstraps the generator plugin and compiles the plugin with its own output (#1) * go generating the whole ProtoDescriptor files * compiling * rename * plugin.proto parsed * initial code generation working * wip bootstrap * auto-format * almost there * resolve imports * correct paths for imports * about to pull the trigger * it was bootstrapped * remove go dependency * delete old files * fix fixed ints * fail CI on test error * install protoc in CI * install protoc in CI * install protoc in CI as sudo * full ci pipeline * install zig in CI * bootstrapping CI also generates tests now * protoc only installed on linux + bootstrap CI * remove extra arg from fd() * add tests * mapbox demo working * proto3 optional * packed lists * some better error handling * add more tests * add tests, use mixins, handle maps * feat: re-enable oneof unions and add tests. fix encoding for default packed types * apply suggestions from code review * re-enable some previously failing code-generation cases * feat: default values for init() and decode(), remove optionals
| Commit: | 1404418 | |
|---|---|---|
| Author: | menduz | |
feat: default values for init() and decode(), remove optionals
| Commit: | 0fb441a | |
|---|---|---|
| Author: | menduz | |
re-enable some previously failing code-generation cases
| Commit: | df92af4 | |
|---|---|---|
| Author: | menduz | |
feat: re-enable oneof unions and add tests. fix encoding for default packed types
| Commit: | a86f7d8 | |
|---|---|---|
| Author: | menduz | |
add tests, use mixins, handle maps
| Commit: | fcdea44 | |
|---|---|---|
| Author: | menduz | |
| Committer: | menduz | |
bootstraps the generator plugin and compiles the plugin with its own output (#1) * go generating the whole ProtoDescriptor files * compiling * rename * plugin.proto parsed * initial code generation working * wip bootstrap * auto-format * almost there * resolve imports * correct paths for imports * about to pull the trigger * it was bootstrapped * remove go dependency * delete old files * fix fixed ints * fail CI on test error * install protoc in CI * install protoc in CI * install protoc in CI as sudo * full ci pipeline * install zig in CI * bootstrapping CI also generates tests now * protoc only installed on linux + bootstrap CI * remove extra arg from fd() * add tests * mapbox demo working * proto3 optional * packed lists * some better error handling * add more tests
| Commit: | 21bb806 | |
|---|---|---|
| Author: | Arwalk | |
Varints done
| Commit: | da57f98 | |
|---|---|---|
| Author: | Arwalk | |
Generator using go is proof concept-tier. FixedSize test was remade by generating the fixedsizes.pb.zig file and porting the test code.