bazel-skylib
bazel-skylib copied to clipboard
Deprecate and remove lib.bzl
This process was started in commit 1099dd2 by @thomasvl .
- Use a
print()
warning. - Wait one or two releases. ← we are here.
- Use a
fail()
error. - Remove
lib.bzl
Hi, I got a quick question about this deprecation. If I got this right:
BEFORE: load("@bazel_skylib//:lib.bzl", "paths")
AFTER: load("@bazel_skylib//lib:paths.bzl", "paths")
Right?
Correct. Or if you want to be pedantic about not re-exporting:
load("@bazel_skylib//lib:paths.bzl", _paths="paths")
So, in theory, this code shouldn't trigger the deprecation warnings? Right?
Because we are getting these warning in https://github.com/angular/angular/issues/27603
Correct. Unfortunately, you'll still get the warning if any starlark in your transitive closure of load
s loads lib.bzl, including in the WORKSPACE
file, IIUC.
Gotcha. Thanks for the feedback.
In my experience, the print
warning was not useful. Users should deal with it when they upgrade (so it should be an error). Some people didn't, because it's a warning and maybe they didn't see it. As a result, anyone building their code gets a notification in the console. It's quite noisy and it encourages everyone to ignore the messages. For most people seeing the message, it's not actionable, because it's not their code.
So let's replace it with fail
now.