keith / buildifier-prebuilt

A bazel toolchain for using prebuilt binaries for buildifier and buildozer
MIT License
35 stars 13 forks source link

No repository visible as '@cgrindel_bazel_starlib' from repository '@@buildifier_prebuilt~6.4.0' #85

Open vonschultz opened 8 months ago

vonschultz commented 8 months ago

Steps to reproduce

$ echo 7.0.0 > .bazelversion
$ echo 'bazel_dep(name = "buildifier_prebuilt", version = "6.4.0", dev_dependency = True)' > MODULE.bazel
$ bazelisk query '@buildifier_prebuilt//...'

Expected behavior List of targets

Actual behavior

ERROR:
error loading package under directory '':
error loading package '@@buildifier_prebuilt~6.4.0//release':
Unable to find package for @@[unknown repo 'cgrindel_bazel_starlib' requested from @@buildifier_prebuilt~6.4.0]//bzlrelease:defs.bzl:
The repository '@@[unknown repo 'cgrindel_bazel_starlib' requested from @@buildifier_prebuilt~6.4.0]' could not be resolved:
No repository visible as '@cgrindel_bazel_starlib' from repository '@@buildifier_prebuilt~6.4.0'.

(Line breaks added after colon to make it easier to read, but it's all on one line really.)

cgrindel commented 8 months ago

I was able to reproduce the issue. I believe it is because we provide a full source archive for buildifier_prebuilt, but we marked some of the dependencies as dev dependencies. I believe that the fix is one of the following:

  1. Provide a minimal archive that includes no references to the dev dependencies.
  2. Do not mark any dependencies as dev dependencies.