Skip to content
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

Using plugin with bazel wrapper under tools/bazel (Android Studio) #6313

Open
AnDevi opened this issue Mar 22, 2024 · 4 comments
Open

Using plugin with bazel wrapper under tools/bazel (Android Studio) #6313

AnDevi opened this issue Mar 22, 2024 · 4 comments
Assignees
Labels
more-data-needed Awaiting response from issue author product: Android Studio Android Studio plugin type: bug

Comments

@AnDevi
Copy link

AnDevi commented Mar 22, 2024

Description of the bug:

I'm using this plugin with Android Studio 2023.3. (I also tried 2022.3 version)
It works fine when I don't have a wrapper for bazel placed under path {workspace}/tools/bazel,
but when I put wrapper under tools/bazel plugin fails during syncing the project.
I got an error: Error:ERROR: Skipping 'Support/Google/AndroidStudio2023.2/plugins/aswb/aspect'

This wrapper is something that I really need in my setup of bazel. Is it possible to use wrapper to bazel alongside with this plugin ?
Or I need to do something else to setup this correctly ?

Which category does this issue belong to?

No response

What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

Run simplest bazel project for android with wrapper under the path {workspace}/tools/bazel
bazel is an bash script with content:

#!/usr/bin/env bash
$BAZEL_REAL $@

Which Intellij IDE are you using? Please provide the specific version.

Android Studio 2023.3

What programming languages and tools are you using? Please provide specific versions.

Bazel: 7.1.0, sdk: android-33, java, cpp

What Bazel plugin version are you using?

Bazel for Android Studio plugin: 2024.02.27-aswb.0.1-api-version-232

Have you found anything relevant by searching the web?

No response

Any other information, logs, or outputs that you want to share?

No response

@AnDevi AnDevi added awaiting-maintainer Awaiting review from Bazel team on issues type: bug labels Mar 22, 2024
@sgowroji sgowroji added the product: Android Studio Android Studio plugin label Mar 22, 2024
@sgowroji sgowroji assigned mai93 and unassigned sgowroji and iancha1992 Mar 22, 2024
@mai93
Copy link
Collaborator

mai93 commented Mar 26, 2024

I was not able to reproduce the issue with the simple wrapper provided, did you specify the path to this wrapper in Settings -> Bazel Settings -> Bazel Binary Location?

@mai93 mai93 added more-data-needed Awaiting response from issue author and removed awaiting-maintainer Awaiting review from Bazel team on issues labels Mar 26, 2024
@AnDevi
Copy link
Author

AnDevi commented Mar 27, 2024

Under the Settings -> Bazel Settings -> Bazel Binary Location I got set just bazel.
When I set there path to this wrapper I tools/bazel I got different error:

Command: tools/bazel info --tool_tag=ijwb:AndroidStudio --curses=no --color=yes --progress_in_terminal_title=no --config=android --
tools/bazel: line 2: info: command not found

I think that is cuz when I run ./tools/bazel bazelisk is not setuping BAZEL_REAL variable, you need to use bazel binary to run that wrapper with BAZEL_REAL see I think.

I tried to change wrapper code to avoid lack of BAZEL_REAL:

#!/usr/bin/env bash
bazelisk $@ // can't use `bazel` in here cuz it'll cause infinite loop of recursive callings

but even with that I still got an error Error:Could not run Bazel info during syncing

@mai93
Copy link
Collaborator

mai93 commented Mar 27, 2024

can you try running the wrapper from command line to make sure it is working?

Also you may need to specify the absolute path of the wrapper in the Bazel Binary Location setting.

@AnDevi
Copy link
Author

AnDevi commented Mar 28, 2024

When I use in my wrapper bazelisk $@ instead of $BAZEL_REAL $@ I can run it from cmd line :)
Specifying absolute path gives me the same error in result : Error:Could not run Bazel info

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
more-data-needed Awaiting response from issue author product: Android Studio Android Studio plugin type: bug
Projects
None yet
Development

No branches or pull requests

4 participants