mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-08 23:18:15 -05:00
Update go to 1.24.0 (#14969)
* Update rules_go to v0.53.0 * Update staticcheck to v0.6.0 * Update to go 1.24.0 * Update github.com/trailofbits/go-mutexasserts to latest * Use rules_go @ cf3c3af34bd869b864f5f2b98e2f41c2b220d6c9 * Provide the go binary to SszGen. https://github.com/bazel-contrib/rules_go/pull/4173 * Unskip SA9003 * Update github ci checks to go1.24.0 * CI: Update gosec to v2.22.1 and golangci to v1..64.5 * Temporarily disable usetesting lint check for go1.24 * gosec: Disable G115 - integer overflow conversion * gosec: Ignore G407 for "hardcoded" IV. It's not hardcoded. * Fix uses of rand.Seed. This is a no-op in go1.24 and deprecated since go1.20. * Changelog fragment
This commit is contained in:
@@ -63,12 +63,30 @@ def _ssz_go_proto_library_impl(ctx):
|
||||
if len(ctx.attr.exclude_objs) > 0:
|
||||
args.append("--exclude-objs=%s" % ",".join(ctx.attr.exclude_objs))
|
||||
|
||||
ctx.actions.run(
|
||||
executable = ctx.executable.sszgen,
|
||||
progress_message = "Generating ssz marshal and unmarshal functions",
|
||||
inputs = input_files,
|
||||
arguments = args,
|
||||
# golang.org/x/tools requires the go binary to be available in the PATH.
|
||||
# Follows the same pattern as https://github.com/bazel-contrib/rules_go/pull/4173
|
||||
sdk = ctx.toolchains["@io_bazel_rules_go//go:toolchain"].sdk
|
||||
goroot = sdk.root_file.dirname
|
||||
env = {
|
||||
"PATH": "PATH={goroot}/bin:$PATH".format(goroot = goroot),
|
||||
"GOROOT": goroot,
|
||||
}
|
||||
ctx.actions.run_shell(
|
||||
outputs = [output],
|
||||
command = """
|
||||
export GOROOT=$(pwd)/{goroot} &&
|
||||
export PATH=$GOROOT/bin:$PATH &&
|
||||
{cmd} {args}""".format(
|
||||
goroot = goroot,
|
||||
cmd = ctx.executable.sszgen.path,
|
||||
args = " ".join(args),
|
||||
),
|
||||
tools = [
|
||||
ctx.executable.sszgen,
|
||||
sdk.go,
|
||||
],
|
||||
mnemonic = "SszGen",
|
||||
inputs = input_files,
|
||||
)
|
||||
|
||||
ssz_gen_marshal = rule(
|
||||
@@ -86,6 +104,7 @@ ssz_gen_marshal = rule(
|
||||
"includes": attr.label_list(providers = [GoLibrary]),
|
||||
"out": attr.output(),
|
||||
},
|
||||
toolchains = ["@io_bazel_rules_go//go:toolchain"],
|
||||
)
|
||||
|
||||
SSZ_DEPS = ["@com_github_prysmaticlabs_fastssz//:go_default_library"]
|
||||
|
||||
Reference in New Issue
Block a user