bazelbuild / bazel-skylib

Common useful functions and rules for Bazel
https://bazel.build/
Apache License 2.0
387 stars 180 forks source link

Add error for empty bzl_library #457

Closed keith closed 10 months ago

keith commented 1 year ago

This improves the error in the case your bzl_library does nothing. Otherwise you end up with something weirder later:

BUILD:35:12: in deps attribute of bzl_library rule LABEL: 'DEP' does not produce any bzl_library deps files (expected .bzl)

Ideally we could set allow_empty = False on srcs but currently it's valid to just have a bzl_library target that aggregates multiple other libraries in its deps.

keith commented 10 months ago

@comius can you land this?

comius commented 10 months ago

@comius can you land this?

Build failures are happening at head and are not related to this change.

Before releasing skylib we should fix those.