You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is needed, because in gerrit workspace plugin Skylark is defined in tools/bzl/plugin.bzl. What we want to achieve is that we can drop the above plugin in gerrit workspace in plugins directory and it would just work, until Bazel 0.25.
After migrating to 0.25 the above setting is broken, with:
$ bazel build :admin-console
ERROR: /home/davido/projects/admin-console/BUILD:1:1: file '//tools/bzl:plugin.bzl' does not contain symbol 'gerrit_plugin'
ERROR: /home/davido/projects/admin-console/BUILD:3:1: name 'gerrit_plugin' is not defined
ERROR: Skipping ':admin-console': no such target '//:admin-console': target 'admin-console' not declared in package '' defined by /home/davido/projects/admin-console/BUILD
WARNING: Target pattern parsing failed.
ERROR: no such target '//:admin-console': target 'admin-console' not declared in package '' defined by /home/davido/projects/admin-console/BUILD
INFO: Elapsed time: 0.090s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)
Workaround is to use --incompatible_no_transitive_loads=false:
It turns out that flipping of
--incompatible_no_transitive_loads
in #5636 broke standalone build mode for plugins in Gerrit Code Review. Issue upstream: https://bugs.chromium.org/p/gerrit/issues/detail?id=10855.We use bazlets repository to expose gerrit_plugin.bzl Skylark rule, store in bazlets//gerrit_plugin.bzl.
In Gerrit core, we use a different (native) implementation of gerrit_plugin.bzl stored in gerrit//tools/bzl/plugin.bzl.
In the plugin's BUILD file we say something like this:
This plugin can be built in two build modes with Bazel:
WORKSPACE
:Where bazlets.bzl is defined as follow:
But for this we need the transitive loading feature, because
//tools/bzl:plugin.bzl
is defined as follow in plugin workspace:This is needed, because in gerrit workspace plugin Skylark is defined in
tools/bzl/plugin.bzl
. What we want to achieve is that we can drop the above plugin in gerrit workspace in plugins directory and it would just work, until Bazel 0.25.After migrating to 0.25 the above setting is broken, with:
Workaround is to use
--incompatible_no_transitive_loads=false
:The text was updated successfully, but these errors were encountered: