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

Fix issue caused by new script cache in 1.23.1 #49

Merged
merged 32 commits into from
Sep 29, 2023

Conversation

mfriedy
Copy link
Contributor

@mfriedy mfriedy commented Jun 16, 2023

Fixes #46

  • Set script_path to absolute script path, as this seems to be more consistent with that is done normally in streamlit (and is needed for the sourcewatcher to register it correctly?)
  • re-register the scriptwatcher that the scriptcache uses, to pick up the pages added by st_pages

@blackary - I am not sure how correct it is to directly interact with the runtime like this. But it seems to fix the issue :)

@mfriedy
Copy link
Contributor Author

mfriedy commented Jul 4, 2023

Hi @blackary any chance you can look at this?

@blackary
Copy link
Owner

blackary commented Jul 5, 2023

@mfriedy Yes, sorry it's taken a while, but I will take a look at this. I've been doing some work to get tests fixed in #45

@blackary blackary self-requested a review July 5, 2023 18:53
@blackary
Copy link
Owner

blackary commented Jul 5, 2023

@mfriedy I had trouble getting the fix to work without adding a tiny sleep. After that it seemed to work fine. Now making sure it still works with different versions.

@blackary
Copy link
Owner

blackary commented Jul 5, 2023

I can get the tests to pass locally, but am having trouble getting them to pass on github actions so far :/

@mfriedy
Copy link
Contributor Author

mfriedy commented Jul 6, 2023

That's really weird re the sleep, no idea. Is it something to do with accessing the runtime directly?

Copy link
Owner

@blackary blackary left a comment

Choose a reason for hiding this comment

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

THANK YOU so much for this improvement -- so sorry it took so long to get everything passing

@blackary blackary merged commit e2cb7b9 into blackary:main Sep 29, 2023
4 checks passed
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.

Streamlit 1.23.1 breaking rerun on changes for pages
2 participants