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
Given a workspace with name my_workspace, I can load .bzl files using the paths //path/to:file.bzl or @my_workspace//path/to:file.bzl. I would expect these to be the equivalent, but they are not. It seems that providers are distinct between the two paths, which leads to awful error messages because there is no distinction in the error message between the two providers.
endobson@yggdrasil () ~/tmp/example-repo % bazel build //:all (1)
INFO: Reading 'startup' options from /Users/endobson/.bazelrc: --watchfs
ERROR: /Users/endobson/tmp/example-repo/BUILD:30:10: in deps attribute of my_rule rule //:base3: '//:remote1' does not have mandatory providers: 'my_provider'.
ERROR: /Users/endobson/tmp/example-repo/BUILD:25:10: in deps attribute of my_rule rule //:remote3: '//:base1' does not have mandatory providers: 'my_provider'.
WARNING: errors encountered while analyzing target '//:base3': it will not be built.
WARNING: errors encountered while analyzing target '//:remote3': it will not be built.
INFO: Analysis succeeded for only 4 of 6 top-level targets
INFO: Found 4 targets...
ERROR: command succeeded, but not all targets were analyzed.
INFO: Elapsed time: 0.139s, Critical Path: 0.00s
endobson@yggdrasil () ~/tmp/example-repo % bazel version (1)
INFO: Reading 'startup' options from /Users/endobson/.bazelrc: --watchfs
Build label: 0.5.4- (@non-git)
Build target: bazel-out/darwin_x86_64-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Thu Aug 31 04:32:51 2017 (1504153971)
Build timestamp: 1504153971
Build timestamp as int: 1504153971
Given a workspace with name
my_workspace
, I can load.bzl
files using the paths//path/to:file.bzl
or@my_workspace//path/to:file.bzl
. I would expect these to be the equivalent, but they are not. It seems that providers are distinct between the two paths, which leads to awful error messages because there is no distinction in the error message between the two providers.Example available at:
https://github.com/endobson/examples/tree/bazel-provider
The text was updated successfully, but these errors were encountered: