Skip to content

Allow --override_repository to accept apparent repo names (as seen from the main repo), in addition to canonical repo names #17128

@keith

Description

@keith

Description of the bug:

If you have a module extension with bzlmod that loads arbitrary http_archives like:

use_repo(
    deps,
    "Yams",
...

you cannot override it with --override_module because of the capital letter:

--override_module=Yams=/Users/ksmiley/dev/Yams:

ERROR: While parsing option --override_module=Yams=/Users/ksmiley/dev/Yams: invalid module name 'Yams': valid names must 1) only contain lowercase letters (a-z), digits (0-9), dots (.), hyphens (-), and underscores (_); 2) begin with a lowercase letter; 3) end with a lowercase letter or digit.

Using ---override_repository also has no affect.

I'm not sure if the bug here is that these names should be allowed, or if there should be a different way to override these

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?

No response

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-ExternalDepsExternal dependency handling, remote repositiories, WORKSPACE file.type: feature request

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions