bazelbuild/bazel

valid user-provided repo names are not documented

Open

#24.285 geöffnet am 12. Nov. 2024

Auf GitHub ansehen
 (1 Kommentar) (1 Reaktion) (1 zugewiesene Person)Java (4.465 Forks)batch import
P2help wantedteam-Documentationteam-ExternalDepstype: documentation (cleanup)

Repository-Metriken

Stars
 (25.384 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 22T 20h) (77 gemergte PRs in 30 T)

Beschreibung

Page link:

No response

Problem description (include actual vs expected text, if applicable):

I ran into an error like this when trying to enable bzlmod in our repository (with Bazel 7.2.1):

Error in use_repo: invalid user-provided repo name '2022-05-11_log': valid names may contain only A-Z, a-z, 0-9, '-', '_', '.', and must start with a letter

Interestingly enough, this repository name was just fine without bzlmod enabled. Where are the restrictions on user-provided repo names documented on bazel.build? I saw nothing relevant on https://bazel.build/rules/lib/globals/module#use_repo

Where do you see this issue? (include link to specific section of the page, if applicable)

One place where it appears to be missing is https://bazel.build/rules/lib/globals/module#use_repo but I suspect it should be mentioned more centrally as well, as it is intended to apply to all repository names.

Any other information you'd like to share?

Comments from @Wyverald on the Bazel slack:

Links in the screenshot are:

Contributor Guide