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

Stop double compiles in dev mode #1990

Merged
merged 2 commits into from
Oct 19, 2023
Merged

Stop double compiles in dev mode #1990

merged 2 commits into from
Oct 19, 2023

Conversation

picklelo
Copy link
Contributor

Create a .web/.nocompile function that stops the first initial compile on the backend process in dev mode. After the first skip, the file is deleted, enabling hot reload to keep working.

@Alek99 Alek99 self-requested a review October 17, 2023 22:42
reflex/utils/exec.py Outdated Show resolved Hide resolved
reflex/utils/exec.py Outdated Show resolved Hide resolved
Comment on lines +593 to +594
if os.environ.get(constants.SKIP_COMPILE_ENV_VAR) == "yes":
return False
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we just get rid of this? i don't think it was being used anywhere else

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is used in other places in reflex.py. For example we call _skip_compile() in db_init and migrate. Agreed we should have only one way to do this though as this could be a bit messy to have two methods.

masenf
masenf previously approved these changes Oct 19, 2023
@picklelo picklelo merged commit e7f0cd8 into main Oct 19, 2023
37 checks passed
@picklelo picklelo deleted the nikhil/double-compile branch November 1, 2023 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants