Slide 1

Slide 1 text

Accelerate Go development with Bazel Go Conference 2019 Autumn @micnncim

Slide 2

Slide 2 text

@micnncim University Student / B4 Merpay ← AbemaTV ← Gunosy

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

Ad Software Design 2020 1

Slide 6

Slide 6 text

⚠ Attention Bazel Go

Slide 7

Slide 7 text

Bazel need for Go

Slide 8

Slide 8 text

Use cases of Go Microservices Protobuf (Protocol Bu ers) GoMock Thrift Kubernetes, Istio,

Slide 9

Slide 9 text

Hard points Monorepo Protobuf go build

Slide 10

Slide 10 text

Monorepo ッ 1,000 ッ 1 2 2,000 ッ Make le 1,000 go build ッ local CI

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

Protobuf VCS Docker

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

Bazel

Slide 15

Slide 15 text

Bazel 1.0.0 Release 2019/10/10

Slide 16

Slide 16 text

Overview ッ Google OSS multi-language ッ Starlark Python ッ ッ Buck (Facebook), Pants (Twitter)

Slide 17

Slide 17 text

No content

Slide 18

Slide 18 text

Fast ッ ッ ッ Remote Caching

Slide 19

Slide 19 text

Reproducible ッ Sandbox / ッ ッ Go protoc kubectl ッ ッ local, CI, ,

Slide 20

Slide 20 text

No content

Slide 21

Slide 21 text

No content

Slide 22

Slide 22 text

No content

Slide 23

Slide 23 text

How does Bazel work? 1. Loading phase: BUILD ッ Bazel WORKSPACE BUILD ッ Starlark

Slide 24

Slide 24 text

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

Slide 25

Slide 25 text

How does Bazel work? 3. Execution phase: build action ❗

Slide 26

Slide 26 text

Use cases Google, Uber, Dropbox, Pinterest, Stripe, Microservices with Monorepo Kubernetes, Envoy, Protobuf, Tensor ow, Angular, Google OSS Bazel

Slide 27

Slide 27 text

Bazel ❤ Go

Slide 28

Slide 28 text

Monorepo ッ ッ ッ bazel build //

Slide 29

Slide 29 text

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

Slide 30

Slide 30 text

Rebuild by bazel build bazel version: 0.28.1

Slide 31

Slide 31 text

Protobuf ッ protoc ッ Bazel Sandbox VCS ッ GoMock

Slide 32

Slide 32 text

Slide 33

Slide 33 text

Practice

Slide 34

Slide 34 text

Practice ッ Go protoc ッ Gazelle (BUILD ) ッ .bazelrc ( ) ッ Bazelisk (Bazel ) ッ nogo (Go Bazel )

Slide 35

Slide 35 text

Gazelle bazelbuild/bazel-gazelle Go BUILD Go

Slide 36

Slide 36 text

.bazelrc Bazel 100 .bazelrc

Slide 37

Slide 37 text

No content

Slide 38

Slide 38 text

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

Slide 39

Slide 39 text

No content

Slide 40

Slide 40 text

nogo bazelbuild/rules_go Go Analyzer

Slide 41

Slide 41 text

No content

Slide 42

Slide 42 text

Bazel in OSS

Slide 43

Slide 43 text

in OSS ッ Kubernetes kazel ッ Istio Bazel go build

Slide 44

Slide 44 text

No content

Slide 45

Slide 45 text

No content

Slide 46

Slide 46 text

THANK YOU! @micnncim