You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 20, 2019. It is now read-only.
Right now, we force the user to both select the runtime strategy and import StaticOnly so that only static picklers are used. However, the import StaticOnly should already decide to use one the runtime strategy that doesn't fallback to runtime generation when looking up tags. We may also want to add another implicit StaticOnlyWithLookup that will use the only-lookup runtime strategy.
Current limitation: the runtime strategy is defined in the package internal, that is initialized at boot time. As it's a top-level member, it can't depend on a user-imported implicit.
The text was updated successfully, but these errors were encountered:
staticOnly is meant to be about the generated picklers themesleves. i.e. DO NOT use any reflection in the code generated for the picklers. (These should be scala-js friendly).
Whether to delegate to runtime lookup of picklers should probably be a separate flag. I agree with you that it should be controlled. By default, i think picklers are designed to be in "hybrid" form where you can lookup picklers at runtime, but prefer to generate static picklers. BUT the user should be able to (easily) turn that off and force all static-types everywhere, including the gymnastics involved in figuring out these types on both sides of a communication channel.
So basically, I'm ok adding a RuntimeLookup flag with NoRuntimeLookup as something that can be imported in-tandem with StaticOnly. I can also update the docs to reflect this if you think it's a good idea.
Right now, we force the user to both select the runtime strategy and import
StaticOnly
so that only static picklers are used. However, the importStaticOnly
should already decide to use one the runtime strategy that doesn't fallback to runtime generation when looking up tags. We may also want to add another implicitStaticOnlyWithLookup
that will use the only-lookup runtime strategy.Current limitation: the runtime strategy is defined in the package internal, that is initialized at boot time. As it's a top-level member, it can't depend on a user-imported implicit.
The text was updated successfully, but these errors were encountered: