-
Notifications
You must be signed in to change notification settings - Fork 11
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
Ap/bzlmod #16
Ap/bzlmod #16
Changes from 34 commits
638d60c
feff1fb
6a59b50
13a045e
7fa847b
2ea77b5
fae4eeb
1c7aaf1
e3bddbf
350e6f7
80bc572
0690e61
b274a01
7473e00
2c6f4ff
63e8120
d15b3b4
bd15ed4
9d2c51d
59e57c5
ee86305
cff946f
bc4e954
18a0ba1
1946e1e
9a2d61c
79c7a45
449c73c
3a38106
fb3f032
e6505dd
2bf8924
33d16f5
b801c28
35938ec
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
common --enable_bzlmod | ||
build --nolegacy_external_runfiles | ||
build --verbose_failures | ||
build --@io_bazel_rules_go//go/config:pure | ||
test --test_output=errors | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
6.3.2 | ||
7.0.2 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
module( | ||
name = "rules_gitops", | ||
version = "0.50.0", | ||
) | ||
|
||
bazel_dep(name = "aspect_bazel_lib", version = "2.4.1") | ||
bazel_dep(name = "bazel_skylib", version = "1.5.0") | ||
bazel_dep(name = "platforms", version = "0.0.8") | ||
bazel_dep(name = "rules_oci", version = "1.7.2") | ||
bazel_dep(name = "rules_pkg", version = "0.9.1") | ||
bazel_dep(name = "rules_go", version = "0.46.0", repo_name = "io_bazel_rules_go") | ||
|
||
go_sdk = use_extension("@io_bazel_rules_go//go:extensions.bzl", "go_sdk") | ||
go_sdk.download(version = "1.21.5") | ||
apesternikov marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The version of the Go SDK specified for download is "1.21.5", which does not correspond to any official Go release version. Using a non-existent or incorrect version of the Go SDK could lead to build failures or unexpected behavior. It is important to specify a valid Go version that matches the official release versions. The recommended solution is to verify the intended Go version and update the version string to match an official Go release, such as "1.15.5" or "1.16.3". There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The Go SDK version specified for download, "1.21.5", does not exist as Go versions follow a different semantic versioning pattern. The latest Go versions as of the last update are in the format of "1.x" where x is a sequential number, and there hasn't been a version "1.21.5". This could lead to build failures or unexpected behavior due to the incorrect version specification. It's recommended to verify and use a valid Go version that matches the project's requirements and is compatible with the rest of the dependencies. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The Go SDK version specified for download, "1.21.5", does not exist. The Go project follows a versioning scheme of |
||
|
||
bazel_dep(name = "gazelle", version = "0.35.0", repo_name = "bazel_gazelle") | ||
|
||
go_deps = use_extension("@bazel_gazelle//:extensions.bzl", "go_deps") | ||
go_deps.from_file(go_mod = "//:go.mod") | ||
use_repo( | ||
go_deps, | ||
"com_github_ghodss_yaml", | ||
"com_github_golang_protobuf", | ||
"com_github_google_go_cmp", | ||
"com_github_google_go_github_v32", | ||
"com_github_xanzy_go_gitlab", | ||
"io_k8s_api", | ||
"io_k8s_apimachinery", | ||
"io_k8s_client_go", | ||
"org_golang_x_oauth2", | ||
) | ||
|
||
toolchains = use_extension( | ||
"@rules_gitops//gitops:extensions.bzl", | ||
"toolchains", | ||
) | ||
toolchains.kustomize() | ||
use_repo(toolchains, "kustomize_bin", "kustomize_toolchains") | ||
|
||
register_toolchains("@kustomize_toolchains//:all") | ||
|
||
# Uncomment this part when bazel 6 is deprecated. Supported in bazel 7 | ||
# kubeconfig = use_repo_rule("@rules_gitops//skylib:k8s.bzl", "kubeconfig") | ||
|
||
# kubeconfig( | ||
# name = "k8s_test", | ||
# cluster = "mycluster", | ||
# use_host_config = True, | ||
# ) | ||
|
||
bazel_dep(name = "buildifier_prebuilt", version = "6.4.0", dev_dependency = True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
go_sdk.download
function is called with a specific version of the Go SDK (1.21.5
). This version of the Go SDK does not exist as Go versions follow aMAJOR.MINOR.PATCH
format and as of my knowledge cutoff in early 2023, the Go language has not reached a1.21.x
version. Using a non-existent or incorrect version could lead to build failures or unexpected behavior. It is important to specify a valid Go SDK version that is compatible with the project's requirements.Recommended solution: Verify the intended Go SDK version and update the
version
argument togo_sdk.download
with a valid Go version. If the version was a typo, correct it to the intended version, such as1.21.5
to1.20.5
if that was the intended release.