bazel-contrib / rules_go

Go rules for Bazel
Apache License 2.0
1.38k stars 656 forks source link

Can you do hot reloading when running golang program? #4090

Closed liushuai05 closed 1 month ago

liushuai05 commented 1 month ago

What version of rules_go are you using?

0.48.0

What version of gazelle are you using?

0.37.0

What version of Bazel are you using?

7.3.0

Does this issue reproduce with the latest releases of all the above?

What operating system and processor architecture are you using?

manjaro x86-64

Any other potentially useful information about your toolchain?

What did you do?

What did you expect to see?

I ran golang's bazel project normally and found that there was no automatic hot reload after modifying the file. What I want is a project development environment, which can automatically build my project and run it when I modify the archive, like go-air or gowatch. I don't know if it can be realized.

What did you see instead?

There is no hot reload after modifying the code.

dzbarsky commented 1 month ago

Perhaps you are looking for https://github.com/bazelbuild/bazel-watcher ?

liushuai05 commented 1 month ago

Perhaps you are looking for https://github.com/bazelbuild/bazel-watcher ?

This is great, yes, it solves my problem, thank you very much.