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: Ida9f63a4a5763f12461795ef94aaf3d2ed9015d0
  • Loading branch information
dpursehouse committed Jan 24, 2019
1 parent 587749a commit b0190b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/js.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ _bundle_rule = rule(

def bundle_assets(*args, **kwargs):
"""Combine html, js, css files and optionally split into js and html bundles."""
_bundle_rule(*args, pkg = PACKAGE_NAME, **kwargs)
_bundle_rule(*args, pkg = native.package_name(), **kwargs)

def polygerrit_plugin(name, app, srcs = [], assets = None, **kwargs):
"""Bundles plugin dependencies for deployment.
Expand All @@ -447,7 +447,7 @@ def polygerrit_plugin(name, app, srcs = [], assets = None, **kwargs):
name = name + "_combined",
app = app,
srcs = srcs if app in srcs else srcs + [app],
pkg = PACKAGE_NAME,
pkg = native.package_name(),
**kwargs
)

Expand Down

0 comments on commit b0190b2

Please sign in to comment.