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

[Bazel CI] Missing rules_java dependency for aswb package #7232

Open
sgowroji opened this issue Jan 20, 2025 · 8 comments
Open

[Bazel CI] Missing rules_java dependency for aswb package #7232

sgowroji opened this issue Jan 20, 2025 · 8 comments
Assignees
Labels
awaiting-maintainer Awaiting review from Bazel team on issues lang: java Java rules integration product: Android Studio Android Studio plugin type: bug

Comments

@sgowroji
Copy link
Member

sgowroji commented Jan 20, 2025

CI: https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/4409#019481e5-5338-4800-b73c-3126ee56d480

Platform: Ubuntu

Logs:

ERROR: �[0mSkipping '//aswb/...': error loading package under directory 'aswb': error loading package 'aswb': Unable to find package for @@[unknown repo 'rules_java' requested from @@]//java:defs.bzl: The repository '@@[unknown repo 'rules_java' requested from @@]' could not be resolved: No repository visible as '@rules_java' from main repository. Was the repository introduced in WORKSPACE? The WORKSPACE file is disabled by default in Bazel 8 (late 2024) and will be removed in Bazel 9 (late 2025), please migrate to Bzlmod. See https://bazel.build/external/migration.
ERROR: �[0merror loading package under directory 'aswb': error loading package 'aswb': Unable to find package for @@[unknown repo 'rules_java' requested from @@]//java:defs.bzl: The repository '@@[unknown repo 'rules_java' requested from @@]' could not be resolved: No repository visible as '@rules_java' from main repository. Was the repository introduced in WORKSPACE? The WORKSPACE file is disabled by default in Bazel 8 (late 2024) and will be removed in Bazel 9 (late 2025), please migrate to Bzlmod. See https://bazel.build/external/migration.

Culprit:

Steps:

git clone https://github.com/bazelbuild/intellij
git reset 1f1997b6fe47176ad59773cc2991915a451fe8e6  --hard
export USE_BAZEL_VERSION=7d50755cf12e40838096ad5142bf1f41e96789e9 
bazel build --define=ij_product=android-studio-latest -- //aswb/...

CC Greenteam @fweikert

@sgowroji sgowroji added type: bug product: Android Studio Android Studio plugin lang: java Java rules integration awaiting-maintainer Awaiting review from Bazel team on issues labels Jan 20, 2025
@sgowroji sgowroji assigned mai93 and unassigned sgowroji, iancha1992 and satyanandak Jan 20, 2025
@mai93
Copy link
Collaborator

mai93 commented Jan 20, 2025

@Wyverald I think bazelbuild/bazel@37e0d23 caused this failure, we still need --enable_workspace for rules_scala (https://github.com/bazelbuild/intellij/blob/master/WORKSPACE.bzlmod), is there a workaround for this?

@sgowroji
Copy link
Member Author

@mai93 @Wyverald Any update on this issue ?

@Wyverald
Copy link
Member

There's no way to turn on WORKSPACE anymore with Bazel@HEAD. @mbland has been doing amazing work to migrate rules_scala to Bzlmod (follow along at bazelbuild/rules_scala#1482), so that might be the only way out if we want the intellij plugin to work with Bazel 9+. Until then, we might need to disable this on the downstream pipeline.

Wyverald pushed a commit to bazelbuild/continuous-integration that referenced this issue Jan 28, 2025
…2163)

Disabling IntelliJ, Clion, Android Studio & Aspect Google plugins due to
failures in the downstream CI pipelines
bazelbuild/intellij#7232 (comment)
@ujohnny
Copy link
Collaborator

ujohnny commented Feb 3, 2025

@mai93 should you be the assignee here? I guess we can replace rules_scala with @mbland's version from bzlmod-bazel-8 here and get back to downstream. WDYT?

@mai93
Copy link
Collaborator

mai93 commented Feb 3, 2025

@ujohnny I did not know about this workaround, please feel free to apply it then @sgowroji can reenable these tests.

@sellophane
Copy link
Collaborator

I've created a PR with bzlmod compatiblerules_scalaand run tests against last_green. @Wyverald is it enough then to revive downstream checks (assuming it will be merged)? Or are there any additional tests scenarios I might be not aware of?

@ujohnny
Copy link
Collaborator

ujohnny commented Feb 7, 2025

@sgowroji we address the issue in the plugin, could you please enable downstream testing back? Please confirm that downstream testing is fine and then I'll close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-maintainer Awaiting review from Bazel team on issues lang: java Java rules integration product: Android Studio Android Studio plugin type: bug
Projects
Status: Untriaged
Development

No branches or pull requests

7 participants