bazel-skylib icon indicating copy to clipboard operation
bazel-skylib copied to clipboard

Deprecate and remove lib.bzl

Open Capstan opened this issue 6 years ago • 6 comments

This process was started in commit 1099dd2 by @thomasvl .

  1. Use a print() warning.
  2. Wait one or two releases. ← we are here.
  3. Use a fail() error.
  4. Remove lib.bzl

Capstan avatar Nov 29 '18 11:11 Capstan

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?

manekinekko avatar Dec 13 '18 08:12 manekinekko

Correct. Or if you want to be pedantic about not re-exporting:

load("@bazel_skylib//lib:paths.bzl", _paths="paths")

Capstan avatar Dec 13 '18 11:12 Capstan

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

manekinekko avatar Dec 13 '18 15:12 manekinekko

Correct. Unfortunately, you'll still get the warning if any starlark in your transitive closure of loads loads lib.bzl, including in the WORKSPACE file, IIUC.

Capstan avatar Dec 13 '18 16:12 Capstan

Gotcha. Thanks for the feedback.

manekinekko avatar Dec 13 '18 19:12 manekinekko

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.

laurentlb avatar Jun 12 '19 19:06 laurentlb