aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java
Commit message (Collapse)AuthorAge
* Make the integration tests pass with gRPC client/server comms.Gravatar Lukacs Berki2016-04-21
| | | | | | | | | | | In particular: - Make a SIGINT to the server interrupt every command - Parse negative numbers on the command line correctly (std::stoi throws an exception, and I'd rather not start using C++ exceptions) - Use "bytes" for command line arguments instead of "string" in the client/server proto . This is more principled, although we pretend all arguments are strings all over the place and it works for "blaze run" mostly by accident. -- MOS_MIGRATED_REVID=120434432
* Assorted changes wrt. gRPC client/server comms:Gravatar Lukacs Berki2016-04-21
| | | | | | | | | - Actually make it work again (commit 00cfb7df61b1f3d9fac8ee29d92b315cbfe6d28f broke it, maybe I shouldn't send out changes in a hurry next time) - Rename --grpc_port to --command_port (it's a bit better name) - Do not send a kill signal to the server that can't be connected if we only connect to it to verify its presence -- MOS_MIGRATED_REVID=120418784
* Block when another command is running on the server and not on the client ↵Gravatar Lukacs Berki2016-04-20
| | | | | | | when in gRPC mode. -- MOS_MIGRATED_REVID=120233121
* Do not start the AF_UNIX server when in gRPC mode.Gravatar Lukacs Berki2016-04-19
| | | | | | | Work towards #930. With this, it's conceivable that server mode works on Windows to some degree (I haven't tried, though, because there are many issues that need to be fixed) -- MOS_MIGRATED_REVID=120202037
* Add the --grpc_port startup option and start a Java server if it's passed in.Gravatar Lukacs Berki2016-04-14
| | | | | | | | | | | | | Note that the presence of server/grpc_port does not guarantee that the server actually listens to it and we can't guarantee it, either, because it can always be kill -9'd. I haven't decided yet how the transition between AF_UNIX and gRPC will work. For now, I'm happy that we can start up a Java server. The way to get the kernel-chosen port is truly awful, but it is apparently impossible to do so in a different way: https://github.com/grpc/grpc-java/issues/72 -- MOS_MIGRATED_REVID=119828354
* Refactor BlazeWorkspace creation to happen after BlazeRuntime construction.Gravatar Ulf Adams2016-04-13
| | | | | | | | As part of that, move a BinTools and the WorkspaceStatusActionFactory to the BlazeWorkspace. -- MOS_MIGRATED_REVID=119633702
* Move BlazeRuntime.initCommand to BlazeWorkspace.Gravatar Ulf Adams2016-03-30
| | | | | -- MOS_MIGRATED_REVID=118568284
* Move most of the workspace-handling code from BlazeRuntime to a new class.Gravatar Ulf Adams2016-03-30
| | | | | -- MOS_MIGRATED_REVID=118563271
* Move most BlazeRuntime methods related to workspace directories to CommandEnv.Gravatar Ulf Adams2016-03-30
| | | | | -- MOS_MIGRATED_REVID=118561661
* Move the BuildView creation to BuildTool, the only remaining user.Gravatar Ulf Adams2016-03-30
| | | | | -- MOS_MIGRATED_REVID=118547283
* Add startup option --experimental_oom_more_eagerly_threshold, with default ↵Gravatar Janak Ramakrishnan2016-03-24
| | | | | | | value 90. When --experimental_oom_more_eagerly is enabled, if after two full GCs the old gen is still >=--experimental_oom_more_eagerly_threshold% full, exit the JVM. -- MOS_MIGRATED_REVID=117943361
* Always apply invocation policy when constructing build options.Gravatar Janak Ramakrishnan2016-03-24
| | | | | -- MOS_MIGRATED_REVID=117939121
* Move TimestampGranularityMonitor to CommandEnvironment.Gravatar Ulf Adams2016-03-23
| | | | | | | | This is one of the last pieces of state in BlazeRuntime that isn't safe to share across command invocations. -- MOS_MIGRATED_REVID=117910631
* Move a field around to clarify that it's not part of the workspace state.Gravatar Ulf Adams2016-03-21
| | | | | -- MOS_MIGRATED_REVID=117715554
* Move AbstractBlazeQueryEnvironment to a factory class, and have BlazeModule ↵Gravatar Nathan Harmata2016-03-21
| | | | | | | optionally expose a custom factory implementation. -- MOS_MIGRATED_REVID=117546934
* Adds bazel_version to the native module for workspace macros.Gravatar Damien Martin-Guillerez2016-03-15
| | | | | | | | | | | | | | | | | | | | | One can now invoke native.bazel_version to get the version of Bazel from the WORKSPACE file. This can be used to do version check, for instance: version.bzl: def check_version(x): if native.bazel_version < x: fail("Current Bazel version is {}, expected at least {}".format(native.bazel_version, x)) WORKSPACE: load("//:version.bzl", "check_bersion") check_version("0.2") Fixes #1014. -- MOS_MIGRATED_REVID=117231557
* Description redacted.Gravatar Janak Ramakrishnan2016-03-15
| | | | | -- MOS_MIGRATED_REVID=117139503
* When --experimental_oom_more_eagerly is enabled, tell Bazel to exit with an ↵Gravatar Janak Ramakrishnan2016-03-10
| | | | | | | OutOfMemoryError and have the JVM send Bazel a SIGUSR2 when it detects an OOM. This should help in certain pathological cases when Bazel GC thrashes for some time after an OOM has been detected. -- MOS_MIGRATED_REVID=116819359
* Update ANDROID_DEFAULT_CROSSTOOL to default to //external:android/crosstool. ↵Gravatar Luis Fernando Pino Duque2016-02-25
| | | | | | | Remove the constant. -- MOS_MIGRATED_REVID=115555161
* Use WindowsFileSystem for bootstrapping on Windows as well.Gravatar Dmitry Lomov2016-02-03
| | | | | -- MOS_MIGRATED_REVID=113664915
* Merge Dmitry's jury-rigged WindowsFileSystem to decrease the number of ↵Gravatar Lukacs Berki2016-01-29
| | | | | | | | | changes between his branch and HEAD. This code will need some JNI to make it work properly, but for now, it will do. -- MOS_MIGRATED_REVID=113349143
* Make crashing test logger shut down the serverGravatar Michajlo Matijkiw2016-01-21
| | | | | | | | | Previously the crashing logger would allow the server process to survive which could leave things in a weird state if a crash was expected. Instead of throwing an exception shut down the runtime. -- MOS_MIGRATED_REVID=112589751
* Add a Java property to influence symlinking strategy so that we can test ↵Gravatar Lukacs Berki2016-01-20
| | | | | | | what kind of performance we could get from how we imagine it would work under Windows. -- MOS_MIGRATED_REVID=112572621
* Use JavaIoFileSystem during the bootstrapping, removing JNI compilation.Gravatar Damien Martin-Guillerez2016-01-18
| | | | | | | Another step towards no C++ compilation outside of Bazel for bootstrapping. -- MOS_MIGRATED_REVID=112399835
* Use Bazel Preconditions variant which avoids varargs array creationGravatar Mark Schaller2015-12-10
| | | | | | | Reduces garbage. -- MOS_MIGRATED_REVID=109914243
* A minor tweak to the mechanism by which Bazel finds out it is in the ↵Gravatar Lukacs Berki2015-12-10
| | | | | | | execroot of another workspace. -- MOS_MIGRATED_REVID=109885272
* Add a --deep_execroot startup option that puts the execroot under ↵Gravatar Lukacs Berki2015-12-09
| | | | | | | | | $OUTPUT_BASE/execroot/<workspace name> instead of $OUTPUT_BASE/<workspace name>. This makes it possible to run Bazel in directories whose name clashes with one of the pre-existing files in the output base. Note that this option is turned off by default for now. -- MOS_MIGRATED_REVID=109791053
* Don't treat external files as immutableGravatar Kristina Chodorow2015-12-08
| | | | | | | | | Fixes #352. RELNOTES: Files in external repositories are now treated as mutable, which will make the correctness guarantees of using external repositories stronger (existent), but may cause performance penalties. -- MOS_MIGRATED_REVID=109676408
* Remove BlazeRuntime.reporter; use a BlazeModule to attach event handlers.Gravatar Ulf Adams2015-11-02
| | | | | | | | This only affects tests that previously set a Reporter on the BlazeRuntime; the production code is already using the per-command Reporter in all cases. -- MOS_MIGRATED_REVID=106820846
* Move most of BlazeRuntime.beforeCommand() to CommandEnvironment.Gravatar Ulf Adams2015-10-20
| | | | | -- MOS_MIGRATED_REVID=105841866
* Move the outputService field to the CommandEnvironment.Gravatar Ulf Adams2015-10-20
| | | | | -- MOS_MIGRATED_REVID=105841398
* Move commandStartTime from BlazeRuntime to CommandEnvironment.Gravatar Ulf Adams2015-10-20
| | | | | -- MOS_MIGRATED_REVID=105840775
* Move workingDirectory to CommandEnvironment.Gravatar Ulf Adams2015-10-20
| | | | | | | Preparation for running multiple commands in parallel. -- MOS_MIGRATED_REVID=105840167
* Move loadingPhaseRunner from BlazeRuntime to CommandEnvironment.Gravatar Ulf Adams2015-09-30
| | | | | | | | | | The loadingPhaseRunner is stateless, and moving it prevents accidentally adding state to it. The TargetPatternEvaluator is not stateless, but is currently retained by the SkyframePackageManager, so we still keep that state across invocations (see follow-up CL). -- MOS_MIGRATED_REVID=104187659
* BlazeRuntime.reporter is now null in production.Gravatar Ulf Adams2015-09-30
| | | | | -- MOS_MIGRATED_REVID=104102106
* Set the SkyframeActionExecutor.reporter in prepareForExecution.Gravatar Ulf Adams2015-09-30
| | | | | | | Remove a lot of now-unused Reporter parameters. -- MOS_MIGRATED_REVID=104100061
* Move the BuildView over from BlazeRuntime to CommandEnvironment.Gravatar Ulf Adams2015-09-28
| | | | | | | | | It doesn't contain any state anymore, so creating a new instance per command is safe. On the other hand, it would be just as safe to merge the remaining code into SkyframeBuildView, which we might do in the future. -- MOS_MIGRATED_REVID=104010694
* Remove BuildView.binTools, which was only used for tests.Gravatar Ulf Adams2015-09-28
| | | | | -- MOS_MIGRATED_REVID=104008237
* Rationalize copyright headersGravatar Damien Martin-Guillerez2015-09-25
| | | | | | | | | | | The headers were modified with `find . -type f -exec 'sed' '-Ei' 's|Copyright 201([45]) Google|Copyright 201\1 The Bazel Authors|' '{}' ';'` And manual edit for not Google owned copyright. Because of the nature of ijar, I did not modified the header of file owned by Alan Donovan. The list of authors were extracted from the git log. It is missing older Google contributors that can be added on-demand. -- MOS_MIGRATED_REVID=103938715
* Make sure runtime shuts down on exception in uncaught exception handlerGravatar Michajlo Matijkiw2015-09-25
| | | | | | | RELNOTES: -- MOS_MIGRATED_REVID=103869828
* Remove all direct uses of SkyframeExecutor.reporter.Gravatar Ulf Adams2015-09-24
| | | | | | | | | Instead, pass an appropriate EventHandler instance in. This is in preparation for creating a per-command EventHandler, in preparation for allowing multiple commands to run in parallel. This is removal of shared global state. -- MOS_MIGRATED_REVID=103828963
* Move ownership of SkyframeBuildView to SkyframeExecutor.Gravatar Ulf Adams2015-09-23
| | | | | | | | Also move ownership of ArtifactFactory to SkyframeBuildView; simplify the code. -- MOS_MIGRATED_REVID=103722228
* Move BlazeRuntime.getView() to CommandEnvironment. Update all callers.Gravatar Ulf Adams2015-09-21
| | | | | -- MOS_MIGRATED_REVID=103376668
* Move getOutputFilesystem to CommandEnvironment; refactor BlazeRuntime commands.Gravatar Ulf Adams2015-09-21
| | | | | | | | | | This change makes it so commands are no longer both stored in the BlazeRuntime and in the BlazeCommandDispatcher. Instead, they are only stored in BlazeRuntime and usually passed there during construction. We have some tests where this is tricky, so I'm keeping the old code path for now. -- MOS_MIGRATED_REVID=103364581
* Move the commandId and getCommandStartTime() to CommandEnvironment.Gravatar Ulf Adams2015-09-21
| | | | | | | | They are usually on the same line, so doing this in separate changes can cause merge conflicts. -- MOS_MIGRATED_REVID=103362797
* Make exception in case a test tries to remote-log more informative.Gravatar Janak Ramakrishnan2015-09-17
| | | | | -- MOS_MIGRATED_REVID=103290841
* Simplify BuildView construction and store configurations in the build result.Gravatar Ulf Adams2015-09-17
| | | | | | | | | | | | | | | I was persuing the idea that BuildView could become stateless. While that should be possible, we're currently still relying on minimal state in BuildView (from tests at least) in a way that makes it tricky to remove. Instead, I'm now trying to move the BuildView into CommandEnvironment, and create a new one as needed (only for build commands); that makes it safe in the presence of concurrently running commands, as long as they don't use the same BuildView instace. (Of course, allowing commands to run concurrently will need more changes outside of BuildView.) -- MOS_MIGRATED_REVID=103279370
* Move the clientEnv to the CommandEnvironment.Gravatar Ulf Adams2015-09-17
| | | | | -- MOS_MIGRATED_REVID=103269584
* Move several parts of BlazeRuntime to CommandEnvironment.Gravatar Ulf Adams2015-09-16
| | | | | | | | The main piece is the blaze module environment, which is only valid during command execution. Also configuration creation and precompleteCommand. -- MOS_MIGRATED_REVID=103186467
* Change most calls to BlazeRuntime.getReporter() to use CommandEnvironment.Gravatar Ulf Adams2015-09-16
| | | | | -- MOS_MIGRATED_REVID=103175472