Skip to content

Commit

Permalink
Migrate to bzlmod. New errors suddenly appeared in the builds.
Browse files Browse the repository at this point in the history
New errors appeared in the builds, and migrating to bzlmod seems like the easiest solution to most of them.

There is still an issue with rules docker (rules_docer/issues#2275). #91
  • Loading branch information
jarondl committed Feb 13, 2024
1 parent f8ed4de commit 0406c74
Show file tree
Hide file tree
Showing 14 changed files with 3,686 additions and 191 deletions.
1 change: 1 addition & 0 deletions .bazelversion
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7.0.2
13 changes: 3 additions & 10 deletions BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
load("@rules_go//go:def.bzl", "go_library", "go_test")

# A build file for rpmpack.
# For running basic build/run/test you can also use the regular go tools,
# this is currently added to assist in external testing.

load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
load("@bazel_gazelle//:def.bzl", "gazelle")
load("@gazelle//:def.bzl", "gazelle")

# gazelle:prefix github.com/google/rpmpack
# gazelle:go_naming_convention import_alias
gazelle(name = "gazelle")

go_library(
Expand Down Expand Up @@ -50,9 +49,3 @@ go_test(
"@com_github_ulikunitz_xz//lzma",
],
)

alias(
name = "go_default_library",
actual = ":rpmpack",
visibility = ["//visibility:public"],
)
20 changes: 20 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
module(
name = "rpmpack",
version = "0.6.0",
)

bazel_dep(name = "rules_go", version = "0.46.0")
bazel_dep(name = "gazelle", version = "0.35.0")

go_deps = use_extension("@gazelle//:extensions.bzl", "go_deps")
go_deps.from_file(go_mod = "//:go.mod")

# All *direct* Go dependencies of the module have to be listed explicitly.
use_repo(
go_deps,
"com_github_cavaliergopher_cpio",
"com_github_google_go_cmp",
"com_github_klauspost_compress",
"com_github_klauspost_pgzip",
"com_github_ulikunitz_xz",
)
Loading

0 comments on commit 0406c74

Please sign in to comment.