Client: convert output_base to Path
(Roll-forward of commit 242acd6c07ccfe380bddf8d5a719c1cdfd6fdfb9 that was rolled back
by commit 505ca7e3036b328908dd57702278d1cf4641aba5 because it broke Google-internal
build targets. Those are now fixed.)
Benefits of a Path abstraction instead of raw
strings:
- type safety
- no need to convert paths on Windows all the time
- no need to check if paths are absolute
Closes #9245.
RELNOTES: none
PiperOrigin-RevId: 265686214
diff --git a/src/main/cpp/server_process_info.h b/src/main/cpp/server_process_info.h
index 1a1813a..9fa69de 100644
--- a/src/main/cpp/server_process_info.h
+++ b/src/main/cpp/server_process_info.h
@@ -16,9 +16,11 @@
#define BAZEL_SRC_MAIN_CPP_SERVER_PROCESS_INFO_H_
#include <sys/types.h>
+
#include <string>
#include <vector>
+#include "src/main/cpp/util/path.h"
#include "src/main/cpp/util/port.h" // pid_t on Windows/MSVC
namespace blaze {
@@ -27,12 +29,12 @@
// configuration.
class ServerProcessInfo final {
public:
- ServerProcessInfo(
- const std::string &output_base, const std::string &server_jvm_out);
+ ServerProcessInfo(const blaze_util::Path &output_base,
+ const blaze_util::Path &server_jvm_out);
// When running as a daemon, where the deamonized server's stdout and stderr
// should be written.
- const std::string jvm_log_file_;
+ const blaze_util::Path jvm_log_file_;
// Whether or not the jvm_log_file should be opened with O_APPEND.
const bool jvm_log_file_append_;