| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In this change:
- rename WriteFileToStreamOrDie to
WriteFileToStderrOrDie (since we only ever used it
for stderr)
- replace open/write/read/close operations with
blaze_util::ReadFile/WriteFile
- wrap ToString(getpid()) in a utility function
- move SyncFile to file_<platform>
--
MOS_MIGRATED_REVID=139560397
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also remove a lot of unused header files.
The only remaining header file not available on
Windows is <unistd.h>, but cutting that dependency
will be more complicated because we use read/write
and similar I/O functions from it.
--
MOS_MIGRATED_REVID=139439791
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=139436876
|
|
|
|
|
|
|
| |
Fixes https://github.com/bazelbuild/bazel/issues/2096
--
MOS_MIGRATED_REVID=139322001
|
|
|
|
|
|
|
|
|
|
| |
Move the hashed base directory computation logic
into blaze_util_<platform>.cc in order to clean up
the call site and move platform-dependent code out
the client's main file.
--
MOS_MIGRATED_REVID=139319487
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change:
- merges the //src/{main,test}/cpp:file and
//src/{main,test}/cpp:file_platform libraries
because "file" and "file_platform" need each other
and this makes logical sense anyway
- implements a function in file_<platform> to run
a custom function on every child of a directory
- implements a function in file.cc to recursively
traverse a directory tree, based on the previosly
mentioned function
- removes the corresponding logic from the Bazel
client to make it more portable
--
MOS_MIGRATED_REVID=139309562
|
|
|
|
|
|
|
| |
attempts take into account the fact that failed connection attempts can take a long time.
--
MOS_MIGRATED_REVID=139199883
|
|
|
|
|
|
|
|
|
|
| |
Introduced by commit 9c95196bf21e42bf46df9436a84d263c26e972d2.
Tested:
"bazel build --nobuild //src/{main,test}/cpp/...:all"
--
MOS_MIGRATED_REVID=138855659
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=138816624
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change:
- starts using blaze_util::CanAccess and
blaze_util::PathExists instead of access(2)
- implements and starts using blaze_util::GetCwd
instead of getcwd(2)
- implements and starts using
blaze_util::ChangeDirectory instead of chdir(2)
- adds tests for the new wrapper methods
--
MOS_MIGRATED_REVID=138750297
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit repurposes file_posix.cc to be the
POSIX API file handling implementation, and adds
file_windows.cc for the Win32 API implementations.
Furthermore it introduces file_platform.h that
declares the interface.
Subsequent changes will replace POSIX API calls in
the rest of the C++ code with these abstract
methods.
Motivation: our code is so littered with
POSIX-isms that we need an abstraction layer if we
hope to compile it with MSVC.
--
MOS_MIGRATED_REVID=138615822
|
|
|
|
|
|
|
|
|
|
|
|
| |
In this commit:
- update GetOutputRoot with a MSVC-specific code
path, plus add more env vars to check for the
temp directory path in the MSYS-specific code
path
- add error handling to GetSelfPath
--
MOS_MIGRATED_REVID=138611621
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The simplest clock on Windows is timeGetTime(),
but its precision is ~15ms, which is not good
enough. This commit implements
blaze_util::WindowsClock that wraps a more precise
clock, accessible through QueryPerformanceCounter.
This change also deletes blaze_util_msvc.cc which
was recently forked off blaze_util_mingw.cc,
because forking didn't turn out to be necessary.
As part of this merging, I also renamed the file
to blaze_util_windows.cc
--
MOS_MIGRATED_REVID=138506308
|
|
|
|
|
|
|
|
| |
- --client_debug that turns out debug logging from the client
- --connect_timeout_secs that controls the timeout of the initial Ping() RPC from the client to the server
--
MOS_MIGRATED_REVID=138491791
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously they returned nanoseconds but all call
sites converted those to milliseconds.
This is not only a simplification of the semantics
and renaming of the methods to make the returned
units and the purpose clear, but also preparation
for the Windows/MSVC implementations of these
methods.
--
MOS_MIGRATED_REVID=138383956
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=137944374
|
|
|
|
|
|
|
|
|
|
|
| |
Now this time in the client documentation, since they are not true
anymore as the gRPC mechanism is always the default and there is no
other mechanism to choose.
--
Change-Id: I59d2cf9276764c32b9b28bf5dc2c0ff6777cec40
Reviewed-on: https://bazel-review.googlesource.com/#/c/7031/
MOS_MIGRATED_REVID=137925682
|
|
|
|
|
|
|
|
|
|
|
|
| |
The C++ client now talks to the Java server through protobuf messages
using the RPC mechanism provided by grpc, so this AF_UNIX socket file is
not used anymore for the communication between them since commit
a3c4833dc24b: ("Remove support for using AF_UNIX...").
--
Change-Id: Ic71e4c65ebb6bb2e661128635c2440007feaf5f6
Reviewed-on: https://bazel-review.googlesource.com/#/c/7030/
MOS_MIGRATED_REVID=137679905
|
|
|
|
|
|
|
| |
to detect whether arg is a valid startup option.
--
MOS_MIGRATED_REVID=137512954
|
|
|
|
|
|
|
|
|
|
| |
This allow us to keep this logic in one place and add a documentation
for what it means (making it more in sync with its Java counterpart).
--
Change-Id: I20ecfa6ea2cd3129a2f7a920c3bffe532f664a90
Reviewed-on: https://bazel-review.googlesource.com/#/c/6990/
MOS_MIGRATED_REVID=137504319
|
|
|
|
|
|
|
| |
Otherwise, it'd only be reaped by init when the client terminates.
--
MOS_MIGRATED_REVID=137502970
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=137266505
|
|
|
|
|
|
|
| |
with the gRPC-based communication between the Bazel client and server.
--
MOS_MIGRATED_REVID=137138408
|
|
|
|
|
|
|
|
|
|
| |
With the removal of AF_UNIX code by commit a3c4833dc24b: ("Remove support for
using AF_UNIX...") these function were left unused.
--
Change-Id: I84b03bb7e168c22969d7fd1f35decccbc4a54b52
Reviewed-on: https://bazel-review.googlesource.com/#/c/6790/
MOS_MIGRATED_REVID=137002014
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=136574107
|
|
|
|
|
|
|
|
|
|
|
| |
* remove "using std::" declarations from header files
* add missing "std::" to some string declarations at some header files
* add "using std::string;" to some source files where necessary
--
Change-Id: Ib64f62b5add499d6171fa922227194ac992fa542
Reviewed-on: https://bazel-review.googlesource.com/#/c/6630/
MOS_MIGRATED_REVID=136355671
|
|
|
|
|
|
|
|
|
| |
the Bazel server.
RELNOTES[INC]: --command_port=-1 to use AF_UNIX for client/server communications is not supported anymore.
--
MOS_MIGRATED_REVID=135355673
|
|
|
|
|
|
|
|
|
|
|
| |
* drop "blaze_" prefix (like it was done with statup_options.h)
* add a constructor to initalize the data members
* rename the header file to global_variables.h to match the struct in there.
--
Change-Id: I8c9f89f5d07c9a064bf1999c7bfb6d617d72818a
Reviewed-on: https://bazel-review.googlesource.com/6370
MOS_MIGRATED_REVID=135342354
|
|
|
|
|
|
|
|
|
|
|
|
| |
Subsequent commits will move methods out of
src/main/cpp/blaze_util.cc and into file.h or
file_<platform>.cc. Many of those methods heavily
rely on the POSIX API, and we need to reimplement
them against the Win32 API to compile Bazel on
Windows using MSVC.
--
MOS_MIGRATED_REVID=135128504
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
Other projects may depend on Ijar without wanting to depend on Bazel.
*** Original change description ***
Ijar: use utilities from Bazel's source
Remove a duplicate implementation of JoinPath.
--
MOS_MIGRATED_REVID=135088616
|
|
|
|
|
|
|
| |
Remove a duplicate implementation of JoinPath.
--
MOS_MIGRATED_REVID=134778185
|
|
|
|
|
|
|
|
|
|
|
| |
This patch integrates the code of Init() function into
StartupOptions's constuctor and thus fixing the TODO
in startup_options.cc.
--
Change-Id: Ic041306387f5ef82fa80d8511c3e9b7be706754a
Reviewed-on: https://bazel-review.googlesource.com/#/c/6332/2
MOS_MIGRATED_REVID=134759417
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=134657410
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This method is only used by blaze_util_linux.cc so
instead of porting it to Windows, I'm moving it to
a separate library.
As part of this change I'm creating separate
libraries for other sources in //src/main/cpp/util
as well, so their dependencies are clearly defined
in the BUILD file, plus we can port them one by
one.
This is part of the effort of compiling Bazel on
Windows with the MSVC toolchain.
--
MOS_MIGRATED_REVID=134636777
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=134630535
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update `select` statements in BUILD files with the
new config_setting.
This is a first step on a long path that leads to
us being able to compile bazel on Windows with
--cpu=x64_windows_msvc. Needless to say, we're not
there yet.
Tested: on Linux, Darwin, Windows/MSYS
--
MOS_MIGRATED_REVID=134534613
|
|
|
|
|
|
|
|
|
|
|
|
| |
The access() check in the do-while loop is basically doing the same thing
that the InWorkspace() function provides. So lets just call that function
instead. It also has the effect of making the code easier to read and
understand.
--
Change-Id: I02495775a9c9aa262396261824359538ca650e36
Reviewed-on: https://bazel-review.googlesource.com/#/c/6230
MOS_MIGRATED_REVID=134509465
|
|
|
|
| |
MOS_MIGRATED_REVID=134334656
|
|
|
|
|
|
|
|
|
| |
Spurred by Thiago's change in the area, I figured I'll try removing the PID symlink, but then I realized that this won't work, because the code currently gives precedence to the symlink, which means that if a server that writes both is replaced with a server that only writes the text file, the contents of the text file will not be read.
Also note that in Bazel, long jumps between server versions are much more possible than internally, so the cleanup is just not worth the risk, which is sad.
--
MOS_MIGRATED_REVID=133820484
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Starting with macOS Sierra developer beta 4, the behavior of poll(2) was changed, such that poll(2) will return immediately regardless the timeout if there is no file descriptor.
This fixes #1767.
And, this should be a better solution for Homebrew/homebrew-core#5041.
Closes #1803.
--
Reviewed-on: https://github.com/bazelbuild/bazel/pull/1803
MOS_MIGRATED_REVID=133816294
|
|
|
|
|
|
|
|
|
|
|
| |
These two functions have no logic inside it, they just return a string, and a
string that does not change, so they might be better expressed as real C/C++
constants. This might as well generate some better (and less) code anyway.
--
Change-Id: I78673c537c17c2665a74c5778e45a4d41a5f7b50
Reviewed-on: https://bazel-review.googlesource.com/#/c/6114
MOS_MIGRATED_REVID=133805201
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=133693782
|
|
|
|
|
|
|
|
| |
Sometimes, especially in the case of a lot of output, one may not want to write
everything twice.
--
MOS_MIGRATED_REVID=133388416
|
|
|
|
|
|
|
|
|
|
| |
Now that we have gotten a StartupOptions class for each of the products
we support, we can bake in the product name in each instance instead of
passing it to the constructor. Helps with encapsulation and simplifies
various instantiations of these classes.
--
MOS_MIGRATED_REVID=133255854
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL is a verbatim reproduction of the following CLs, modulo adjustments
to cope with changes at HEAD:
* commit 4a45d92130a6b1306a3840d006df165b8040a6cf: Use inheritance to support site-specific options.
* commit dfb2c73eda3d2dd8787ea9b2d0a03b49dfa2acc5: Inject the product name via the per-product main.cc files.
* unknown commit: Remove the internal/external startup_options duality.
The cause that triggered the rollbacks was fixed separately in commit 69a8d7205287bedf3a6140ec9327e2fad1758c22
as prepartory work for this roll-forward, so things should work now.
--
MOS_MIGRATED_REVID=133139218
|
|
|
|
|
|
|
|
|
| |
verifying the identity of the process killed on interrupt.
When the server dies, the client follows soon after, so this is kind of OK.
--
MOS_MIGRATED_REVID=133110872
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The result value of GetOutputRoot does not depend on the startup
options: it only depends on the environment and/or the hardcoded values
for Bazel and Blaze. Therefore, put it in the WorkspaceLayout module
just as we did for all other similar functions.
The fact that GetOutputRoot was part of BlazeStartupOptions was the root
cause behind the rollback of commit 4a45d92130a6b1306a3840d006df165b8040a6cf: in particular, that CL
silently added a virtual call to the GetOutputRoot method from the
constructor of the superclass, and this invokes undefined behavior
because the class has not yet been fully constructed. This caused Blaze
to have incorrect values for the output_root. By moving the function
out, we'll be able to roll that CL forward as it originally was.
As part of this change, add unit tests for the value of output_root
under various scenarios. These would have caught the discrepancy
introduced by that CL.
--
MOS_MIGRATED_REVID=133056251
|
|
|
|
|
|
|
|
| |
- Use an explicit cast to void to tell the compiler that we are intentionally ignoring return values.
- Delete the unused function GetPeerProcessId()
--
MOS_MIGRATED_REVID=132970162
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=132940326
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
commit 4a45d92130a6b1306a3840d006df165b8040a6cf and everything after in [] breaks the Blaze nightlies
*** Original change description ***
Inject the product name via the per-product main.cc files.
Instead of using a compile-time PRODUCT_NAME constant and complex Build
rules to set the correct product name for Blaze and Bazel, use the new
main.cc files to inject the appropriate value.
--
MOS_MIGRATED_REVID=132934596
|