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

bzlmod No dependencies were provided. util_curl.go #825

Closed
brounnoupegreula-7757 opened this issue Aug 21, 2024 · 7 comments
Closed

bzlmod No dependencies were provided. util_curl.go #825

brounnoupegreula-7757 opened this issue Aug 21, 2024 · 7 comments

Comments

@brounnoupegreula-7757
Copy link

hi guys i try to add resty inside my bazel project its using bzlmod but i got this error

image

bazel_dep(name = "rules_go", version = "0.49.0")
bazel_dep(name = "gazelle", version = "0.38.0")

go_sdk = use_extension("@rules_go//go:extensions.bzl", "go_sdk")
go_sdk.download(version = "1.22.6")

go_deps = use_extension("@gazelle//:extensions.bzl", "go_deps")
go_deps.from_file(go_mod = "//:go.mod")
use_repo(go_deps, "com_github_bytedance_sonic")
use_repo(go_deps, "com_github_go_resty_resty_v2")
@jeevatkm
Copy link
Member

@brounnoupegreula-7757 I do not know much about Bazel. Please refer to this file https://github.com/go-resty/resty/blob/v2/BUILD.bazel

@jeevatkm
Copy link
Member

@brounnoupegreula-7757 Any update?

@frank30941
Copy link
Contributor

@brounnoupegreula-7757 Hi, below is my solution, and I use gazelle.

go_deps.gazelle_override(
    path = "github.com/go-resty/resty/v2",
)

@jeevatkm
Copy link
Member

@frank30941 Where should we add this line? In BUILD.bazel??

@frank30941
Copy link
Contributor

@jeevatkm I think you may follow up below steps. then you will see some BUILD.bazel changed.

 # 1.
brew install bazelisk
# or
go install github.com/bazelbuild/bazelisk@latest

# 2. in project path
bazelisk run gazelle
# or
go install github.com/bazelbuild/bazel-gazelle/cmd/gazelle@latest
gazelle

@frank30941
Copy link
Contributor

@jeevatkm Hi, I have a pr for you #833

@jeevatkm
Copy link
Member

PR #833 merged!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants