francoispqt / gojay

high performance JSON encoder/decoder with stream API for Golang
MIT License
2.11k stars 113 forks source link

Failing unit tests on i686 architecture (RISC-V): constant ... overflows int #173

Open Hellseher opened 3 months ago

Hellseher commented 3 months ago

Hi,

During package review requiring to update Kubo (IPfs) in Guix, I've faced with an issue when I try to build github.com/francoispqt/gojay@1.2.13 on i686-linux machine:

# github.com/francoispqt/gojay [github.com/francoispqt/gojay.test]
src/github.com/francoispqt/gojay/decode_array_test.go:32:43: constant 43567788543 overflows int
src/github.com/francoispqt/gojay/decode_array_test.go:37:43: constant 43567788543 overflows int
src/github.com/francoispqt/gojay/decode_array_test.go:53:43: constant 43567788543 overflows int
src/github.com/francoispqt/gojay/decode_array_test.go:58:43: constant 43567788543 overflows int
src/github.com/francoispqt/gojay/decode_array_test.go:65:43: constant 43567788543 overflows int
src/github.com/francoispqt/gojay/decode_number_int_test.go:71:4: constant 9223372036854775807 overflows int
src/github.com/francoispqt/gojay/decode_number_int_test.go:139:4: constant 50100000000 overflows int
src/github.com/francoispqt/gojay/decode_number_int_test.go:373:4: constant 9223372036854775807 overflows int
src/github.com/francoispqt/gojay/decode_number_int_test.go:441:4: constant 50100000000 overflows int
src/github.com/francoispqt/gojay/encode_number_test.go:32:16: constant 9223372036854775807 overflows int
src/github.com/francoispqt/gojay/encode_number_test.go:32:16: too many errors
FAIL    github.com/francoispqt/gojay [build failed]
FAIL

To reproduce the issue:

guix time-machine --commit=42b4580f6bfcaab009a56e679bd6f3c408ef03c9 -- \
    build --system=i686-linux go-github-com-francoispqt-gojay

Thanks, Oleg