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

feat: hot reload #3392

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

feat: hot reload #3392

wants to merge 2 commits into from

Conversation

stuartwdouglas
Copy link
Collaborator

JVM languages can now used how reload for instant feedback

@stuartwdouglas stuartwdouglas added the skip-proto-breaking PRs with this label will skip the breaking proto check label Nov 15, 2024
@stuartwdouglas stuartwdouglas requested review from tomdaffurn and wesbillman and removed request for a team November 15, 2024 00:08
This was referenced Nov 15, 2024
@stuartwdouglas stuartwdouglas force-pushed the stuartwdouglas/hot-reload-pr branch 5 times, most recently from ec7198d to 401db79 Compare November 15, 2024 03:09
@@ -167,6 +172,9 @@ func (s *Service) SyncStubReferences(ctx context.Context, req *connect.Request[l
// rebuild must include the latest build context id provided by the request or subsequent BuildContextUpdated
// calls.
func (s *Service) Build(ctx context.Context, req *connect.Request[langpb.BuildRequest], stream *connect.ServerStream[langpb.BuildEvent]) error {
if req.Msg.RebuildAutomatically {
return s.handleDevModeRequest(ctx, req, stream)
}
events := make(chan updateEvent, 32)
Copy link
Collaborator

Choose a reason for hiding this comment

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

the rest of this function can be gutted I think as it has a lot of logic for receiving new build contexts and watching for file changes, which only happens if req.Msg.RebuildAutomatically is true.

Oh wait I'm actually not sure how you are reacting to build context changes?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I am not handling that properly I think, I need to move some of this logic into the hot reload path.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think I am handling this properly now

JVM languages can now used how reload for instant feedback
@stuartwdouglas stuartwdouglas force-pushed the stuartwdouglas/hot-reload-pr branch 4 times, most recently from cc607a9 to 9296515 Compare November 15, 2024 09:42
@stuartwdouglas
Copy link
Collaborator Author

I need to add some tests around this, but I think they need a different approach to the existing language tests, as most of the logic is handled by Quarkus itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-proto-breaking PRs with this label will skip the breaking proto check
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants