| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
|
| |
While at it fix a typo of "receive" and fix some other documentation
comments.
--
Change-Id: Ifb7df972200627730114d6cf751033c0d5e3bc46
Reviewed-on: https://cr.bazel.build/7710
PiperOrigin-RevId: 142015037
MOS_MIGRATED_REVID=142015037
|
|
|
|
|
|
|
|
|
|
| |
Async threads are divorced from the server's error-reporting mechanism. In the event
of a server shutdown originating in an async-thread, write the exit code to a file that
can be read by the client.
--
PiperOrigin-RevId: 141920284
MOS_MIGRATED_REVID=141920284
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 141483567
MOS_MIGRATED_REVID=141483567
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This way we can remove the dependency on blaze_util (which is Bazel's
client specific) from singlejar.
This work was made possible by commit 49970e0136d0: ("Bazel client:
platform-specific {Read,Write}File").
--
Change-Id: I6e95fb9119a271e4d48cbe2eefc1d5354ee188aa
Reviewed-on: https://cr.bazel.build/7650
PiperOrigin-RevId: 141294165
MOS_MIGRATED_REVID=141294165
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Final modifications to the Bazel client code so
we can compile //src/main/cpp/...:all using MSVC.
Yay!
We still have some dependencies that don't compile
with MSVC, namely Ijar, build-runfiles,
process-wrapper, and process-tools.
Still, this change is a huge success, because now
we can add regression tests to prevent people from
introducing breaking changes to the client that
would break Windows/MSVC compilation.
It's important to point out that we can only build
this library for now, most functions in
file_windows.cc and blaze_util_windows.cc have an
empty body (they just call `pdie`).
See https://github.com/bazelbuild/bazel/issues/2107
--
MOS_MIGRATED_REVID=140348351
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move blaze::ReadFile and blaze::WriteFile to
file.h and file_platform.h (thus into the
blaze_util namespace), and update references.
This allows us to implement these methods in a
platform-specific way.
Also move UnlinkPath.
See https://github.com/bazelbuild/bazel/issues/2107
--
MOS_MIGRATED_REVID=140328273
|
|
|
|
|
|
|
|
|
|
| |
Move the signal handling code from blaze.cc into
blaze_util_<platform>.
See https://github.com/bazelbuild/bazel/issues/2107
--
MOS_MIGRATED_REVID=140134781
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move MakeCanonical into platform-specific files.
Also change the signature of
blaze.cc:CheckBinaryPath to return the binary path
instead of mutating `globals`.
See https://github.com/bazelbuild/bazel/issues/2107
--
MOS_MIGRATED_REVID=140128173
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We moved most of the functionality (e.g. _exit,
SetupStreams) into blaze_util_<platform> or
changed to alternative functions (fwrite + stderr
instead of write + STDERR_HANDLE).
This change brings us closer to compiling blaze.cc
with MSVC. We still have to move signal handlers
out of blaze.cc as well as code dealing with the
server PID.
See https://github.com/bazelbuild/bazel/issues/2107
--
MOS_MIGRATED_REVID=140123945
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Upon startup the Bazel client checks if there's
already a running server process and if so then
connects to it.
We achieve this by checking if there's a symlink
in the server directory called served.pid,
pointing to /proc/<server_pid>. If so, we read the
symlink's target and extract the PID; otherwise we
check if there's a file in the server's directory
(server.pid.txt) that contains the PID and read it
from there.
Since the PID file is always there, we don't need
the symlink, plus on Windows we don't support
symlinks anyway, which is the real motivation for
this change.
Just ignoring the PID symlink is not enough, we
need to actively delete it so that switching
between Bazel versions (one that writes a PID
symlink and one that doesn't) won't result in
having a symlink and PID file with different
PIDs and clients trying to kill the wrong server
process / not killing one that they should.
See https://github.com/bazelbuild/bazel/issues/2107
--
MOS_MIGRATED_REVID=140117287
|
|
|
|
|
|
|
| |
later change.
--
MOS_MIGRATED_REVID=139951184
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We can now compile blaze_util_windows.cc with
MSVC, yay! (when building //src:bazel
--cpu=x64_windows_msvc -k).
There are a lot of #ifdef's and TODOs so this
is a modest victory for now.
In this change:
- change blaze::MakeDirectories to return bool
instead of int, since that's how it was used
anyway, and to expect the permission mask as
unsigned int instead of mode_t, since the
former is good enough and compatible with
mode_t on POSIX while mode_t is not defined on
Windows
- move blaze::MakeDirectories into
blaze_util_<platform>
- implement envvar-handling in
blaze_util_<platform> and use it everywhere
See https://github.com/bazelbuild/bazel/issues/2107
--
MOS_MIGRATED_REVID=139887503
|
|
|
|
|
|
|
|
|
| |
This allows implementing pipe-handling in a
platform-specific way. Windows also supports pipes
but through its own API.
--
MOS_MIGRATED_REVID=139564316
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
- --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
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
--
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
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
|
|
|
|
| |
- Don't call setrlimit() (it was needed to make 32-bit JVMs work with >3GB heaps)
- Remove a non-functional way to tweak the Linux scheduler
- Cosmetic fixes
--
MOS_MIGRATED_REVID=132653426
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rename BlazeStartupOptions to StartupOptions and turn the latter into a
class that can be subclassed to implement site-specific options
behavior. This lends itself to easier customization for the
site-specific versions, especially if there is more than one, and gets
rid of the strange build-time parameterization of the old
blaze_startup_options*.cc files.
Note that this change introduces various TODOs. This is intentional.
This change is quite complex as it is and I want to focus it on
reshuffling the class structure without actually touching the
internals. The latter can be done in subsequent, more targetted
changes that are easier to review and understand.
--
MOS_MIGRATED_REVID=132555032
|
|
|
|
|
|
|
| |
KillServerProcess() so that we don't call malloc() in signal handlers.
--
MOS_MIGRATED_REVID=132232499
|
|
|
|
|
|
|
| |
case the request fails.
--
MOS_MIGRATED_REVID=131804959
|
|
|
|
|
|
|
|
|
|
| |
This change introduces a new workspace_layout module that collects all
the static methods previously contained in the BlazeStartupOptions
class. These methods are not part of the options so it doesn't make
sense for them to be there.
--
MOS_MIGRATED_REVID=131576959
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Increase the ping timeout on connect from five to ten seconds. This gives
servers which may be suffering from gc pressure or other ailments extra time to
respond.
On the other end, wait for orphaned servers to really die before proceeding.
This prevents race conditions around the delivery of SIGKILL and the starting
of the new server.
This may make us fail slower when the server is having hard times, however it
should give us better determinism, and these conditions should be rare.
--
MOS_MIGRATED_REVID=130118918
|
|
|
|
|
|
|
|
|
| |
the logical rollback of commit 67ad82a319ff8959e69e774e7c15d3af904ec23d.
RELNOTES[INC]: Bazel supports Unix domain sockets for communication between its client and server again, temporarily, while we diagnose a memory leak.
--
MOS_MIGRATED_REVID=130027009
|