aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/tools
diff options
context:
space:
mode:
authorGravatar ccalvarin <ccalvarin@google.com>2018-06-05 15:27:26 -0700
committerGravatar Copybara-Service <copybara-piper@google.com>2018-06-05 15:28:51 -0700
commitac69da0367e0dbd9aa13a332668af07dbb7a8135 (patch)
tree16b533129defbe15440c268e9a128c59cb88d4c3 /src/tools
parent216afa160b0ccff3df3ccc3a41acbb9814e27989 (diff)
Move path-manipulation functions to own library file.
Leave functions that make file accesses in the file library, and general blaze utilities in the blaze_util file, but move the functions that boil down to string manipulation and path formatting to their own file. (With the exception of getCWD, since absolute path syntax is relevant here.) Doing this largely to consolidate all Windows path control into a single place, so that it's easier to notice inconsistencies. For instance, ConvertPath currently makes Windows paths absolute, but not Posix paths, and MakeAbsolute relies on this behavior. In addition, JoinPath assumes Posix path syntax, which leads to some odd looking paths. These will be fixed in a followup change. (Found these issues while working on #4502, trying to fix the windows-specific system bazelrc.) RELNOTES: None. PiperOrigin-RevId: 199368226
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/launcher/BUILD2
-rw-r--r--src/tools/launcher/java_launcher.cc1
-rw-r--r--src/tools/launcher/launcher.cc2
-rw-r--r--src/tools/launcher/util/BUILD2
-rw-r--r--src/tools/launcher/util/launcher_util.cc2
-rw-r--r--src/tools/singlejar/test_util.cc1
6 files changed, 6 insertions, 4 deletions
diff --git a/src/tools/launcher/BUILD b/src/tools/launcher/BUILD
index 37b0e4dddc..075ee57d1f 100644
--- a/src/tools/launcher/BUILD
+++ b/src/tools/launcher/BUILD
@@ -28,7 +28,7 @@ cc_library(
srcs = ["launcher.cc"],
hdrs = ["launcher.h"],
deps = [
- "//src/main/cpp/util:file",
+ "//src/main/cpp/util:filesystem",
"//src/tools/launcher/util",
"//src/tools/launcher/util:data_parser",
],
diff --git a/src/tools/launcher/java_launcher.cc b/src/tools/launcher/java_launcher.cc
index 5b5a498b71..8daf209d17 100644
--- a/src/tools/launcher/java_launcher.cc
+++ b/src/tools/launcher/java_launcher.cc
@@ -20,6 +20,7 @@
#include "src/main/cpp/util/file.h"
#include "src/main/cpp/util/file_platform.h"
+#include "src/main/cpp/util/path_platform.h"
#include "src/main/cpp/util/strings.h"
#include "src/main/native/windows/file.h"
#include "src/tools/launcher/java_launcher.h"
diff --git a/src/tools/launcher/launcher.cc b/src/tools/launcher/launcher.cc
index ea58e2cb75..9bcc3642c2 100644
--- a/src/tools/launcher/launcher.cc
+++ b/src/tools/launcher/launcher.cc
@@ -20,7 +20,7 @@
#include <string>
#include <vector>
-#include "src/main/cpp/util/file_platform.h"
+#include "src/main/cpp/util/path_platform.h"
#include "src/tools/launcher/launcher.h"
#include "src/tools/launcher/util/data_parser.h"
#include "src/tools/launcher/util/launcher_util.h"
diff --git a/src/tools/launcher/util/BUILD b/src/tools/launcher/util/BUILD
index 8d128c3ee7..d8927c6f35 100644
--- a/src/tools/launcher/util/BUILD
+++ b/src/tools/launcher/util/BUILD
@@ -19,7 +19,7 @@ cc_library(
name = "util",
srcs = ["launcher_util.cc"],
hdrs = ["launcher_util.h"],
- deps = ["//src/main/cpp/util:file"],
+ deps = ["//src/main/cpp/util:filesystem"],
)
cc_test(
diff --git a/src/tools/launcher/util/launcher_util.cc b/src/tools/launcher/util/launcher_util.cc
index 2ef25a352f..3509ce3287 100644
--- a/src/tools/launcher/util/launcher_util.cc
+++ b/src/tools/launcher/util/launcher_util.cc
@@ -23,7 +23,7 @@
#include <sstream>
#include <string>
-#include "src/main/cpp/util/file_platform.h"
+#include "src/main/cpp/util/path_platform.h"
#include "src/tools/launcher/util/launcher_util.h"
namespace bazel {
diff --git a/src/tools/singlejar/test_util.cc b/src/tools/singlejar/test_util.cc
index f8ea0de8a3..722df5dc2a 100644
--- a/src/tools/singlejar/test_util.cc
+++ b/src/tools/singlejar/test_util.cc
@@ -22,6 +22,7 @@
#include "src/main/cpp/util/file.h"
#include "src/main/cpp/util/file_platform.h"
+#include "src/main/cpp/util/path.h"
#include "src/main/cpp/util/strings.h"
#include "googletest/include/gtest/gtest.h"