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

bazel build //... fails with invalid repository name '@@' #54

Open
hofbi opened this issue Jun 13, 2024 · 2 comments · May be fixed by #56
Open

bazel build //... fails with invalid repository name '@@' #54

hofbi opened this issue Jun 13, 2024 · 2 comments · May be fixed by #56

Comments

@hofbi
Copy link
Contributor

hofbi commented Jun 13, 2024

Describe the bug
A clear and concise description of what the bug is.

To Reproduce

  • Clone the repo
  • Install the requirements
  • Run bazel build //...

Expected behavior
The build passes successfully

Environment

  • OS name + version: Ubuntu 20.04
  • Version of the code: Latest master

Additional context

INFO: Analyzed 4 targets (110 packages loaded, 1649 targets configured).
ERROR: ~/clodl/docs/BUILD:4:8: Generating proto for Starlark doc for docs failed: (Exit 1): stardoc failed: error executing Stardoc command (from target //docs:docs) bazel-out/k8-opt-exec-ST-d57f47055a04/bin/external/io_bazel_stardoc/stardoc/stardoc '--input=@@//clodl:clodl.bzl' '--workspace_name=' '--dep_roots=.' '--dep_roots=external/' ... (remaining 1 argument skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
Exception in thread "main" com.google.devtools.build.lib.cmdline.LabelSyntaxException: invalid repository name '@@': workspace names may contain only A-Z, a-z, 0-9, '-', '_' and '.'
        at com.google.devtools.build.lib.cmdline.Label.parseAbsolute(Label.java:149)
        at com.google.devtools.build.lib.cmdline.Label.parseAbsolute(Label.java:106)
        at com.google.devtools.build.skydoc.SkydocMain.main(SkydocMain.java:210)
INFO: Elapsed time: 3.997s, Critical Path: 2.63s
INFO: 24 processes: 18 internal, 4 linux-sandbox, 2 worker.
ERROR: Build did NOT complete successfully

Tasks

Preview Give feedback
No tasks being tracked yet.
@avdv
Copy link
Member

avdv commented Jun 13, 2024

This repository currently works with Bazel 3. It might also work with Bazel 4 and even 5, but 7 is probably not going to work (try to disable bzlmod and try again but here be dragons).

If you just want to try the project, just enter the nix shell and run bazel build ....

PRs welcome if you figure out how to make it work with more recent Bazel versions / bzlmod. 😸

@hofbi hofbi changed the title bazel build //.. fails with invalid repository name '@@' bazel build //... fails with invalid repository name '@@' Jun 13, 2024
@hofbi
Copy link
Contributor Author

hofbi commented Jun 13, 2024

I give it a try by migrating to bzlmod

@hofbi hofbi linked a pull request Jun 13, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants