-
Notifications
You must be signed in to change notification settings - Fork 118
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
[scala2] feat: adding on-demand default evaluation #533
[scala2] feat: adding on-demand default evaluation #533
Conversation
Thanks for the PR! I'll take a detailed look in a couple of days, but for sure we'll need to find a way to keep bincompat. Or move these changes to v2. |
It can break when you have two dependencies that use Magnolia on the classpath, one the older version using the constructor, and another one the newer version using |
I've adjusted both PRs to keep bincompat. Build should be passing now. |
Thanks for the PR! |
Description
Currently, all default values are precompiled. This has led to random generators, such as random
UUID.randomUUID()
andInstant.now()
being memoized (see zio/zio-json#1055). This PR adds an option to evaluate default parameters on-demand. See the accompanying PR for Scala 3 support: #534