Switch to upstream Go runfiles library
Now that we upgraded rules_go, we can use its runfiles library. The
one we were using has been upstreamed into rules_go, so there's no
reason not to use the upstream one now.
Signed-off-by: Philipp Schrader <philipp.schrader@gmail.com>
Change-Id: I5253ceabc4f166f850ea1f9a42fd42cd6f06f02f
diff --git a/scouting/db/testdb_server/BUILD b/scouting/db/testdb_server/BUILD
index 881d189..f0bd43b 100644
--- a/scouting/db/testdb_server/BUILD
+++ b/scouting/db/testdb_server/BUILD
@@ -6,7 +6,7 @@
importpath = "github.com/frc971/971-Robot-Code/scouting/db/testdb_server",
target_compatible_with = ["@platforms//cpu:x86_64"],
visibility = ["//visibility:private"],
- deps = ["@com_github_phst_runfiles//:go_default_library"],
+ deps = ["@io_bazel_rules_go//go/runfiles:go_default_library"],
)
go_binary(
diff --git a/scouting/db/testdb_server/main.go b/scouting/db/testdb_server/main.go
index ecb118f..81835d2 100644
--- a/scouting/db/testdb_server/main.go
+++ b/scouting/db/testdb_server/main.go
@@ -18,7 +18,7 @@
"strings"
"syscall"
- "github.com/phst/runfiles"
+ "github.com/bazelbuild/rules_go/go/runfiles"
)
func check(err error, message string) {
@@ -43,7 +43,7 @@
}
func getRunfile(path string) string {
- result, err := runfiles.Path(path)
+ result, err := runfiles.Rlocation(path)
check(err, fmt.Sprint("Failed to find runfile path for ", path))
return result
}