bazel: "foo-bar is not a legal workspace name" error is reported on Bazel@HEAD
It seems that on Bazel@HEAD (e6cce762d846f3915b834c278fcb7fa0072ea530) hyphen character is not accepted any more in workspace name?
/** A collection of global Starlark build API functions that apply to WORKSPACE files. */
public class WorkspaceGlobals implements WorkspaceGlobalsApi {
// Must start with a letter and can contain letters, numbers, and underscores
private static final Pattern LEGAL_WORKSPACE_NAME = Pattern.compile("^\\p{Alpha}\\w*$");
Am I missing something? I see these errors:
$ bazel build org.eclipse.jgit.ssh.apache/...
[...]
ERROR: /home/davido/.cache/bazel/_bazel_davido/e1ee1c2b4d81e57e5c4b6fbb219eece8/external/sshd-osgi/WORKSPACE:2:10: sshd-osgi is not a legal workspace name
ERROR: /home/davido/.cache/bazel/_bazel_davido/e1ee1c2b4d81e57e5c4b6fbb219eece8/external/sshd-sftp/WORKSPACE:2:10: sshd-sftp is not a legal workspace name
ERROR: /home/davido/.cache/bazel/_bazel_davido/e1ee1c2b4d81e57e5c4b6fbb219eece8/external/log-api/WORKSPACE:2:10: log-api is not a legal workspace name
INFO: Analyzed target //org.eclipse.jgit.ssh.apache:ssh-apache (28 packages loaded, 1339 targets configured).
INFO: Found 1 target...
The error is reported for the workspace
line, e.g. in external/log-api/WORKSPACE:2:10
:
# DO NOT EDIT: automatically generated WORKSPACE file for maven_jar rule
workspace(name = "log-api")
The build still succeeds.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 21 (21 by maintainers)
Commits related to this issue
- Allow hyhen char in workspace name Closes #11837. Change-Id: Ifc09fa7dd3aff244051feea1ff1c4e47236a08ab — committed to davido/bazel by davido 4 years ago
- Allow hyphen char in workspace name Closes #11837. Change-Id: Ifc09fa7dd3aff244051feea1ff1c4e47236a08ab — committed to davido/bazel by davido 4 years ago
- Allow hyphen char in workspace name Closes #11837. — committed to davido/bazel by davido 4 years ago
- Allow hyphen char in workspace name Closes #11837. Closes #11838. PiperOrigin-RevId: 326286694 — committed to bazelbuild/bazel by davido 4 years ago
- Allow dot ('.') in workspace names. RELNOTES: Dot ('.') is now allowed in workspace names. See https://github.com/bazelbuild/bazel/issues/11837. PiperOrigin-RevId: 327160423 — committed to bazelbuild/bazel by aiuto 4 years ago
- Allow hyphen char in workspace name Closes #11837. Closes #11838. PiperOrigin-RevId: 326286694 — committed to bazelbuild/bazel by davido 4 years ago
- Allow dot ('.') in workspace names. RELNOTES: Dot ('.') is now allowed in workspace names. See https://github.com/bazelbuild/bazel/issues/11837. PiperOrigin-RevId: 327160423 — committed to bazelbuild/bazel by aiuto 4 years ago
- Allow hyphen char in workspace name Closes #11837. Closes #11838. PiperOrigin-RevId: 326286694 — committed to bazelbuild/bazel by davido 4 years ago
- Allow dot ('.') in workspace names. RELNOTES: Dot ('.') is now allowed in workspace names. See https://github.com/bazelbuild/bazel/issues/11837. PiperOrigin-RevId: 327160423 — committed to bazelbuild/bazel by aiuto 4 years ago
- Release 3.5.0 (2020-09-02) Baseline: 889bc0b523b47eeb38a72bf9bb6858ee525a7c7e Cherry picks: + d6b9469efebd200a39d7fd43876a18822fcdbe7b: Make no-op starlark transition not affect the output ... — committed to bazelbuild/bazel by a-googler 4 years ago
- Release 3.5.0 (2020-09-02) Baseline: 889bc0b523b47eeb38a72bf9bb6858ee525a7c7e Cherry picks: + a7a0d48fbeb059ee60e77580e5d05baeefdd5699: Make no-op starlark transition not affect the output ... — committed to bazelbuild/bazel by a-googler 4 years ago
- Allow hyphen char in workspace name Closes #11837. Closes #11838. PiperOrigin-RevId: 326286694 — committed to michaeleisel/bazel by davido 4 years ago
- Allow dot ('.') in workspace names. RELNOTES: Dot ('.') is now allowed in workspace names. See https://github.com/bazelbuild/bazel/issues/11837. PiperOrigin-RevId: 327160423 — committed to michaeleisel/bazel by aiuto 4 years ago
- Release 3.5.0 (2020-09-02) Baseline: 889bc0b523b47eeb38a72bf9bb6858ee525a7c7e Cherry picks: + a7a0d48fbeb059ee60e77580e5d05baeefdd5699: Make no-op starlark transition not affect the output ... — committed to michaeleisel/bazel by a-googler 4 years ago
- Allow hyphen char in workspace name Closes #11837. Closes #11838. PiperOrigin-RevId: 326286694 — committed to bazelbuild/bazel by davido 4 years ago
- Allow dot ('.') in workspace names. RELNOTES: Dot ('.') is now allowed in workspace names. See https://github.com/bazelbuild/bazel/issues/11837. PiperOrigin-RevId: 327160423 — committed to bazelbuild/bazel by aiuto 4 years ago
- Allow hyphen char in workspace name Closes #11837. Closes #11838. PiperOrigin-RevId: 326286694 — committed to bazelbuild/bazel by davido 4 years ago
- Allow dot ('.') in workspace names. RELNOTES: Dot ('.') is now allowed in workspace names. See https://github.com/bazelbuild/bazel/issues/11837. PiperOrigin-RevId: 327160423 — committed to bazelbuild/bazel by aiuto 4 years ago
- Release 3.5.1 (2020-10-01) Baseline: 889bc0b523b47eeb38a72bf9bb6858ee525a7c7e Cherry picks: + a7a0d48fbeb059ee60e77580e5d05baeefdd5699: Make no-op starlark transition not affect the output ... — committed to bazelbuild/bazel by a-googler 4 years ago
- Release 3.5.1 (2020-10-01) Baseline: 889bc0b523b47eeb38a72bf9bb6858ee525a7c7e Cherry picks: + a7a0d48fbeb059ee60e77580e5d05baeefdd5699: Make no-op starlark transition not affect the output ... — committed to Yannic/bazel by a-googler 4 years ago
I’m counting this as concensus.
Gerrit Code Review and JGit projects are using hyphen character in workspace names for years, started from Bazel 0.6.
See this CL: [1] from July 2018, quoting the commit message:
[1] https://gerrit-review.googlesource.com/c/gerrit/+/183530