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

Merged
merged 3 commits into from
Nov 20, 2024
Merged

feat: hot reload #3392

merged 3 commits into from
Nov 20, 2024

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

@stuartwdouglas stuartwdouglas force-pushed the stuartwdouglas/hot-reload-pr branch 5 times, most recently from 9296515 to 21a60c4 Compare November 15, 2024 20:50
@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.

@stuartwdouglas stuartwdouglas force-pushed the stuartwdouglas/hot-reload-pr branch 4 times, most recently from 1089c72 to 741d550 Compare November 17, 2024 23:26
@stuartwdouglas stuartwdouglas force-pushed the stuartwdouglas/hot-reload-pr branch 11 times, most recently from 615f692 to 8be052d Compare November 20, 2024 03:07
JVM languages can now used how reload for instant feedback
@stuartwdouglas stuartwdouglas merged commit ff23370 into main Nov 20, 2024
91 checks passed
@stuartwdouglas stuartwdouglas deleted the stuartwdouglas/hot-reload-pr branch November 20, 2024 04:33
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