Open akstr opened 3 years ago
Similar problems when using external dependencies. E.g.:
http_archive(
name = "hwy",
url = "https://github.com/eustas/highway/archive/refs/heads/master.zip",
sha256 = "somehash",
strip_prefix = "highway-master",
)
in WORKSPACE file will cause problem in BUILD file:
ERROR: /project/BUILD:121:11: error loading package '@hwy//': Unable to find package for @bazel_skylib//lib:selects.bzl: The repository '@bazel_skylib' could not be resolved. and referenced by '//:target'
Unless bazel_skylib
is imported again in project WORKSPACE.
Thank you for contributing to the Bazel repository! This issue has been marked as stale since it has not had any activity in the last 1+ years. It will be closed in the next 14 days unless any other activity occurs or one of the following labels is added: "not stale", "awaiting-bazeler". Please reach out to the triage team (@bazelbuild/triage
) if you think this issue is still relevant or you are interested in getting the issue resolved.
This issue has been automatically closed due to inactivity. If you're still interested in pursuing this, please reach out to the triage team (@bazelbuild/triage
). Thanks!
Not fixed.
@bazelbuild/triage Not stale, please reopen
Description of the problem / feature request:
We have subworkspaces in our project and that causes problems for us with the query command. We have noticed that bazel does not detects that there is a subworkspace and instead just treat it as packages belonging to the workspace above. The problem comes when the target is addressed as @repo1//... and if there is a subrepo @repo2 is is just
treated as packages beloning to repo1.
More detailed description below
Example 1:
Our test project:
We are running from the the directory bazel:
The following commands gives different results:
The different targets @norden//... and //... gives different results. //... gives only result from Norden, @norden//:HelloNorden while @norden//... gives @norden//World:HelloWorld @norden//:HelloNorden
When reading about bazel, we get the impression that both these should give the same result: @norden//:HelloNorden
Example 2:
In our project we run into an error when running the command in another project:
The reason for the error is that bazel does not detect that cda is it own workspace.
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Running the command in a workspace containing a subworkspace
What operating system are you running Bazel on?
Linux
What's the output of
bazel info release
?development version
If
bazel info release
returns "development version" or "(@non-git)", tell us how you built Bazel.Cloned the bazel repo and comiled it
What's the output of
git remote get-url origin ; git rev-parse master ; git rev-parse HEAD
?facc7d5273dc31bfca04968f0ee1ed7d2769ddf9 4fd8e562a061dd6b1481ed034f276a6d41d70507
Have you found anything relevant by searching the web?
No
Any other information, logs, or outputs that you want to share?