Tags: bazel-contrib/rules_go
Tags
go/tools/gopackagesdriver/pkgjson: Construct pkg json from file input (… …#4371) When testing the bazel driver, we ran into an error that flaged that the argument list as too long. ``` ERROR: ...json failed: (Exit -1): pkgjson failed: error executing Action command (from target //...) bazel-out/k8-opt-exec-ST-a828a81199fe/bin/external/io_bazel_rules_go/go/tools/gopackagesdriver/pkgjson/reset_pkgjson/pkgjson --id @//src/... --pkg_path ... (remaining 15 arguments skipped) Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging Action failed to execute: java.io.IOException: Cannot run program "/home/user/.cache/bazel/_bazel_rhang/install/7e4ce7b0d69e79cb6bd84c7f9dfefe6b/process-wrapper" (in directory "/home/user/.cache/pkgdrv/0ddf1c72b811bee41d29991c732306ef72553747/sandbox/processwrapper-sandbox/29913/execroot/__main__"): error=7, Argument list too long ERROR: Build did NOT complete successfully ``` Digging into this issue, the cause is that the pkgjson command takes in all of the fields of package archive data as arguments. To work around this, we should preserve the original approach of writing a pkg json, before #4338, which used Skylark builtins to write the package content directly to disk. The pkgjson command is updated to parse ths json file directly and write out a transformed pkg json with the cgo related corrections in order to avoid limits regarding argument size. Note: This diff also makes changes to undo a breaking change (i.e. changing the signature of the make_pkg_json function) that was made in #4338. I revert changes to the functionalty of make_pkg_json and add a new replacement function make_pkg_json_with_archive.
fix: merge '-Wl,' with next value when (#4367) **What type of PR is this?** > Bug fix **What does this PR do? Why is it needed?** Previously if we pass `-extldflags,-Wl,--thread` into command line, it will only recognizes `-Wl` and ignores `--thread`. **Which issues(s) does this PR fix?** #3921 Fixes # If we see `-Wl`, we can merge with next value in the list. **Other notes for review** Co-authored-by: zhanning.lu <zhanning.lu@bytedance.com>
Revert "Fail when expected files are not produced by protoc (#4287)" (#… …4324) **What type of PR is this?** Bug fix **What does this PR do? Why is it needed?** It's common for a `go_proto_library` to include proto files with and without service definitions at the same time. In this case, the gRPC plugins are needed, but some gRPC plugins don't generate the grpc.pb.go files if there is no service definition. Partially reverting #4287 to restore the previous behavior of creating an empty file **Which issues(s) does this PR fix?** Fixes #4317 **Other notes for review** --------- Co-authored-by: Fabian Meumertzheim <fabian@meumertzhe.im>
deps: Get repositories.bzl in sync with go.mod (#4316) Bump the versions of dependencies in repositories.bzl to match what's in go.mod. Specifically bumps: - golang.org/x/sys - google.golang.org/protobuf - google.golang.org/grpc/cmd/protoc-gen-go-grpc - google.golang.org/genproto - github.com/golang/mock Additionally add features to the `releaser` tool for updating to a specific version, rather than latest, so we can avoid further modifications to `go.mod`. Fixes #4262
Populate timestamp in test.xml (#4259) **What type of PR is this?** Feature **What does this PR do? Why is it needed?** The `<testsuite>` element in JUnit XML has a `timestamp` attribute, but the `<testcase>` doesn't, while Go test's json has the timestamp for every event. This PR find the smallest timestamp in the json events and use that as the `timestamp` of `<testsuite>`. **Test plan** * Unit test * Verify that the timestamps are different with `--runs_per_test=10`
Fixing default includes of nogo (#4195) Currently, nogo will only run within rules_go, not the main repo, by default. This PR also remove the setting of `includes` in tests by default to expose issues in the default `includes` of `go_register_nogo` Fixes #4194 --------- Co-authored-by: Fabian Meumertzheim <fabian@meumertzhe.im>
prepare rules_go release 0.51.0-rc2 (#4183) **What type of PR is this?** Bug fix **What does this PR do? Why is it needed?** Deprecates the `RULES_GO_VERSION` constant in favor of `bazel_dep` and keeps it at `0.50.0` for legacy consumers that may not be able to parse RC suffixes. **Which issues(s) does this PR fix?** **Other notes for review**
fix(go/tools/release): fix urls to use bazel-contrib (#4178) These need to be updated since the repository was moved to the @bazel-contrib/rules-authors org
PreviousNext