From 44c7d550747a61baa6a85643de439fa45c2b9633 Mon Sep 17 00:00:00 2001 From: Rahat Mahmood Date: Tue, 29 Sep 2020 12:32:32 -0700 Subject: Support embedded fields in go-marshal. PiperOrigin-RevId: 334437990 --- tools/go_marshal/README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'tools/go_marshal/README.md') diff --git a/tools/go_marshal/README.md b/tools/go_marshal/README.md index 75e5c7888..d8045c295 100644 --- a/tools/go_marshal/README.md +++ b/tools/go_marshal/README.md @@ -113,3 +113,18 @@ The following are some guidelines for modifying the `go_marshal` tool: - No runtime reflection in the code generated for the marshallable interface. The entire point of the tool is to avoid runtime reflection. The generated tests may use reflection. + +## Debugging + +To enable debugging output from the go-marshal tool, use one of the following +options, depending on how go-marshal is being invoked: + +- Pass `--define gomarshal=verbose` to the bazel command. Note that this can + generate a lot of output depending on what's being compiled, as this will + enable debugging for all packages built by the command. + +- Set `marshal_debug = True` on the top-level `go_library` BUILD rule. + +- Set `debug = True` on the `go_marshal` BUILD rule. + +- Pass `-debug` to the go-marshal tool invocation. -- cgit v1.2.3