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

Replace hot reload mechanism #211

Merged
merged 1 commit into from
May 9, 2024
Merged

Replace hot reload mechanism #211

merged 1 commit into from
May 9, 2024

Conversation

wwwillchen
Copy link
Collaborator

@wwwillchen wwwillchen commented May 9, 2024

This PR has two goals:

  1. Fix the DevEx issues described in Replace mesop CLI hot reload's hacky mechanism #199.
  2. Unify the hot reload mechanism between ibazel and mesop CLI. This way if we break one, particularly for the mesop CLI, we will feel the pain right away as framework developers.

This creates a new HTTP endpoint "/hot-reload" that the Mesop client app long polls against. If "/hot-reload" returns a 200 (OK) HTTP response this means the Mesop server has finished re-executing the changed modules, then the Mesop client app triggers a hot reload request.

As a nice side-effect, this avoids the ibazel livereload mechanism which is somewhat hairy and relies on this pre-compiled JS file.

Fixes #199.

Note: this will require downstream updates.

@wwwillchen wwwillchen merged commit 644fe6b into google:main May 9, 2024
2 checks passed
@wwwillchen wwwillchen deleted the i199 branch May 9, 2024 22:55
richard-to pushed a commit to richard-to/mesop that referenced this pull request May 13, 2024
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.

Replace mesop CLI hot reload's hacky mechanism
1 participant