commit | 791450eb3c98e711f5b60cd48befea0c980c541b | [log] [tgz] |
---|---|---|
author | Eyal Soha <eyalsoha@google.com> | Fri Oct 05 16:59:04 2018 -0400 |
committer | Eyal Soha <eyalsoha@google.com> | Mon Oct 08 09:44:18 2018 -0400 |
tree | ed3d9e6beeb11c4441e0fb35ae3712af67f0eec5 | |
parent | d6b21f0cad326ef0a648284b2b7615b2fc307aa3 [diff] |
[fidl][golang] Regenerate fidlgen code Instructions: To update all the saved fidlgen files, first get a list of all the files made by fidlgen ignoring those in the out directory: rg "generated by fidlgen" . | rg -v ./out I found these (ignoring the templates in garnet): ./third_party/go/src/syscall/zx/net/impl.go:// WARNING: This file is machine generated by fidlgen. ./third_party/go/src/syscall/zx/io/impl.go:// WARNING: This file is machine generated by fidlgen. ./third_party/go/src/syscall/zx/fidl/bindingstest/impl.go:// WARNING: This file is machine generated by fidlgen. Now build and replace them: ./out/x64/host_x64/fidlc --json foo.json --files third_party/go/src/syscall/zx/fidl/bindingstest/test.fidl ./out/x64/host_x64/fidlgen -generators go -include-base foo --output-base bar -json foo.json cp bar/impl.go third_party/go/src/syscall/zx/fidl/bindingstest/impl.go ./out/x64/host_x64/fidlc --json foo.json --files zircon/system/fidl/fuchsia-net/*.fidl ./out/x64/host_x64/fidlgen -generators go -include-base foo --output-base bar -json foo.json cp bar/impl.go third_party/go/src/syscall/zx/net/impl.go ./out/x64/host_x64/fidlc --json foo.json --files zircon/system/fidl/fuchsia-io/io.fidl ./out/x64/host_x64/fidlgen -generators go -include-base foo --output-base bar -json foo.json cp bar/impl.go third_party/go/src/syscall/zx/io/impl.go Now `git diff -w` and look for comments that you need to adjust to fix up those files. Stuff like adding "+build fuchsia" .../io/impl.go is especially ugly because lot sof "int32" need to be changed to "_zx.Socket". Use your favorite regexp replace tool: sed -i -E "s/S\s+int32/S _zx.Status/" syscall/zx/io/impl.go sed -i -E "s/\)\s+\(int32/\) \(_zx.Status/" syscall/zx/io/impl.go To see if you got them all, run this command and look for "_zx.Status" in the output: git diff -w -U0 master TESTED=fx run-test go_fidl_test I found a few OnOpen functions. Change-Id: I79ae80294118af1d2280b87b8e2f53211931dba8
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
Gopher image by Renee French, licensed under Creative Commons 3.0 Attributions license.
Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
Official binary distributions are available at https://golang.org/dl/.
After downloading a binary release, visit https://golang.org/doc/install or load doc/install.html in your web browser for installation instructions.
If a binary distribution is not available for your combination of operating system and architecture, visit https://golang.org/doc/install/source or load doc/install-source.html in your web browser for source installation instructions.
Go is the work of thousands of contributors. We appreciate your help!
To contribute, please read the contribution guidelines: https://golang.org/doc/contribute.html
Note that the Go project uses the issue tracker for bug reports and proposals only. See https://golang.org/wiki/Questions for a list of places to ask questions about the Go language.