tweag / clodl

Turn dynamically linked ELF binaries and libraries into self-contained closures.
BSD 3-Clause "New" or "Revised" License
164 stars 6 forks source link

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

Open hofbi opened 3 weeks ago

hofbi commented 3 weeks ago

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

To Reproduce

Expected behavior The build passes successfully

Environment

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
avdv commented 3 weeks ago

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. :smile_cat:

hofbi commented 3 weeks ago

I give it a try by migrating to bzlmod