Skip to content

Repo names in platform_mappings aren't handled with bzlmod #17127

@keith

Description

@keith

Description of the bug:

With a platform_mappings file like:

platforms:
  @build_bazel_apple_support//platforms:macos_x86_64
    --cpu=darwin_x86_64

and this in your MODULE.bazel:

bazel_dep(
    name = "apple_support",
    repo_name = "build_bazel_apple_support",
    version = "1.3.2",
)

bazel errors with:

no such package '@build_bazel_apple_support//platforms': The repository '@build_bazel_apple_support' could not be resolved: Repository '@build_bazel_apple_support' is not defined

changing to:

platforms:
  @apple_support~1.3.2//platforms:macos_x86_64
    --cpu=darwin_x86_64

seems to work, but I believe that would require updating version each time you updated the rules

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

No response

Which operating system are you running Bazel on?

macOS

What is the output of bazel info release?

6.0.0rc4

If bazel info release returns development version or (@non-git), tell us how you built Bazel.

No response

What's the output of git remote get-url origin; git rev-parse master; git rev-parse HEAD ?

No response

Have you found anything relevant by searching the web?

No response

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

No response

Metadata

Metadata

Assignees

Labels

P2We'll consider working on this in future. (Assignee optional)area-BzlmodBzlmod-specific PRs, issues, and feature requestsnot staleIssues or PRs that are inactive but not considered staleteam-Configurabilityplatforms, toolchains, cquery, select(), config transitionsteam-ExternalDepsExternal dependency handling, remote repositiories, WORKSPACE file.type: bug

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions