2
0
Fork 0
mirror of https://github.com/bazelbuild/bazel-skylib synced 2024-11-30 10:41:18 +00:00
Commit graph

8 commits

Author SHA1 Message Date
aiuto da7ba2d23c
Strip compatible_with from bzl_library rules (#522)
* Wrap bzl_library in a macro so that we can force off some
global attribures that are never appropriate for BUILD files.

Removes:
- *_compatible_with
- features

* cdate

* linty

* linty

* more lint
2024-07-15 19:50:23 +02:00
Xùdōng Yáng 80b51b36d6
Allow bzl_library to depend on non-bzl_library targets (#495)
Allow `bzl_library` to depend on non-`bzl_library` targets

Notably, `filegroup`. `bzl_library` doesn't actually read anything from the `StarlarkLibraryInfo` provider, and requiring all deps to be other `bzl_library` targets is really painful for anyone loading .bzls from `@bazel_tools` or `@platforms` because those core modules/repos don't want a dependency on Skylib just for access to `bzl_library`.

The medium-term plan will be to move `bzl_library` into `@bazel_tools`; but before then, this can serve as a stop-gap.

Co-authored-by: Alexandre Rostovtsev <arostovtsev@google.com>
2024-04-24 14:16:57 -04:00
Keith Smiley 8da4759611
Add error for empty bzl_library (#457)
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.

Co-authored-by: Ivo List <ilist@google.com>
2023-10-25 16:39:34 +02:00
Alexandre Rostovtsev 12dd004ffa
Allow .scl files in bzl_library (#450)
See a0cd355347
2023-05-31 14:58:11 -04:00
Laurent Le Brun 1c5ed0706a
Migrate code for the flag --incompatible_disable_depset_items (#232) 2020-02-03 16:45:44 +01:00
Thomas Van Lenten d7c5518fa0
buildifier lint issues/validation
* Fix lint issues

- Move the doc string into the `doc` attributes on the rule/attr calls.
- Move the print() below the load() statements.

* Also run buildifier in --lint=fix mode to catch issues on Travis.
2018-11-21 13:04:25 -05:00
bttk 3b30154839 Use transitive_files in runfiles instead of a list of files (#69) 2018-11-14 18:52:55 +01:00
c-parsons 6e2d7e4a75
Rename a number of instances of 'skylark' to 'starlark' or 'bzl'
Most notably, this renames/moves a few important identifiers:

//:skylark_library.bzl -> //:bzl_library.bzl
skylark_library -> bzl_library
SkylarkLibraryInfo -> StarlarkLibraryInfo
2018-09-28 09:09:18 -04:00