Take a look at these informational slides to learn about Bazel.
- Edit:
java/src/main/java/bazel/bootcamp/BUILD
- Add a
java_binary
target for theHelloBazelBootcamp.java
file - Run the binary using
bazel run //java/src/main/java/bazel/bootcamp:HelloBazelBootcamp
-
Edit the
BUILD
file forlogger.proto
Hint
Check out thecompilers
attribute forgo_proto_library
in the grpc exampleHint
Go libraries each declare the import path at which they would like to be imported by other go files.server.go
imports the proto file atbootcamp/proto/logger
so theimportpath
attribute ofgo_proto_library
should match that. -
Edit the
BUILD
file forserver.go
-
Run the go binary using
bazel run
-
Go to http://localhost:8081 to see results (there won't be any logs yet)
- Edit the
BUILD
file forlogger.proto
java_proto_library
documentationjava_grpc_library
documentation (look towards the bottom of the page for Bazel related documentation)
- Edit the
BUILD
file forJavaLoggingClientLibrary.java
- Edit the
BUILD
file forJavaLoggingClient.java
bazel run
the Java binary you wrotebazel run
the Go binary from Section 2- Send messages from the client to the server and view them on http://localhost:8081
- Edit the
BUILD
file forJavaLoggingClientLibraryTest.java
Hint
Names matter for tests. Thejava_test
for this file should be namedJavaLoggingClientLibraryTest
- Edit the
BUILD
file forJavaLoggingClientTest.java
- Run the tests using
bazel test
- Edit the
WORKSPACE
to uncomment the typescript relevant portions - Edit the
BUILD
file forlogger.proto
- Edit the
BUILD
file forapp.ts
- Run the webserver using
bazel run
. It will print out a link which you can click on. If the link doesn't work, go to http://localhost:8080 instead - Run the Go server and Java client from the previous steps. Send messages from the Java client to the Go server and see them appear on the web frontend
- Edit the
BUILD
file forintegrationtest.sh
- Run the test using
bazel test
and make sure that it passes - Run the test using
bazel test <target> --runs_per_test=10
and make sure that it passesHint
You may need to modify theBUILD
file again to make this work