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

Module mapping error message needs to be more actionable. #24803

Open
bcsgh opened this issue Dec 27, 2024 · 0 comments · May be fixed by #24804
Open

Module mapping error message needs to be more actionable. #24803

bcsgh opened this issue Dec 27, 2024 · 0 comments · May be fixed by #24804
Assignees
Labels
P1 I'll work on this now. (Assignee required) team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. type: feature request

Comments

@bcsgh
Copy link

bcsgh commented Dec 27, 2024

Description of the feature request:

I made some changes and got an error message like this:

ERROR: Error computing the main repository mapping: module not found in registries: [email protected]

While this tells me that something is wrong, it gives almost no information about what went wrong or how to fix it. In my case, the module and version existed in one of the registries provided via --registry= but Bazel provided no information about why it wasn't found or even where it was looked for.

What I would like to see is that message followed by an ordered enumeration of everywhere Bazel could possibly get the module from and either what it found or why it didn't look:

ERROR: Error computing the main repository mapping: module not found in registries: [email protected]
https://bcr.bazel.build (from --registry): not found (from MODULE.bazel.lock)
https://bcsgh.github.io/bazel-registry (from --registry): not found (from MODULE.bazel.lock)
file:///home/bcs/bazel-registry-private/ (from --registry): not found (from file://)

Eventually I figured out that deleting MODULE.bazel.lock fixed the problem, but that was just a lucky guess. The (from MODULE.bazel.lock) would have been the important part in my case.

A flag to get even more details (like full URLs inspected) would be useful as well.

Which category does this issue belong to?

Core

What underlying problem are you trying to solve with this feature?

UX/Usability

Which operating system are you running Bazel on?

n/a

What is the output of bazel info release?

release 8.0.0

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 ?

Not public

Have you found anything relevant by searching the web?

No response

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

No response

@github-actions github-actions bot added the team-Core Skyframe, bazel query, BEP, options parsing, bazelrc label Dec 27, 2024
@fmeum fmeum assigned fmeum and unassigned sgowroji, iancha1992 and satyanandak Dec 28, 2024
@fmeum fmeum added team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. P1 I'll work on this now. (Assignee required) and removed untriaged team-Core Skyframe, bazel query, BEP, options parsing, bazelrc labels Dec 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 I'll work on this now. (Assignee required) team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. type: feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants