From 7f58a083fc214f81c286c7263fe438223b0cd0b3 Mon Sep 17 00:00:00 2001 From: Fabian Meumertzheim Date: Sun, 6 Nov 2022 20:00:14 +0100 Subject: [PATCH] Move new runfiles library to `//go/runfiles` Follows https://bazel.build/rules/deploying#runfiles_library. --- go/{tools/bazel => }/runfiles/BUILD.bazel | 6 +++--- go/{tools/bazel => }/runfiles/directory.go | 0 go/{tools/bazel => }/runfiles/fs.go | 0 go/{tools/bazel => }/runfiles/fs_test.go | 0 go/{tools/bazel => }/runfiles/global.go | 0 go/{tools/bazel => }/runfiles/manifest.go | 0 go/{tools/bazel => }/runfiles/runfiles.go | 0 go/{tools/bazel => }/runfiles/runfiles_test.go | 0 go/{tools/bazel => }/runfiles/test.txt | 0 go/{tools/bazel => }/runfiles/testprog/BUILD.bazel | 8 ++++---- go/{tools/bazel => }/runfiles/testprog/main.go | 0 11 files changed, 7 insertions(+), 7 deletions(-) rename go/{tools/bazel => }/runfiles/BUILD.bazel (86%) rename go/{tools/bazel => }/runfiles/directory.go (100%) rename go/{tools/bazel => }/runfiles/fs.go (100%) rename go/{tools/bazel => }/runfiles/fs_test.go (100%) rename go/{tools/bazel => }/runfiles/global.go (100%) rename go/{tools/bazel => }/runfiles/manifest.go (100%) rename go/{tools/bazel => }/runfiles/runfiles.go (100%) rename go/{tools/bazel => }/runfiles/runfiles_test.go (100%) rename go/{tools/bazel => }/runfiles/test.txt (100%) rename go/{tools/bazel => }/runfiles/testprog/BUILD.bazel (77%) rename go/{tools/bazel => }/runfiles/testprog/main.go (100%) diff --git a/go/tools/bazel/runfiles/BUILD.bazel b/go/runfiles/BUILD.bazel similarity index 86% rename from go/tools/bazel/runfiles/BUILD.bazel rename to go/runfiles/BUILD.bazel index 3c5a0acd71..be908a6893 100644 --- a/go/tools/bazel/runfiles/BUILD.bazel +++ b/go/runfiles/BUILD.bazel @@ -23,7 +23,7 @@ go_library( "manifest.go", "runfiles.go", ], - importpath = "github.com/bazelbuild/rules_go/go/tools/bazel/runfiles", + importpath = "github.com/bazelbuild/rules_go/go/runfiles", visibility = ["//visibility:public"], ) @@ -35,7 +35,7 @@ go_test( ], data = [ "test.txt", - "//go/tools/bazel/runfiles/testprog", + "//go/runfiles/testprog", "@bazel_tools//tools/bash/runfiles", ], deps = [":runfiles"], @@ -43,7 +43,7 @@ go_test( exports_files( ["test.txt"], - visibility = ["//go/tools/bazel/runfiles/testprog:__pkg__"], + visibility = ["//go/runfiles/testprog:__pkg__"], ) alias( diff --git a/go/tools/bazel/runfiles/directory.go b/go/runfiles/directory.go similarity index 100% rename from go/tools/bazel/runfiles/directory.go rename to go/runfiles/directory.go diff --git a/go/tools/bazel/runfiles/fs.go b/go/runfiles/fs.go similarity index 100% rename from go/tools/bazel/runfiles/fs.go rename to go/runfiles/fs.go diff --git a/go/tools/bazel/runfiles/fs_test.go b/go/runfiles/fs_test.go similarity index 100% rename from go/tools/bazel/runfiles/fs_test.go rename to go/runfiles/fs_test.go diff --git a/go/tools/bazel/runfiles/global.go b/go/runfiles/global.go similarity index 100% rename from go/tools/bazel/runfiles/global.go rename to go/runfiles/global.go diff --git a/go/tools/bazel/runfiles/manifest.go b/go/runfiles/manifest.go similarity index 100% rename from go/tools/bazel/runfiles/manifest.go rename to go/runfiles/manifest.go diff --git a/go/tools/bazel/runfiles/runfiles.go b/go/runfiles/runfiles.go similarity index 100% rename from go/tools/bazel/runfiles/runfiles.go rename to go/runfiles/runfiles.go diff --git a/go/tools/bazel/runfiles/runfiles_test.go b/go/runfiles/runfiles_test.go similarity index 100% rename from go/tools/bazel/runfiles/runfiles_test.go rename to go/runfiles/runfiles_test.go diff --git a/go/tools/bazel/runfiles/test.txt b/go/runfiles/test.txt similarity index 100% rename from go/tools/bazel/runfiles/test.txt rename to go/runfiles/test.txt diff --git a/go/tools/bazel/runfiles/testprog/BUILD.bazel b/go/runfiles/testprog/BUILD.bazel similarity index 77% rename from go/tools/bazel/runfiles/testprog/BUILD.bazel rename to go/runfiles/testprog/BUILD.bazel index 46958bdb1a..d2f7fb2a1b 100644 --- a/go/tools/bazel/runfiles/testprog/BUILD.bazel +++ b/go/runfiles/testprog/BUILD.bazel @@ -17,14 +17,14 @@ load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library") go_library( name = "testprog_lib", srcs = ["main.go"], - importpath = "github.com/bazelbuild/rules_go/go/tools/bazel/runfiles/testprog", + importpath = "github.com/bazelbuild/rules_go/go/runfiles/testprog", visibility = ["//visibility:private"], - deps = ["//go/tools/bazel/runfiles"], + deps = ["//go/runfiles"], ) go_binary( name = "testprog", - data = ["//go/tools/bazel/runfiles:test.txt"], + data = ["//go/runfiles:test.txt"], embed = [":testprog_lib"], - visibility = ["//go/tools/bazel/runfiles:__pkg__"], + visibility = ["//go/runfiles:__pkg__"], ) diff --git a/go/tools/bazel/runfiles/testprog/main.go b/go/runfiles/testprog/main.go similarity index 100% rename from go/tools/bazel/runfiles/testprog/main.go rename to go/runfiles/testprog/main.go