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

State amalgamation with different types #307

Open
smessmer opened this issue Sep 2, 2023 · 1 comment
Open

State amalgamation with different types #307

smessmer opened this issue Sep 2, 2023 · 1 comment
Labels
C-enhancement Category: enhancement tribble-reported This issue was reported through Tribble.

Comments

@smessmer
Copy link

smessmer commented Sep 2, 2023

This issue is requesting an enhancement to Perseus. Details of the scope will be available in issue labels.
The user described the problem related to this request as follows:

State amalgamation with different types

The user described the issue as follows:

State amalgamation currently uses the same state type for build type state, request time state, and amalgamated state. This makes using it a bit awkward since likely have to use some kind of enum with variants for the different kinds of states in it. It would be more convenient if you could just specify separate types for BuildTimeState, RequestTimeState and an fn amalgamate(BuildTimeState, RequestTimeState) -> AmalgamatedState function.

  • The author is willing to attempt an implementation: false
Tribble internal data

dHJpYmJsZS1yZXBvcnRlZCxDLWVuaGFuY2VtZW50

@github-actions github-actions bot added C-enhancement Category: enhancement tribble-reported This issue was reported through Tribble. labels Sep 2, 2023
@arctic-hen7
Copy link
Member

This shouldn't be impossible, because Perseus only cares about state types at the very last second when it parses them to your custom functions, and, given enums aren't supported by the reactive state macro yet, I think this is perfectly reasonable. I'll get on this soon, but I'd be happy to accept a PR in the meantime!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: enhancement tribble-reported This issue was reported through Tribble.
Projects
None yet
Development

No branches or pull requests

2 participants