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 }}
Repository navigation
Use distinct types for "with key" and "without key" in SessionEvent and SessionContext #797
I'm thinking of this more as v2::SessionContext::V1 and v2::SessionContext::V2 since that explains the reason the key is there or not there more than SessionContext::WithKey and `::WithoutKey
edit:
A big issue with enum Sessioncontext { WithoutKey {..}, WithKey{..} } is that the key isn't known until after the OriginalPayload has been processed.
The developer would still have to scrutinize the enum and would complicate our internal machinery. A option here may not be idomatic but worth it in this case.
Activity
DanGould commentedon Jun 26, 2025
I'm thinking of this more as
v2::SessionContext::V1andv2::SessionContext::V2since that explains the reason the key is there or not there more thanSessionContext::WithKeyand `::WithoutKeyedit:
A big issue with
enum Sessioncontext { WithoutKey {..}, WithKey{..} }is that the key isn't known until after theOriginalPayloadhas been processed.arminsabouri commentedon Sep 22, 2025
The developer would still have to scrutinize the enum and would complicate our internal machinery. A option here may not be idomatic but worth it in this case.