Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updating vitest fails randomness tests #245

Closed
felixroos opened this issue Nov 4, 2022 · 5 comments · Fixed by #297
Closed

updating vitest fails randomness tests #245

felixroos opened this issue Nov 4, 2022 · 5 comments · Fixed by #297
Labels

Comments

@felixroos
Copy link
Collaborator

felixroos commented Nov 4, 2022

updating from 0.21.1 to 0.24.5 changes the results of the randomness tests. it seems that one of both versions does not reset its state or something. eventually related with vitest-dev/vitest#1754 but not really sure.

it seems that the newer version does not behave like the repl would, e.g. http://strudel.tidalcycles.org/#c3RhY2soCiAgICBzKCJiZCA8c2QgY3A%2BIikKICAgIC5kZWxheSgiPDAgLjU%2BIikKICAgIC5kZWxheXRpbWUoIi4xNiB8IC4zMyIpCiAgICAuZGVsYXlmZWVkYmFjaygiLjYgfCAuOCIpCiAgKS5zb21ldGltZXMoeD0%2BeC5zcGVlZCgiLTEiKSkK always starts with .8 delayfeedback so does the current test. with the new vitest version, it starts with .6 ..

tried various combinations of --no-isolate and --no-threads flags, but no luck so far.

@felixroos felixroos added the tests label Nov 4, 2022
@yaxu
Copy link
Member

yaxu commented Nov 4, 2022

Hmm so is randomness not a deterministic pure function of time in strudel?

@felixroos
Copy link
Collaborator Author

yes it is, but between different versions of the test runner, the determinism seems to have switched how it always behaves :)

@yaxu
Copy link
Member

yaxu commented Nov 4, 2022

heh strange !

@felixroos
Copy link
Collaborator Author

the problem should be that the mini notation "|" alignment as well as "?" operator use a stateful randomness, which behaves differently when multiple patterns are queried one after the other. see 306004e i don't remember what the seed approach originally tried to solve, maybe @bpow still knows?

@felixroos
Copy link
Collaborator Author

i don't remember what the seed approach originally tried to solve, maybe @bpow still knows?

probably this: #165 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants