-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Incorrect error from cquery when configuration flag has the default value #15797
Comments
Hello @konste, Above shared repo is throwing " syntax error near unexpected token `(' " while reproducing with given demonstrated steps. Could you please verify and share us the complete steps to reproduce the above issue. Thanks! |
This is weird! I cloned my repository, run @sgowroji what is the full error you are seeing? I wonder what line it complains about. |
This are the logs :
Mac OS, |
@sgowroji This is also missing from the original report, but you have to enclose the This should work:
|
Confirmed, thanks. Triage comment: as you observed, this requires In other words, Bazel has to know about a build setting to reason about that build setting. When you build with |
Indeed, check out: bazel/src/main/java/com/google/devtools/build/lib/query2/cquery/CqueryTransitionResolver.java Lines 172 to 174 in 4c735c1
|
That explanation makes sense to me, but it is still a bug with cquery, right? |
Yes. |
Oh sorry, I didn't see the "not a bug" tag. |
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 90 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 ( |
Description of the bug:
cquery produces incorrect error
transition inputs [@//:flavor] do not correspond to valid settings
when the flag is not set on the command line or set to the default value.What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Minimal repro provided here: https://github.com/Bazel-snippets/cquery_transition_error
The following command demonstrates the incorrect error:
bazel cquery somepath(transistor,dummy) --transitions=lite --//:flavor=opt
Error:
transition inputs [@//:flavor] do not correspond to valid settings
Omiting of the flag
flavor
or setting it to the default valueopt
causes the error. Setting it todbg
avoids the error.Using
--transitions=lite
andsomepath
query function both required to reproduce the problem.Which operating system are you running Bazel on?
Mac, Linux, Windows
What is the output of
bazel info release
?5.2
If
bazel info release
returnsdevelopment version
or(@non-git)
, tell us how you built Bazel.No response
What's the output of
git remote get-url origin; git rev-parse master; git rev-parse HEAD
?No response
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
No response
The text was updated successfully, but these errors were encountered: