Skip to content

Commit

Permalink
Add error message if no .go files are specified.
Browse files Browse the repository at this point in the history
--
MOS_MIGRATED_REVID=86594902
  • Loading branch information
hanwen committed Feb 18, 2015
1 parent f942ed1 commit c2d48be
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion base_workspace/tools/build_rules/go_rules.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ go_library()/go_binary()/go_test() rules:
- No C++ interop.
- deps must be populated by hand or using Glaze.
- deps must be populated by hand.
- go_test must have both test and non-test files in srcs.
"""
Expand All @@ -62,6 +62,9 @@ def go_compile_command(ctx, sources, out_lib):

def go_library_impl(ctx):
sources = ctx.files.srcs
if not sources:
fail("may not be empty", "srcs")

out_lib = ctx.outputs.lib

ctx.action(
Expand Down

0 comments on commit c2d48be

Please sign in to comment.