Closed Drvi closed 2 years ago
Merging #15 (c0fc5c3) into master (95c669d) will increase coverage by
0.00%
. The diff coverage is96.42%
.:exclamation: Current head c0fc5c3 differs from pull request most recent head 92a6a37. Consider uploading reports for the commit 92a6a37 to get more accurate results
@@ Coverage Diff @@
## master #15 +/- ##
=======================================
Coverage 89.07% 89.07%
=======================================
Files 25 25
Lines 2754 2764 +10
=======================================
+ Hits 2453 2462 +9
- Misses 301 302 +1
Impacted Files | Coverage Δ | |
---|---|---|
src/parsing/proto_types.jl | 90.74% <66.66%> (-0.30%) |
:arrow_down: |
src/codec/encode.jl | 99.09% <100.00%> (+<0.01%) |
:arrow_up: |
src/codegen/toplevel_definitions.jl | 96.37% <100.00%> (ø) |
|
src/codegen/types.jl | 97.93% <100.00%> (+0.13%) |
:arrow_up: |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
Fixes #13.
When we translate messages to structs, those structs may be parametrized in one of two cases:
oneof
field and we generated the file withparametrize_oneofs=true
These parametrized structs may appear in
repeated
(Vector
) ormap
(Dict
) fields, but when there are multiple different parametrizations in one container, theeltype
/valtype
of these containers cannot be exactly resolved (typeof
such type would beUnionAll
, notDataType
).In an
encode
method which handles such containers, we used thesizeof
on theeltype
/valtype
to preallocate some space in a target buffer, butsizeof
fails, when the provided type is not complete (i.e. when it has missing params).Since the preallocation is not precise anyway, we now only use the first element of the container to estimate the size of the vector.