Use absolute paths in GoPath builder (mainly for Windows compatibility) (#2642)

Windows has a limit of 256 characters for relative characters when using the syscalls the Go standard library uses. In a Bazel project I encountered recently I couldn't run the GoPath builder because of an google.golang.org/grpc dependency that included the file bazel-out\x64_windows-fastbuild\bin\external\org_golang_google_grpc\reflection\grpc_reflection_v1alpha\grpc_reflection_v1alpha_go_proto_\google.golang.org\grpc\reflection\grpc_reflection_v1alpha\reflection.pb.go, which even with my very short bazel root of C:\tmp\bzl was too long to open, and resulted in the error message GoPath: open bazel-out\x64_windows-fastbuild\bin\external\org_golang_google_grpc\reflection\grpc_reflection_v1alpha\grpc_reflection_v1alpha_go_proto_\google.golang.org\grpc\reflection\grpc_reflection_v1alpha\reflection.pb.go: The system cannot find the path specified. (pasting verbatim so people googling it can find it)

Using abs() and FromSlash() like in other builders fixes this issue.
2 files changed