-
-
Notifications
You must be signed in to change notification settings - Fork 255
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
feat: live reloading when running as a module #858
base: main
Are you sure you want to change the base?
Conversation
@VishnuSanal is attempting to deploy a commit to the sparckles Team on Vercel. A member of the Team first needs to authorize it. |
CodSpeed Performance ReportMerging #858 will not alter performanceComparing Summary
|
Hey @VishnuSanal 👋 I am unable to understand the changes. Could you add an example on why we need the new parameters? And how you'd invoke the changes? |
9dce07a
to
e72f14a
Compare
Hey @VishnuSanal , |
uh, oh. my previous comment never got sent.
I have changed the implementation, PTAL. removed the need for new params.
running as a module usually, like please CMIIW. |
@VishnuSanal , I just saw your description. That is not what we want to solve for 😄 We want to allow the dev mode to work like where src
The --dev flag should rerender based on app changes. |
e72f14a
to
78b9dda
Compare
thank you for the review, Sanskar! this currently works as expected in my testing, PTAL & LMK what you think. :) |
Hey @VishnuSanal 👋 Thanks for the PR, I have some comments 😄 |
Hey @VishnuSanal 👋 Thanks for the update. I have some follow up comments |
robyn/reloader.py
Outdated
env=new_env, | ||
start_new_session=False, | ||
) | ||
if self.config.dev and self.config.file_path is not None: |
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.
Can we not use self.file_path
?
Then we don't need to pass in config
.
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.
we also need config.dev
. should I pass it as a variable?
edit: we also need running_as_module
now.
current issues:
(will edit & update this comment as I fix them...) |
# Conflicts: # robyn/reloader.py
note to self: the flow of control is like: cli#run => cli#start_dev_server => reloader#setup_reloader => EventHandler#reload => Robyn#start and, we are getting the file object at the last stage. my current implementation starts a new dev server from there. we need a way to bypass it the first time (inorder to reach as of now, I am getting an infinite loop! will address. :) |
07f28de
to
0b766c9
Compare
Description
This PR fixes #654
how to run:
python3 -m app --dev