-
Notifications
You must be signed in to change notification settings - Fork 14
use bazel 8 (bzlmod migration) #134
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
Changes from 25 commits
f6fc4e5
c868f86
af7037b
25b4b5d
f83e5f4
6a49984
cdaa29d
e79db87
d9ef5b6
4b13a78
f26fe40
01d338a
7d0fa1d
8b964ca
85270a3
eb9ab86
e5eeebc
eca18ba
93f48c5
ecc1759
0ec6048
f5a66e3
2a51dde
6a850b7
636d8bd
70ce403
03fec4e
6c130f3
d0b7a85
76dda19
fdafaf6
abb25e3
bff2d1e
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 +1 @@ | ||
7.x | ||
8.x |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,46 @@ | ||
############################################################################### | ||
# Bazel now uses Bzlmod by default to manage external dependencies. | ||
# Please consider migrating your external dependencies from WORKSPACE to MODULE.bazel. | ||
# | ||
# For more details, please check https://github.com/bazelbuild/bazel/issues/18958 | ||
############################################################################### | ||
module(name = "fizzbee") | ||
|
||
# Go with gazelle see https://github.com/bazel-contrib/rules_go/blob/master/docs/go/core/bzlmod.md | ||
bazel_dep(name = "rules_go", version = "0.46.0") | ||
bazel_dep(name = "gazelle", version = "0.34.0") | ||
|
||
go_sdk = use_extension("@rules_go//go:extensions.bzl", "go_sdk") | ||
go_sdk.download(version = "1.22.4") | ||
|
||
# External go deps | ||
go_deps = use_extension("@gazelle//:extensions.bzl", "go_deps") | ||
go_deps.from_file(go_mod = "//:go.mod") | ||
|
||
# run "bazel mod tidy" to update these after updating go.mod | ||
use_repo( | ||
go_deps, | ||
"com_github_golang_glog", | ||
"com_github_huandu_go_clone", | ||
"com_github_stretchr_testify", | ||
"in_gopkg_yaml_v3", | ||
"net_starlark_go", | ||
"org_golang_google_protobuf", | ||
"org_golang_x_sys", | ||
) | ||
|
||
# Proto | ||
bazel_dep(name = "rules_proto", version = "5.3.0-21.7") | ||
bazel_dep( | ||
name = "protobuf", | ||
version = "26.0", | ||
repo_name = "com_google_protobuf", | ||
) | ||
|
||
# Python | ||
bazel_dep(name = "rules_python", version = "1.0.0") | ||
|
||
python = use_extension("@rules_python//python/extensions:python.bzl", "python") | ||
python.toolchain(python_version = "3.12", is_default = True) | ||
|
||
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip") | ||
pip.parse( | ||
hub_name = "pypi", | ||
python_version = "3.12", | ||
requirements_lock = "//third_party:requirements_lock.txt", | ||
) | ||
use_repo(pip, "pypi") |
Large diffs are not rendered by default.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,20 @@ | ||
module github.com/fizzbee-io/fizzbee | ||
|
||
go 1.22 | ||
go 1.22.4 | ||
|
||
require ( | ||
github.com/golang/glog v1.2.0 | ||
github.com/huandu/go-clone v0.0.0 | ||
github.com/stretchr/testify v1.8.4 | ||
go.starlark.net v0.0.0-20231121155337-90ade8b19d09 | ||
golang.org/x/sys v0.17.0 | ||
google.golang.org/protobuf v1.32.0 | ||
gopkg.in/yaml.v3 v3.0.1 | ||
) | ||
|
||
require ( | ||
github.com/davecgh/go-spew v1.1.1 // indirect | ||
github.com/pmezard/go-difflib v1.0.0 // indirect | ||
) | ||
|
||
replace github.com/huandu/go-clone => github.com/jayaprabhakar/go-clone v0.0.0-20240501195431-177708839df4 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") | ||
load("@rules_go//go:def.bzl", "go_library", "go_test") | ||
|
||
go_library( | ||
name = "modelchecker", | ||
|
@@ -25,7 +25,7 @@ go_library( | |
"//proto", | ||
"//proto:options", | ||
"@com_github_golang_glog//:glog", | ||
"@com_github_jayaprabhakar_go_clone//:go-clone", | ||
"@com_github_huandu_go_clone//:go-clone", | ||
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. @tekumara One reason I had to fork the cloning library was it was missing a feature to override pointer references. 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. It's still using your fork - see the replace statement in go.mod I had to do it like this to make go.mod work 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. 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. I'm assuming bazel honours this but admittedly I haven't tested this - is there a way to test this? 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. Got it. Thanks. |
||
"@org_golang_google_protobuf//encoding/protojson:go_default_library", | ||
"@org_golang_google_protobuf//proto:go_default_library", | ||
"@net_starlark_go//starlark", | ||
|
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.
previously we were using 25.2 but that doesn't exist on bazel central