Skip to content

Commit

Permalink
streamingccl/streampb: ensure there's at least one go source file
Browse files Browse the repository at this point in the history
When the directory is empty (prior to deriving .pb.go from .proto),
the go compiler has no package name for that directory.

This prevents the execution of `go mod tidy` and `make
vendor_rebuild`, and even prevents the generation of the `.pb.go`
file, resulting in a catch-22.

Release note: None
  • Loading branch information
knz committed Jan 15, 2022
1 parent 7841945 commit d9572ce
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/ccl/streamingccl/streampb/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ go_proto_library(

go_library(
name = "streampb",
srcs = ["empty.go"],
embed = [":streampb_go_proto"],
importpath = "github.com/cockroachdb/cockroach/pkg/ccl/streamingccl/streampb",
visibility = ["//visibility:public"],
Expand Down
11 changes: 11 additions & 0 deletions pkg/ccl/streamingccl/streampb/empty.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Copyright 2022 The Cockroach Authors.
//
// Licensed as a CockroachDB Enterprise file under the Cockroach Community
// License (the "License"); you may not use this file except in compliance with
// the License. You may obtain a copy of the License at
//
// https://github.com/cockroachdb/cockroach/blob/master/licenses/CCL.txt

package streampb

// This file is intentionally left empty.

0 comments on commit d9572ce

Please sign in to comment.