flyingmutant / rapid

Rapid is a modern Go property-based testing library
https://pkg.go.dev/pgregory.net/rapid
Mozilla Public License 2.0
579 stars 25 forks source link

Tests failed on go-1.21 #68

Closed Hellseher closed 1 month ago

Hellseher commented 1 month ago

Hi,

During refreshing package in Guix I've faced with an issue when rapid starts experiencing unit tests failure when compiling with go-1.21, please see the trace: Screenshot from 2024-07-20 20-17-37

--- FAIL: ExampleRune (0.00s)
got:
'\n' '\x1b' 'A' 'a' '*'
'0' '@' '?' '\'' '\ue05d'
'<' '%' '!' '\u0604' 'A'
'%' '╷' '~' '!' '/'
'\u00ad' '𝅾' '@' '҈' ' '
want:
'\n' '\x1b' 'A' 'a' '*'
'0' '@' '?' '\'' '\ue05d'
'<' '%' '!' '\u0604' 'A'
'%' '╷' '~' '!' '/'
'\u00ad' '𝪪' '@' '҈' ' '
--- FAIL: ExampleString (0.00s)
got:
"\n߾⃝?\rA�֍"
"\u2006𑨳"
"A$\u0603ᾢ"
"+^#.[#৲"
""
want:
"\n߾⃝?\rA�֍"
"\u2006𑰼"
"A¢\u0603ᾢ"
"+^#.[#৲"
""
--- FAIL: ExampleStringN (0.00s)
got:
"\n߾⃝?\r"
"\u2006𑨳#`\x1b"
"A$\u0603ᾢÉ"
"+^#.["
".A<a¤"
want:
"\n߾⃝?\r"
"\u2006𑰼#`\x1b"
"A¢\u0603ᾢÉ"
"+^#.["
".A<a¤"
FAIL
FAIL    pgregory.net/rapid      1.782s
FAIL

Thanks, Oleg

flyingmutant commented 1 month ago

Thanks for reporting! Does this happen on current master?

Hellseher commented 1 month ago

Hi @flyingmutant

It's failing on the latest commit as well 3aa554aaca7a7a3e7c671564c95190542db6fcc4, same issue.

flyingmutant commented 1 month ago

Full test suite is run daily with several versions of Go and 3 operating systems. Here is one of the runs with the version https://github.com/flyingmutant/rapid/commit/3aa554aaca7a7a3e7c671564c95190542db6fcc4. The problem you are seeing is most likely caused by a custom version of Go (with different Unicode tables) or something of that kind.

Hellseher commented 1 month ago

Hi,

Thank you for explanation.

Which Go version (commit or build type) is used to run the tests in the CI? I'd try to reproduce it.

It might be this: https://launchpad.net/ubuntu/+source/golang-1.21 I tried to build with https://github.com/golang/go/tree/go1.21.5

Oleg.

flyingmutant commented 1 month ago

From the action I've linked:

Setup go stable version spec 1.21
Found in cache @ /opt/hostedtoolcache/go/1.21.12/x64
Added go to the path
Successfully setup go version 1.21
go version go1.21.12 linux/amd64