Skip to content

A file:// registry URI missing a slash leads the "domain" being used as the error message #24423

Open
@Silic0nS0ldier

Description

@Silic0nS0ldier

Description of the bug:

It is very easy to neglect adding the extra slash required to produce a valid file:// URI.

For example;

--registry=file://home/coder/work/bazel-central-registry

At a glance this looks right, but at runtime you'll end up with an error like the following.

ERROR: Error accessing registry file://home/coder/work/bazel-central-registry: Failed to fetch registry file file://home/coder/work/bazel-central-registry/modules/protobuf/25.3/MODULE.bazel: home. Type 'bazel help mod' for syntax and help.

The only hint as to the cause is the first path segment being the error message, otherwise this is a poor error message that doesn't actually explain what went wrong.

The correct argument would have been;

--registry=file:///home/coder/work/bazel-central-registry
                  ^

Which category does this issue belong to?

Documentation, External Dependency

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?

Linux (Ubuntu)

What is the output of bazel info release?

release 7.4.1

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 HEAD ?

No response

If this is a regression, please try to identify the Bazel commit where the bug was introduced with bazelisk --bisect.

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

No one assigned

    Labels

    P3We're not considering working on this, but happy to review a PR. (No assignee)help wantedSomeone outside the Bazel team could own thisteam-DocumentationDocumentation improvements that cannot be directly linked to other team labelsteam-ExternalDepsExternal dependency handling, remote repositiories, WORKSPACE file.type: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions