Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Providers aren't shareable across different workspace aliases #3800

Closed
endobson opened this issue Sep 24, 2017 · 1 comment
Closed

Providers aren't shareable across different workspace aliases #3800

endobson opened this issue Sep 24, 2017 · 1 comment

Comments

@endobson
Copy link
Contributor

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

Example available at:
https://github.com/endobson/examples/tree/bazel-provider

@dslomov
Copy link
Contributor

dslomov commented Sep 25, 2017

Duplicate of #3493

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants