-
-
Notifications
You must be signed in to change notification settings - Fork 182
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
✨(worker) Add support for non-serializable data in workers #4063
Conversation
Requirements: - getState and fromState in pure-rand - expose it in Random (as in this PR) - update of the API of property, ideally we should be able to link generate output to a run (except cloned case or including it) - add opt-out for this mode - handle no shrink (via property being able to track the generate output and know we failed to send it)
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit e1af65e:
|
Exposing the internal state of our generators is a requirement for some extra features on fast-check (see dubzzz/fast-check#4063). This PR only adds the capability on the type definition of our `RandomGenerator`. Next PRs will connect it generator by generator.
Exposing the internal state of our generators is a requirement for some extra features on fast-check (see dubzzz/fast-check#4063). This PR only adds the capability on the type definition of our `RandomGenerator`. Next PRs will connect it generator by generator.
In the context of #4063, we need to have an access onto the internal state of the PRNG backing the instance of `Random` in order to be able to serialize it and recreate the "exact" same instance of `Random` on destination (another worker thread). The current PR adds a `getState` method on `Random`. Adding it should be enough to fulfill the needs of #4063. But we will wait for it to be confirmed before releasing any minor version including that change.
In the context of #4063, we need to have an access onto the internal state of the PRNG backing the instance of `Random` in order to be able to serialize it and recreate the "exact" same instance of `Random` on destination (another worker thread). The current PR adds a `getState` method on `Random`. Adding it should be enough to fulfill the needs of #4063. But we will wait for it to be confirmed before releasing any minor version including that change.
👋 A preview of the new documentation is available at: http://65fb6560b19da7330078ba0a--dubzzz-fast-check.netlify.app |
👋 A preview of the new documentation is available at: http://65fb67acfb208c32cb9b7b68--dubzzz-fast-check.netlify.app |
👋 A preview of the new documentation is available at: http://65fb6bddc9fa883ada18b918--dubzzz-fast-check.netlify.app |
👋 A preview of the new documentation is available at: http://65fcdb136148eca5e59c6716--dubzzz-fast-check.netlify.app |
👋 A preview of the new documentation is available at: http://65ff1e0beb2037344a1face0--dubzzz-fast-check.netlify.app |
👋 A preview of the new documentation is available at: http://65ff2501ab32b239e58e16f5--dubzzz-fast-check.netlify.app |
👋 A preview of the new documentation is available at: http://65fff8e7ab32b2be0d8e170f--dubzzz-fast-check.netlify.app |
👋 A preview of the new documentation is available at: http://65ffff4689da71c02b192e78--dubzzz-fast-check.netlify.app |
👋 A preview of the new documentation is available at: http://6600465b159c7ff4afcec124--dubzzz-fast-check.netlify.app |
👋 A preview of the new documentation is available at: http://66012f7fe8ba20905499cbb8--dubzzz-fast-check.netlify.app |
👋 A preview of the new documentation is available at: http://660280adc1dfcfba814875c7--dubzzz-fast-check.netlify.app |
Requirements:
update of the API of property, ideally we should be able to link generate output to a run (except cloned case or including it)add opt-out for this modeCategory:
Potential impacts: