Take a look at these informational slides to learn about Bazel.
- Edit:
java/src/main/java/bazel/bootcamp/BUILD - Add a
java_binarytarget for theHelloBazelBootcamp.javafile - Run the binary using
bazel run //java/src/main/java/bazel/bootcamp:HelloBazelBootcamp
-
Edit the
BUILDfile forlogger.protoHint
Check out thecompilersattribute forgo_proto_libraryin the grpc exampleHint
Go libraries each declare the import path at which they would like to be imported by other go files.server.goimports the proto file atbootcamp/proto/loggerso theimportpathattribute ofgo_proto_libraryshould match that. -
Edit the
BUILDfile 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
BUILDfile forlogger.protojava_proto_librarydocumentationjava_grpc_librarydocumentation (look towards the bottom of the page for Bazel related documentation)
- Edit the
BUILDfile forJavaLoggingClientLibrary.java - Edit the
BUILDfile forJavaLoggingClient.java bazel runthe Java binary you wrotebazel runthe Go binary from Section 2- Send messages from the client to the server and view them on http://localhost:8081
- Edit the
BUILDfile forJavaLoggingClientLibraryTest.javaHint
Names matter for tests. Thejava_testfor this file should be namedJavaLoggingClientLibraryTest - Edit the
BUILDfile forJavaLoggingClientTest.java - Run the tests using
bazel test
- Edit the
WORKSPACEto uncomment the typescript relevant portions - Edit the
BUILDfile forlogger.proto - Edit the
BUILDfile 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
BUILDfile forintegrationtest.sh - Run the test using
bazel testand make sure that it passes - Run the test using
bazel test <target> --runs_per_test=10and make sure that it passesHint
You may need to modify theBUILDfile again to make this work