Skip to content

Commit

Permalink
Bazel: Replace PACKAGE_NAME constant with package_name() function
Browse files Browse the repository at this point in the history
PACKAGE_NAME was deprecated in favor of package_name() function and is
going to be removed in future Bazel releases. Moreover Bazel is trying
to set --incompatible_package_name_is_a_function=true per default to
enforce Bazel users to stop using it: [1].

[1] bazelbuild/bazel#5827

Change-Id: I4d1a6ccbeae611fdd0e9c1e9fdd89b6dd1294f36
  • Loading branch information
davido committed Sep 11, 2018
1 parent e46fd3d commit a9bb94b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tools/bzl/js.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -426,4 +426,4 @@ _vulcanize_rule = rule(

def vulcanize(*args, **kwargs):
"""Vulcanize runs vulcanize and crisper on a set of sources."""
_vulcanize_rule(*args, pkg = PACKAGE_NAME, **kwargs)
_vulcanize_rule(*args, pkg = native.package_name(), **kwargs)
2 changes: 1 addition & 1 deletion tools/bzl/license.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def license_test(name, target):
if target[0] not in ":/":
target = ":" + target
if target[0] != "/":
target = "//" + PACKAGE_NAME + target
target = "//" + native.package_name() + target

forbidden = "//lib:LICENSE-DO_NOT_DISTRIBUTE"
native.genquery(
Expand Down

0 comments on commit a9bb94b

Please sign in to comment.