Skip to content

Commit

Permalink
Merge #74888
Browse files Browse the repository at this point in the history
74888: streamingccl/streampb: ensure there's at least one go source file r=knz a=knz

Fixes #74887

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

Co-authored-by: Raphael 'kena' Poss <[email protected]>
  • Loading branch information
craig[bot] and knz committed Jan 15, 2022
2 parents 105224d + d9572ce commit 5ad21e3
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 5ad21e3

Please sign in to comment.