tulsi icon indicating copy to clipboard operation
tulsi copied to clipboard

Failed to query information about the Bazel workspace

Open WIndFate opened this issue 3 years ago • 6 comments

I am using Xcode 12.4, and I got this error. スクリーンショット 2021-07-12 16 38 05

WIndFate avatar Jul 12 '21 07:07 WIndFate

Same thing, did you find a solution?

aaronn avatar Jul 21 '21 02:07 aaronn

What project repros with this? Is there nothing else in that text box at the bottom? Or at this one?

Untitled

keith avatar Jul 21 '21 03:07 keith

Some info– I'm running this macOS 11.4 and trying to get Mediapipe running through their instructions:

  1. I'm doing a brew install bazel
  2. Then I'm checking out Tulsi and doing sh build_and_run.sh -x 12.5 for Xcode 12.5
  3. Then I'm doing a git clone https://github.com/google/mediapipe.git
  4. And I'm opening the mediapipe/Mediapipe.tulsiproj file.
  5. This is the full output of the bottom panel when I open this file:
[8:30:51 PM](3): Running /usr/local/Cellar/bazel/4.1.0/bin/bazel info '--override_repository=tulsi=/Users/aaron/Library/Application Support/Tulsi/0.20210318.88/Bazel'
[8:30:51 PM](3): Bazel command info:
/usr/local/Cellar/bazel/4.1.0/bin/bazel info '--override_repository=tulsi=/Users/aaron/Library/Application Support/Tulsi/0.20210318.88/Bazel'
Exited with code 1


[8:30:51 PM](0): Failed to query information about the Bazel workspace. Bazel exited with code 1 [Details]: 
[8:30:51 PM](0): Was not able to extract the execution root from the workspace. This is a Tulsi or Bazel bug, please report.
[8:30:51 PM](3): Running /usr/local/Cellar/bazel/4.1.0/bin/bazel --max_idle_secs=60 query '--override_repository=tulsi=/Users/aaron/Library/Application Support/Tulsi/0.20210318.88/Bazel' --announce_rc --noimplicit_deps --order_output=no --noshow_loading_progress --noshow_progress 'kind(rule, :all)+kind(rule, mediapipe:all)+kind(rule, mediapipe/examples/ios:all)+kind(rule, mediapipe/examples/ios/facedetectioncpu:all)+kind(rule, mediapipe/examples/ios/facedetectiongpu:all)+kind(rule, mediapipe/examples/ios/faceeffect:all)+kind(rule, mediapipe/examples/ios/facemeshgpu:all)+kind(rule, mediapipe/examples/ios/handdetectiongpu:all)+kind(rule, mediapipe/examples/ios/handtrackinggpu:all)+kind(rule, mediapipe/examples/ios/holistictrackinggpu:all)+kind(rule, mediapipe/examples/ios/iristrackinggpu:all)+kind(rule, mediapipe/examples/ios/objectdetectioncpu:all)+kind(rule, mediapipe/examples/ios/objectdetectiongpu:all)+kind(rule, mediapipe/examples/ios/objectdetectiontrackinggpu:all)+kind(rule, mediapipe/examples/ios/posetrackinggpu:all)+kind(rule, mediapipe/examples/ios/selfiesegmentationgpu:all)+kind(rule, mediapipe/objc:all)' --output xml
[8:30:51 PM](3): Bazel command info:
/usr/local/Cellar/bazel/4.1.0/bin/bazel --max_idle_secs=60 query '--override_repository=tulsi=/Users/aaron/Library/Application Support/Tulsi/0.20210318.88/Bazel' --announce_rc --noimplicit_deps --order_output=no --noshow_loading_progress --noshow_progress 'kind(rule, :all)+kind(rule, mediapipe:all)+kind(rule, mediapipe/examples/ios:all)+kind(rule, mediapipe/examples/ios/facedetectioncpu:all)+kind(rule, mediapipe/examples/ios/facedetectiongpu:all)+kind(rule, mediapipe/examples/ios/faceeffect:all)+kind(rule, mediapipe/examples/ios/facemeshgpu:all)+kind(rule, mediapipe/examples/ios/handdetectiongpu:all)+kind(rule, mediapipe/examples/ios/handtrackinggpu:all)+kind(rule, mediapipe/examples/ios/holistictrackinggpu:all)+kind(rule, mediapipe/examples/ios/iristrackinggpu:all)+kind(rule, mediapipe/examples/ios/objectdetectioncpu:all)+kind(rule, mediapipe/examples/ios/objectdetectiongpu:all)+kind(rule, mediapipe/examples/ios/objectdetectiontrackinggpu:all)+kind(rule, mediapipe/examples/ios/posetrackinggpu:all)+kind(rule, mediapipe/examples/ios/selfiesegmentationgpu:all)+kind(rule, mediapipe/objc:all)' --output xml
Exited with code 1


[8:30:51 PM](0): Failed to retrieve information about the Bazel workspace. This usually means that the contents of a BUILD file are incorrect or flags are missing. Read the message log carefully for details. [Details]: 
  1. If I then go to Configs and click Generate for Mediapipe, I get this error as an alert popup:
Failed to query information about the Bazel workspace. Bazel exited with code 1
Was not able to extract the execution root from the workspace. This is a Tulsi or Bazel bug, please report.
Failed to retrieve information about the Bazel workspace. This usually means that the contents of a BUILD file are incorrect or flags are missing. Read the message log carefully for details.
Failed to query information about the Bazel workspace. Bazel exited with code 1
Was not able to extract the execution root from the workspace. This is a Tulsi or Bazel bug, please report.
Was not able to extract the bazel bin symlink name from the workspace. This is a Tulsi or Bazel bug, please report.
Failed to retrieve information about the Bazel workspace. This usually means that the contents of a BUILD file are incorrect or flags are missing. Read the message log carefully for details.
Project generation failed.
Generate[FAIL]: 0.0948s
Failed to create Xcode project.

A fatal error occurred. Please check the message window and file a bug if appropriate.
General failure: Bazel aspects could not be built.

aaronn avatar Jul 21 '21 03:07 aaronn

Okay, so I was actually able to solve this by:

  1. Specifically installing Bazel 3.7.2
  2. Checking out a version of Tulsi from around the time Bazel 3.7.2 was released.

Looks like (for me at least) this was a MediaPipe problem and not a Tulsi / Bazel problem.

aaronn avatar Jul 21 '21 03:07 aaronn

ah interesting, it does look like they pin the bazel version to that https://github.com/google/mediapipe/blob/374f5e2e7e818bde5289fb3cffa616705cec6f73/.bazelversion#L1 today

keith avatar Jul 21 '21 03:07 keith

ah interesting, it does look like they pin the bazel version to that https://github.com/google/mediapipe/blob/374f5e2e7e818bde5289fb3cffa616705cec6f73/.bazelversion#L1 today

thanks 👍

linhndSolar avatar Dec 01 '21 16:12 linhndSolar

Thanks for submitting this issue but this tool is being deprecated. Please checkout rules_xcodeproj for a more complete and maintained Xcode integration.

keith avatar Feb 15 '23 17:02 keith