-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Minify state names v2 #3728
base: main
Are you sure you want to change the base?
Minify state names v2 #3728
Conversation
Actually, it's not a problem with the env vars not getting passed. Tests are failing due to |
b9c852e
to
bf6ec96
Compare
@masenf do you have any idea how to solve this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as for the _var_set_state
, we probably could just save a reference to the state class and defer formatting of the state name until it's actually needed (_var_full_name_needs_state_prefix)
Thanks, i was thinking about that. Do you want me to migrate to state refs in this PR or in a followup? |
i think you can do the refs in this PR, as long as it's not too invasive. We have a big Var refactor coming in the next week or so, that might conflict, but we can fix that up |
Merged |
Thank you very much @masenf! Regarding your commit msg "test_minified_states: remove skip -- things seem to be working as-is" - that might be due to the var refactor from @adhami3310 especially I think this should be ready for review ✔️ |
Do we still want to get this in? I will rebase it if there is intention to review it |
yes, we want to get it 🤞 thanks @benedikt-bartscher |
Marking this as Draft until the conflict with main are solved. |
Thanks for your work on this. |
5e7c38c
to
7652fa1
Compare
This reverts commit 4d2a72c.
Also clear the StatefulComponent cache between AppInstance runs
also migrate environment to be a class singleton to prevent unintended chaos with default factories
7652fa1
to
d326047
Compare
rebased on |
Thanks, @masenf! I checked the diff again, looks good to me |
this patch doesn't seem to work anymore. the state names in export const clientStorage = {"cookies": {"reflex___state____state.U.my_cookie": {"path": "/", "sameSite": "lax"}, "reflex___state____state.U.custom_cookie": {"name": "CustomNamedCookie", "path": "/", "maxAge": 3600, "sameSite": "lax"}}, "local_storage": {"reflex___state____state.U.my_local_storage": {"sync": false}, "reflex___state____state.B.data_raw": {"sync": false}}, "session_storage": {}}
export const main_state_name = "cQ"
export const update_vars_internal = "cu.update_vars_internal"
export const state_name = "cQ"
export const exception_state_name = "reflex___state____state.cs" i tried this on the commit before i rebased, 7652fa1 |
@masenf thanks for testing it again
|
Alternative to #3701