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

android_sdk_repository isn't compatible with Bzlmod #144

Open
Bencodes opened this issue Sep 19, 2023 · 7 comments
Open

android_sdk_repository isn't compatible with Bzlmod #144

Bencodes opened this issue Sep 19, 2023 · 7 comments

Comments

@Bencodes
Copy link
Contributor

The current Starlark implementation relies on native functions like bind and register_toolchains which are not supported in the Bzlmod MODULE.bazel file.

@keith
Copy link
Member

keith commented Sep 20, 2023

this is mostly fixed by #147, for the bind uses we'll have to change bazel I believe

@meteorcloudy
Copy link
Member

For avoiding bind usages, you can check https://bazel.build/external/migration#bind-targets, my guess is no Bazel change is required.

@meteorcloudy
Copy link
Member

meteorcloudy commented Sep 26, 2023

Oh, unless some Bazel native code is referring to //external:*.. /cc @ahumesky @ted-xie

@katre
Copy link
Member

katre commented Sep 26, 2023

Native Android rules depend on //external for a variety of things (mostly implicit dependencies on tools and the SDKs).

We should be able to remove these in the Starlark rules for the most part.

@meteorcloudy
Copy link
Member

And https://cs.opensource.google/bazel/bazel/+/master:src/tools/android/java/com/google/devtools/build/android/r8/BUILD;l=55

I believe even before starlarkfying the android build rules, we can just replace those labels to directly pointing to @bazel_tools

@katre
Copy link
Member

katre commented Sep 26, 2023

The actual labels are in @androidsdk, unless the user names the repo something different, and not all projects even create the repo (which is why //external:has_androidsdk exists).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants