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
Subworkspaces causes errors in result of bazel query command #13545
Comments
Similar problems when using external dependencies.
in WORKSPACE file will cause problem in BUILD file:
Unless |
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 ( |
This issue has been automatically closed due to inactivity. If you're still interested in pursuing this, please reach out to the triage team ( |
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
?facc7d5
4fd8e562a061dd6b1481ed034f276a6d41d70507
Have you found anything relevant by searching the web?
No
Any other information, logs, or outputs that you want to share?
The text was updated successfully, but these errors were encountered: