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

Bzlmod doesn't detect repo usage correctly #727

Open
mering opened this issue Oct 22, 2024 · 1 comment
Open

Bzlmod doesn't detect repo usage correctly #727

mering opened this issue Oct 22, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@mering
Copy link
Contributor

mering commented Oct 22, 2024

When following the instructions from the release:

bazel_dep(name = "rules_oci", version = "2.0.1")
# For testing, we also recommend https://registry.bazel.build/modules/container_structure_test

oci = use_extension("@rules_oci//oci:extensions.bzl", "oci")

# Declare external images you need to pull, for example: 
oci.pull(
    name = "distroless_base",
    # 'latest' is not reproducible, but it's convenient.
    # During the build we print a WARNING message that includes recommended 'digest' and 'platforms'
    # values which you can use here in place of 'tag' to pin for reproducibility.
    tag = "latest",
    image = "gcr.io/distroless/base",
    platforms = ["linux/amd64"],
)

# For each oci.pull call, repeat the "name" here to expose them as dependencies.
use_repo(oci, "distroless_base")

I get the following warning:

WARNING: REPO/MODULE.bazel:320:20: The module extension oci defined in @rules_oci//oci:extensions.bzl reported incorrect imports of repositories via use_repo():

Imported, but reported as indirect dependencies by the extension:
    distroless_base

 ** You can use the following buildozer command to fix these issues:

buildozer 'use_repo_remove @rules_oci//oci:extensions.bzl oci distroless_base' //MODULE.bazel:all
@thesayyn thesayyn added the bug Something isn't working label Oct 28, 2024
@flolu
Copy link

flolu commented Dec 22, 2024

Same issue for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants