Doctests fail on some architectures (i686, s390x)
I am packaging byteyarn for Fedora because it is a dependency of gitoxide. When running doctests on i686 and s390x machines, most doctests fail. See:
- https://kojipkgs.fedoraproject.org//work/tasks/7659/107107659/build.log
- https://kojipkgs.fedoraproject.org//work/tasks/7663/107107663/build.log
There are assertion fails:
assertion `left == right` failed
left: 3242591731706757321
right: 9
But more importantly there are tests that just straight up crash with a Test executable failed (signal: 11 (SIGSEGV) (core dumped)).
Looking at the code (e.g. this function), it appears that the you assume the byte order. This however cannot work if the byte order is reversed (little endian vs big endian).
Maybe these targets could also be tested on CI to prevent future regression.
This looks like 32-bit support doesn't work quite right. I do not have a way to test 32-bit support, so I can't fix it without someone providing that. I would like to support 32-bit correctly, though.
I do not care at all for big-endian. If someone writes a patch and provides me a way to keep it not-broken in CI, I would be ok with that. I would also be OK with a patch that turns RawYarn into a thin wrapper over Box<[u8]> in BE mode. I doubt anyone will care about that.