Closed alexeagle closed 1 year ago
Here's what it looks like going into the Bazel module registry: https://github.com/bazelbuild/bazel-central-registry/pull/997
Thank you so much for this PR! Could you also add an example of using the buf_dependencies
repo rule?
Closes #33
@srikrsna-buf done
Ping @srikrsna-buf
Was caught up with something I'll take a closer look at this today.
plis merge i cri everyday
I am also in emotional distress @srikrsna-buf
Hey @alexeagle! I am not sure if you can see this, but I reviewed it last week asking about the examples.
If you have, then don't you think we should update all the examples?
Hey @alexeagle , any update?
I'll merge this and take up examples in a later PR, @DebkanchanSamadder you can use modules already based on thanks to @alexeagle for using a patch: https://github.com/bazelbuild/bazel-central-registry/pull/997
@alexeagle I don't have permission to push to the fork, could you resolve the merge conflicts? Alternatively, I've resolved conflicts and pushed it to bzlmod
branch on this repo, you can push that branch to your fork
Can't seem to make it work with gazelle. Getting the following error
error loading package '@rules_buf~0.1.1//gazelle/buf': Unable to find package for @[unknown repo 'io_bazel_rules_go' requested from @rules_buf~0.1.1]//go:def.bzl: The repository '@[unknown repo 'io_bazel_rules_go' requested from @rules_buf~0.1.1]' could not be resolved: No repository visible as '@io_bazel_rules_go' from repository '@rules_buf~0.1.1'. and referenced by '//:gazelle-buf'
here's the BUILD file
load("@gazelle//:def.bzl", "DEFAULT_LANGUAGES", "gazelle", "gazelle_binary")
gazelle_binary(
name = "gazelle-buf",
languages = DEFAULT_LANGUAGES + [
# Loads the Buf extension
"@rules_buf//gazelle/buf:buf",
# NOTE: This needs to be loaded after the proto language
],
)
# gazelle:prefix github.com/ride-app/driver-service
# gazelle:build_file_name BUILD.bazel
# gazelle:exclude infra
# gazelle:proto disable_global
gazelle(
name = "gazelle",
gazelle = ":gazelle-buf",
)
@srikrsna-buf I rebased it.
Sorry I forgot about your request to merge the examples. I'll do that, but I'm not sure I can get to it right away, so yeah if you're okay to merge in this state, it would help folks who are trying to turn on bzlmod with Bazel 7 right now.
I can merge this without the examples but was just looking at https://github.com/bufbuild/rules_buf/pull/42#issuecomment-1797519771 to see if it works with gazelle.
Actually lets merge this as is, I'll take up fixing it for gazelle in a followup pr as that is not being read from here.
@srikrsna-buf thanks, can we work on publishing a release now?
Bazel modules are moving away from setup in WORKSPACE files, towards a 'package manager' called bzlmod. Such modules are published on https://registry.bazel.build and are easier for developers to consume in their Bazel projects.