32bit support - #275
Open
samysweb wants to merge 9 commits into
Open
Conversation
32-bit system file buffers still have a 64 bit position; PipeBuffer positions are 32 bit (together with UInt32 this yields UInt32), but can be silently lifted to 64 bits. This only affects the message_done check in Codecs.jl in line 20, but comparison between (U)Int32 and Int64 still works fine...
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #275 +/- ##
=======================================
Coverage 93.98% 93.99%
=======================================
Files 25 25
Lines 3011 3012 +1
=======================================
+ Hits 2830 2831 +1
Misses 181 181 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Author
|
As expected, the two failing tests concern nightly for x86, note that the two failing tests have swapped expectations: I.e. |
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.
This pull request intends to make ProtoBuf.jl and its CI compatible to 32-bit architectures (x86).
For CI I tried to run ProtoBuf.jl on a 32-bit system and noticed a bug due to the way
LengthDelimitedProtoDecoderimplementsendpos:Intis platform-dependent in Julia, and hence this corresponds toInt32in 32-bit systems.Conversely, IOBuffer (what my test uses) uniformly returns
Int64for position independently of the platform.This issue also becomes visible when activating the CI of ProtoBuf.jl for x86 although for a different reason (UInt32 not converted into Int32).
I propose to uniformly use
Int64as an endmarker and to perform explicit conversion (see suggested changes toCodecs.jlanddecode.jl.I've also updated the tests in
test_protojl.jlto make the choice of Integer type explicit (which is lateron checked) and to account for the fewer allocations on x86 systems intest_perf.jl.With these changes, the CI now runs flawlessly everywhere except for x86 Julia nightly.
Where a Dict seems to be encoded in the opposite order for Julia Nightly on x86 (?).
Note that two tests fail and that expected/observed outputs are swapped between the two tests...
I am open to fixing this remaining bug, but would require your guidance on whether this is an implementation bug or a limitation of the current test?