-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Custom build flags choke on prefix workspaces #9177
Comments
May I ping @juliexxia who did most of the job of implementing this exciting feature! And also @c-parsons who merged it. |
Thanks for the detailed example. |
This is a cutting edge feature so I'm not surprised this part doesn't work yet. I don't think anyone can take this on right now, but please re-ping whenever you feel to help us figure out a practical fix timeline. Appreciate your patient guinea pigging! |
@gregestren thanks for letting me know. I didn't quite get when you want me to re-ping you. |
There's no obvious person to work on this right now (#9177 (comment)). I don't want this to fall into oblivion but it might get lost in the issue load. So please offer us some leeway but feel free to re-ping if/when you feel it's sitting around for too long. :) |
I see, thanks! |
This will not work with Bazel until repository-prefixed command line flags are working (bazelbuild/bazel#9177). RELNOTES: None. PiperOrigin-RevId: 281381965
This will not work with Bazel until repository-prefixed command line flags are working (bazelbuild/bazel#9177). RELNOTES: None. PiperOrigin-RevId: 281381965
This will not work with Bazel until repository-prefixed command line flags are working (bazelbuild/bazel#9177). RELNOTES: None. PiperOrigin-RevId: 281994082
I've tested this issue again on the more recent Bazel version 2.1. The original issue is still present. I.e. defining the workspace name prefix on the flag causes the flag to be ignored, if it is defined locally. Meaning, this issue is still open. However, what is working now is to prefix the workspace name if the flag is defined in an external workspace. This is the use-case that is interesting for rule authors, because it allows them to define configurations in their rules sets that users can then affect on the command-line. I've forked and updated @ulysses4ever's reproduction here. This illustrates that if a rules set, say
|
We recently prioritized this general theme in #11128 and added all related issues. I forgot to include this one. Apologies. Thanks for the updated feedback. |
Let's consolidate these bugs into #11128. When that one is fixed, it if doesn't address this we can re-open this. |
This will not work with Bazel until repository-prefixed command line flags are working (bazelbuild/bazel#9177). RELNOTES: None. PiperOrigin-RevId: 281994082
Description of the problem
I believe custom build flags don't play well with proper
@namespace//...
-like references.Bugs: what's the simplest, easiest way to reproduce this bug?
I set up a repository with a repro -- check out the README. It follows closely the running example of drinks and flavors in the documentation. Except that it actually sets up a named workspace.
In the
master
branch of the repo, everything is fine: I'm able to pass the flag in the command line. In thebug
branch I add the workspace prefix when referencing the flag target from the attribute of my rule. This breaks the setup: I pass the flag in the command-line as before but it has no effect. If I try to add the workspace prefix when referencing the flag from the command-line, I get"Unrecognized option"
.What operating system are you running Bazel on?
Ubuntu 18.04
What's the output of
bazel info release
?If
bazel info release
returns "development version" or "(@non-git)", tell us how you built Bazel.This is the version of Bazel imported by Nixpkgs version referenced in the current
rules_haskell
(master branch).Have you found anything relevant by searching the web?
No. I only looked up the Issues here.
The text was updated successfully, but these errors were encountered: