Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
82 changes: 5 additions & 77 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,10 @@
[[override]]
name = "github.com/weaveworks/mesh"
revision = "5015f896ab62d3e9fe757456c757521ce0c3faff"

# bazel build does not work with earlier versions:
#
# ERROR: /Users/jml/go/src/github.com/weaveworks/cortex/vendor/github.com/weaveworks-experiments/loki/pkg/client/BUILD.bazel:3:1: no such package 'vendor/github.com/openzipkin/zipkin-go-opentracing/_thrift/gen-go/zipkincore': BUILD file not found on package path and referenced by '//vendor/github.com/weaveworks-experiments/loki/pkg/client:go_default_library'.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you got an up to date version of gazelle?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently not.

[[override]]
name = "github.com/openzipkin/zipkin-go-opentracing"
version = "0.3.0"
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: all test clean images
.PHONY: all test clean images protos
.DEFAULT_GOAL := all

# Boiler plate for bulding Docker containers.
Expand Down Expand Up @@ -45,6 +45,7 @@ pkg/ingester/client/cortex.pb.go: pkg/ingester/client/cortex.proto
pkg/ring/ring.pb.go: pkg/ring/ring.proto
all: $(UPTODATE_FILES)
test: $(PROTO_GOS)
protos: $(PROTO_GOS)

# And now what goes into each image
build-image/$(UPTODATE): build-image/*
Expand Down Expand Up @@ -118,16 +119,16 @@ clean:
# gazelle - https://github.com/bazelbuild/rules_go/issues/422
# and https://github.com/bazelbuild/rules_go/issues/423. If you ever regenerate
# the BUILD files, watch out for the rules in vendor/golang.org/x/crypto/curve25519
update-gazelle:
update-gazelle: $(PROTO_GOS)
gazelle -go_prefix github.com/weaveworks/cortex -external vendored \
-build_file_name BUILD.bazel

update-vendor:
dep ensure && dep prune
git status | grep BUILD.bazel | cut -d' ' -f 5 | xargs git checkout HEAD

bazel:
bazel: $(PROTO_GOS)
bazel build //cmd/...

bazel-test:
bazel-test: $(PROTO_GOS)
bazel test //pkg/...
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ bazel](https://bazel.build/versions/master/docs/install.html), try these command
make bazel-test
make bazel

This will require Bazel 0.5.3 or later.

Bazel can be useful for running fast, local, incremental builds and tests.
Currently [bazel does not support cross-compiling](https://github.com/bazelbuild/rules_go/issues/70)
so it is not used to produce the final binaries and docker container images.
Expand Down
4 changes: 3 additions & 1 deletion WORKSPACE
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
git_repository(
name = "io_bazel_rules_go",
remote = "https://github.com/bazelbuild/rules_go.git",
commit = "9bd1d8969862baac16540d44d2cf87f6a44e7734",
# Required for working with bazel 0.5.3
# https://github.com/bazelbuild/rules_go/tree/10a700af62d2c23cc6e9bbc12055c0abe2808a23
tag = "0.5.2",
)
load("@io_bazel_rules_go//go:def.bzl", "go_repositories")

Expand Down
4 changes: 4 additions & 0 deletions pkg/ingester/client/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,19 @@ go_library(
name = "go_default_library",
srcs = [
"client.go",
"cortex.pb.go",
"dep.go",
],
visibility = ["//visibility:public"],
deps = [
"//pkg/util/wire:go_default_library",
"//vendor/github.com/gogo/protobuf/gogoproto:go_default_library",
"//vendor/github.com/gogo/protobuf/proto:go_default_library",
"//vendor/github.com/grpc-ecosystem/grpc-opentracing/go/otgrpc:go_default_library",
"//vendor/github.com/mwitkow/go-grpc-middleware:go_default_library",
"//vendor/github.com/opentracing/opentracing-go:go_default_library",
"//vendor/github.com/weaveworks/common/middleware:go_default_library",
"//vendor/golang.org/x/net/context:go_default_library",
"//vendor/google.golang.org/grpc:go_default_library",
],
)
Expand Down
3 changes: 3 additions & 0 deletions pkg/ring/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@ go_library(
"http.go",
"model.go",
"ring.go",
"ring.pb.go",
"util.go",
],
visibility = ["//visibility:public"],
deps = [
"//pkg/util:go_default_library",
"//vendor/github.com/gogo/protobuf/proto:go_default_library",
"//vendor/github.com/gogo/protobuf/sortkeys:go_default_library",
"//vendor/github.com/golang/protobuf/proto:go_default_library",
"//vendor/github.com/golang/snappy:go_default_library",
"//vendor/github.com/hashicorp/consul/api:go_default_library",
Expand Down
24 changes: 0 additions & 24 deletions vendor/github.com/Shopify/sarama/.gitignore

This file was deleted.

33 changes: 0 additions & 33 deletions vendor/github.com/Shopify/sarama/.travis.yml

This file was deleted.

Loading