Skip to content

Commit

Permalink
bazel: stage all go source files in a temp dir named after the package
Browse files Browse the repository at this point in the history
This works around an issue where Go source file names as stored in the
`cockroach` binary were truncated (e.g., with the leading
`github.com/cockroachdb/cockroach` prefix, or even the entire package
name prefix, removed). This breaks unit tests (#61913) and some other
internal stuff.

We solve this by staging all Go source files during the build in a
temporary directory named after the package. This incurs an additional
I/O cost, but for now while our codebase isn't able to deal with the
differing file names, we can deal with it.

Fixes #64379
See also #64383

Release note: None
  • Loading branch information
rickystewart committed May 12, 2021
1 parent 44f7196 commit 414e861
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
# Load go bazel tools. This gives us access to the go bazel SDK/toolchains.
git_repository(
name = "io_bazel_rules_go",
commit = "2fe8a6256c818840cc9a10cf3f366d8410437245",
commit = "a94a425d26532613e71f9c7432c19c36302e1f1d",
remote = "https://github.com/cockroachdb/rules_go",
)

Expand Down

0 comments on commit 414e861

Please sign in to comment.