Accelerate Go development with Bazel

2e1e9884fb61b5c0014818fc7e080f25?s=47 micnncim
October 28, 2019

Accelerate Go development with Bazel

2e1e9884fb61b5c0014818fc7e080f25?s=128

micnncim

October 28, 2019
Tweet

Transcript

  1. Accelerate Go development with Bazel Go Conference 2019 Autumn @micnncim

  2. @micnncim University Student / B4 Merpay ← AbemaTV ← Gunosy

  3. None
  4. None
  5. Ad Software Design 2020 1

  6. ⚠ Attention Bazel Go

  7. Bazel need for Go

  8. Use cases of Go Microservices Protobuf (Protocol Bu ers) GoMock

    Thrift Kubernetes, Istio,
  9. Hard points Monorepo Protobuf go build

  10. Monorepo ッ 1,000 ッ 1 2 2,000 ッ Make le

    1,000 go build ッ local CI
  11. None
  12. Protobuf VCS Docker

  13. None
  14. Bazel

  15. Bazel 1.0.0 Release 2019/10/10

  16. Overview ッ Google OSS multi-language ッ Starlark Python ッ ッ

    Buck (Facebook), Pants (Twitter)
  17. None
  18. Fast ッ ッ ッ Remote Caching

  19. Reproducible ッ Sandbox / ッ ッ Go protoc kubectl ッ

    ッ local, CI, ,
  20. None
  21. None
  22. None
  23. How does Bazel work? 1. Loading phase: BUILD ッ Bazel

    WORKSPACE BUILD ッ Starlark
  24. How does Bazel work? 2. Analysis phase: DAG (directed acyclic

    graph) action graph action : run gcc on hello.c and get hello.o aciton graph Bazel track
  25. How does Bazel work? 3. Execution phase: build action ❗

  26. Use cases Google, Uber, Dropbox, Pinterest, Stripe, Microservices with Monorepo

    Kubernetes, Envoy, Protobuf, Tensor ow, Angular, Google OSS Bazel
  27. Bazel ❤ Go

  28. Monorepo ッ ッ ッ bazel build //

  29. Rebuild by go build go version: go1.13 darwin/amd64

  30. Rebuild by bazel build bazel version: 0.28.1

  31. Protobuf ッ protoc ッ Bazel Sandbox VCS ッ GoMock

  32. Practice

  33. Practice ッ Go protoc ッ Gazelle (BUILD ) ッ .bazelrc

    ( ) ッ Bazelisk (Bazel ) ッ nogo (Go Bazel )
  34. Gazelle bazelbuild/bazel-gazelle Go BUILD Go

  35. .bazelrc Bazel 100 .bazelrc

  36. None
  37. Bazelisk bazelbuild/bazelisk .bazelversion Bazel (OS, Arch) Bazel

  38. None
  39. nogo bazelbuild/rules_go Go Analyzer

  40. None
  41. Bazel in OSS

  42. in OSS ッ Kubernetes kazel ッ Istio Bazel go build

  43. None
  44. None
  45. THANK YOU! @micnncim