| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
| |
ConfiguredTargetValues. Also clear transitive packages for both, even for top-level targets.
This is not expected to save significant memory, but is expected to reduce the number of references to Packages, allowing them to be dropped more easily when discarding analysis cache and running in batch mode.
PiperOrigin-RevId: 151508877
|
|
|
|
|
|
|
|
|
|
|
|
| |
Additionally to reporting on the originally received command line, also report
it in a parsed form. This, in particular, includes reconstructing the options
originally provided by the user.
--
Change-Id: I5a1c6ed57874f1d37d10bf11d597256d63bc5516
Reviewed-on: https://cr.bazel.build/9459
PiperOrigin-RevId: 151288656
MOS_MIGRATED_REVID=151288656
|
|
|
|
|
|
|
|
|
|
|
| |
In the protocol, also report the command line as received by the
server, before and option handlers modify it.
--
Change-Id: If5bab172944679752477836a5f499d2837201888
Reviewed-on: https://cr.bazel.build/9453
PiperOrigin-RevId: 150894322
MOS_MIGRATED_REVID=150894322
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 150750767
MOS_MIGRATED_REVID=150750767
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change adds the new magic value "auto" to --jobs and makes this the
default. When --jobs=auto, we determine the number of available CPU
threads and set a reasonable value for --jobs based on this number. I'm
explicitly not defining what "reasonable" means because we may want to
change the heuristics later on.
The goal here is to reduce the load on the system when running Bazel
while not adversely affecting build times significantly. Previous
versions of Bazel defaulted --jobs to 200, which could easily overload
the local machine with a lot of processes. This value was derived from
Blaze's default, which makes sense because most jobs are network-bound
due to distributed execution; however, in the Bazel case, this never
made sense and is actually harmful.
This change was initiated by problems observed on Macs where Bazel would
bring machines to their knees due to system resource overload. It's
likely that the overload is caused by too much RAM usage rather than
CPU, but both of these should go down with a more limited jobs value.
Should help alleviate issue #1160.
RELNOTES: The --jobs flag now defaults to "auto", which causes Bazel to
use a reasonable degree of parallelism based on the local machine's
capacity.
--
PiperOrigin-RevId: 150466088
MOS_MIGRATED_REVID=150466088
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In this way, we can also report the artifacts generated
by aspects in the build event protocol.
For the time being, those events are reported unsolicitly
(i.e., as children of progress events), but they may be linked
to pattern expansion later.
--
Change-Id: I7fb83088d7fdb5424f77bfb78700e8371231b13c
Reviewed-on: https://cr.bazel.build/9370
PiperOrigin-RevId: 150181433
MOS_MIGRATED_REVID=150181433
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 149089903
MOS_MIGRATED_REVID=149089903
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move all local resource acquisition to where local execution actually happens.
Don't attempt to acquire resources per action, but only for individual spawns.
This significantly simplifies the code.
The downside is that we don't account for action-level work anymore. In
general, actions should not perform any process execution themselves, but
always delegate such work to a SpawnStrategy implementation.
This change makes sure that every Spawn has local resources set in a way that
is consistent with the previous state.
However, there are two actions - Fileset and FileWrite -, which are not spawns,
and so we now don't limit their concurrent execution anymore. For Fileset, all
work is done in a custom Fileset-specific thread pool, so this shouldn't be a
problem. I'm not sure about FileWriteAction.
--
PiperOrigin-RevId: 149012600
MOS_MIGRATED_REVID=149012600
|
|
|
|
|
|
|
|
| |
RELNOTES: Convert --use_action_cache to a regular option
--
PiperOrigin-RevId: 148804881
MOS_MIGRATED_REVID=148804881
|
|
|
|
|
|
|
|
|
|
|
|
| |
The build event protocol now emits a BuildFinished event at the end of a build. The event is a child of the BuildStarted event.
The code changes were larger than expected, due to some refactoring in BuildEventStreamer. This was necessary as the BuildCompleteEvent now implements the BuildEvent interface and Guava's EventBus always invokes the most specialized subscriber method. Thus, the buildEvent(BuildEvent) and buildCompleted(BuildCompletedEvent) methods had to be merged.
--
Change-Id: Id0c2bd7220dc8ce03128b7126587e212ee8ce836
Reviewed-on: https://cr.bazel.build/9053
PiperOrigin-RevId: 148788582
MOS_MIGRATED_REVID=148788582
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A target's tags and output files are reported as part of
the TargetComplete event of the build event protocol (BEP).
The output files are grouped by their corresponding output
group. If an output file belongs to more than one output group
it appears once in each output group.
--
Change-Id: Ia37db68709850d8550e478dcc30064dc7366bd1b
Reviewed-on: https://cr.bazel.build/8955
PiperOrigin-RevId: 148667599
MOS_MIGRATED_REVID=148667599
|
|
|
|
|
|
|
|
| |
...now that the ExtendedEventHandler can serve the same purpose.
--
PiperOrigin-RevId: 148640618
MOS_MIGRATED_REVID=148640618
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With more specific information to be reported by Skyfunctions, e.g.,
to inform the build-event protocol on missing files, the EventHandler
interface is no longer enough. Therefore, provide an enriched context
for reporting events.
--
Change-Id: I2d06166fe4d5b9054e24ad8c752fafc039e3f9f8
Reviewed-on: https://cr.bazel.build/8794
PiperOrigin-RevId: 148463437
MOS_MIGRATED_REVID=148463437
|
|
|
|
|
|
|
|
| |
--
Change-Id: I9e1483b9e99751b03d332110db023d99c045cb52
Reviewed-on: https://cr.bazel.build/9012
PiperOrigin-RevId: 148069886
MOS_MIGRATED_REVID=148069886
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
Broke tests on CI: http://ci.bazel.io/job/bazel-tests/570/
*** Original change description ***
Roll forward execroot change
RELNOTES[INC]: Previously, an external repository would be symlinked into the
execution root at execroot/local_repo/external/remote_repo. This changes it to
be at execroot/remote_repo. This may break genrules/Skylark actions that
hardcode execution root paths. If this causes breakages for you, ensure that
genrules are using $(location :target) to access files and Skylark rules are
using http://bazel.io/docs/skylark/lib/File.html's path, dirname, etc.
functions. Cust...
--
PiperOrigin-RevId: 147833177
MOS_MIGRATED_REVID=147833177
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
RELNOTES[INC]: Previously, an external repository would be symlinked into the
execution root at execroot/local_repo/external/remote_repo. This changes it to
be at execroot/remote_repo. This may break genrules/Skylark actions that
hardcode execution root paths. If this causes breakages for you, ensure that
genrules are using $(location :target) to access files and Skylark rules are
using http://bazel.io/docs/skylark/lib/File.html's path, dirname, etc.
functions. Custom crosstools that hardcode external/<repo> paths will have to
be updated.
Issue #1262.
--
PiperOrigin-RevId: 147726370
MOS_MIGRATED_REVID=147726370
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Turns out --symlink_prefix is not applied to the bazel-{out,workspace}
unlike bazel-{bin,genfiles,testlogs} thus breaking the semantics of
--symlink_prefix.
This CL fixes the problem by using the symlink prefix instead of the
product name when building the output and exec root symlinks.
The bazel-out symlink is still created for backwards compatiblity but
will be removed eventually.
RELNOTES[INC]: Using --symlink_prefix is now applied to the output
symlink (e.g. bazel-out) and the exec root symlink (e.g. bazel-workspace).
--
PiperOrigin-RevId: 147161547
MOS_MIGRATED_REVID=147161547
|
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
--
PiperOrigin-RevId: 147146321
MOS_MIGRATED_REVID=147146321
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Turns out --symlink_prefix is not applied to the bazel-{out,workspace}
unlike bazel-{bin,genfiles,testlogs} thus breaking the semantics of
--symlink_prefix.
This CL fixes the problem by using the symlink prefix instead of the
product name when building the output and exec root symlinks.
RELNOTES[INC]: Using --symlink_prefix is now applied to the output
symlink (e.g. bazel-out) and the exec root symlink (e.g. bazel-workspace).
--
PiperOrigin-RevId: 146902534
MOS_MIGRATED_REVID=146902534
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 146820813
MOS_MIGRATED_REVID=146820813
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
By specifying the flag "--debug_print_action_contexts", Bazel will print the contents of the internal SpawnActionContext and ContextMap maps, which allows developers to see which kind of actions are run using which strategy.
Example output of Bazel at HEAD:
$ ./output/bazel build --debug_print_action_contexts
INFO: SpawnActionContextMap: "" = LinuxSandboxedStrategy
INFO: SpawnActionContextMap: "Closure" = WorkerSpawnStrategy
INFO: SpawnActionContextMap: "Javac" = WorkerSpawnStrategy
INFO: ContextMap: Context = BazelWorkspaceStatusActionContext
INFO: ContextMap: CppCompileActionContext = SpawnGccStrategy
INFO: ContextMap: CppLinkActionContext = SpawnLinkStrategy
INFO: ContextMap: FileWriteActionContext = FileWriteStrategy
INFO: ContextMap: FilesetActionContext = FilesetActionContextImpl
INFO: ContextMap: IncludeScanningContext = DummyIncludeScanningContext
INFO: ContextMap: SpawnActionContext = LinuxSandboxedStrategy
INFO: ContextMap: SymlinkTreeActionContext = SymlinkTreeStrategy
INFO: ContextMap: TestActionContext = ExclusiveTestStrategy
(Can you spot the bug found by this feature here? The default TestActionContext is ExclusiveTestStrategy, which is probably not what we want.)
--
PiperOrigin-RevId: 146233390
MOS_MIGRATED_REVID=146233390
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 145827720
MOS_MIGRATED_REVID=145827720
|
|
|
|
|
|
|
|
|
|
|
| |
Bazel-created files (like log files of test runs) are internally reported
as Paths. However, this is not always the most useful representation of the
location of that artifact for a consumer of build events. Therefore, support
a mapping of paths to more useful URIs.
--
PiperOrigin-RevId: 144843525
MOS_MIGRATED_REVID=144843525
|
|
|
|
|
|
|
|
|
| |
This should be a no-op change, primarily intended to improve the BlazeModule
API. The code simplification in the distributor code path is incidental.
--
PiperOrigin-RevId: 144441458
MOS_MIGRATED_REVID=144441458
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change is part of the mu-bazel effort, which aims to build a minimally
useful Bazel binary with most extraneous functionality removed. As part of
that, we want to enforce layering of packages. In particular, lib.actions must
not depend on lib.rules or lib.exec. lib.rules must not depend on lib.exec.
Moving these classes is a necessary step to enforce that layering.
--
PiperOrigin-RevId: 142668172
MOS_MIGRATED_REVID=142668172
|
|
|
|
|
|
|
|
|
|
|
| |
In some situations, we do not even expect a test summary to appear in
the BEP, e.g., if testing is not asked for. Do not announce a test summary
in this case.
--
Change-Id: Ifd46e3582292b087bb1d37f255a140f631854830
Reviewed-on: https://cr.bazel.build/7373
MOS_MIGRATED_REVID=140589645
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=140024976
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=139209942
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=139180153
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=137936478
|
|
|
|
|
|
|
| |
This significantly simplifies several of our modules.
--
MOS_MIGRATED_REVID=137713119
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adding an options parameter to DiffAwareness#getCurrentView seems like the
simplest way to achieve that.
Alternatives considered:
1. Making the diff awareness modules stateful. However, I did not want to do so
as I've also been working on improving the module API to reduce state, or at
least to have a proper lifecycle management for any necessary state.
2. Making the watchFs flag a constructor parameter. However, that would also
invalidate any implementations that don't use the flag (of which we have
several).
3. Only passing in a single boolean flag instead of an options class provider;
however, this is a more principled, futureproof API, which allows other
modules / awareness implementations to use their own options.
RELNOTES: --watchfs is now a command option; the startup option of the same
name is deprecated. I.e., use bazel build --watchfs, not blaze --watchfs
build.
--
MOS_MIGRATED_REVID=136154395
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
Causes our integration tests on Darwin to time out
*** Original change description ***
Make --watchfs a common command option.
Adding an options parameter to DiffAwareness#getCurrentView seems like the
simplest way to achieve that.
Alternatives considered:
1. Making the diff awareness modules stateful. However, I did not want to do so
as I've also been working on improving the module API to reduce state, or at
least to have a proper lifecycle management for any necessary state.
2. Making the watchFs flag a constructor parameter. However, that would also
invalidate any implement...
***
--
MOS_MIGRATED_REVID=136070807
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adding an options parameter to DiffAwareness#getCurrentView seems like the
simplest way to achieve that.
Alternatives considered:
1. Making the diff awareness modules stateful. However, I did not want to do so
as I've also been working on improving the module API to reduce state, or at
least to have a proper lifecycle management for any necessary state.
2. Making the watchFs flag a constructor parameter. However, that would also
invalidate any implementations that don't use the flag (of which we have
several).
3. Only passing in a single boolean flag instead of an options class provider;
however, this is a more principled, futureproof API, which allows other
modules / awareness implementations to use their own options.
RELNOTES: --watchfs is now a command option; the startup option of the same
name is deprecated. I.e., use bazel build --watchfs, not blaze --watchfs
build.
--
MOS_MIGRATED_REVID=136026835
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make the BuildStartingEvent visible in the event stream by making it
an instance of the BuildEvent interface. It is the initial event of the
build event stream hence it also announces that progress updates will
follow. Its regular decedents are the expansion of the target patterns
provided at the request.
--
Change-Id: I237d8559b71ac82b10fdc492492b8435d6d1483f
Reviewed-on: https://bazel-review.googlesource.com/#/c/6277
MOS_MIGRATED_REVID=135475422
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is the first step on a journey toward allowing commands to AbruptExit
wherever they please, similar to how the user can press Ctrl+C at any time
and we (should) bail out as fast as we can.
By interrupting the command's main thread, we at least offer the command
the ability to see that an error requiring a bail has happened, and it should
trigger at potentially more locations, rather than just between phases.
--
MOS_MIGRATED_REVID=135152330
|
|
|
|
|
|
|
|
|
|
| |
Switch back to using the directory name, since there's no good way to get the
workspace name from `clean` (yet).
Fixes #1795.
--
MOS_MIGRATED_REVID=134083065
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
Breaks TensorFlow and other Bazel jobs on ci.bazel.io
*** Original change description ***
Change execution root for external repositories to be ../repo
Some of the important aspect of this change:
* Remote repos in the execution root are under output_base/execroot/repo_name, so the prefix is ../repo_name (to escape the local workspace name).
* Package roots for external repos were previously "output_base/", they are now output_base/external/repo_name (which means source artifacts always have a relative path from their repository).
* Outputs are under bazel-bin/external/repo_name/ (or similarly under genfiles). Note that this is a bit of a change from how this was implemented in the previous cl.
Fixes #1262.
RELNOTES[INC]: Previously, an external repository would be symlinked into the
execution root at execroot/local_repo/external/remote_repo. This changes it to
be at execroot/remote_repo. This may break genrules/Skylark actions that
hardcode execution root paths. If this causes breakages for you, ensure that
genrules are using $(location :target) to access files and Skylark rules are
using http://bazel.io/docs/skylark/lib/File.html's path, dirname, etc.
functions.
Roll forward of bdfd58a.
--
MOS_MIGRATED_REVID=133709658
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some of the important aspect of this change:
* Remote repos in the execution root are under output_base/execroot/repo_name, so the prefix is ../repo_name (to escape the local workspace name).
* Package roots for external repos were previously "output_base/", they are now output_base/external/repo_name (which means source artifacts always have a relative path from their repository).
* Outputs are under bazel-bin/external/repo_name/ (or similarly under genfiles). Note that this is a bit of a change from how this was implemented in the previous cl.
Fixes #1262.
RELNOTES[INC]: Previously, an external repository would be symlinked into the
execution root at execroot/local_repo/external/remote_repo. This changes it to
be at execroot/remote_repo. This may break genrules/Skylark actions that
hardcode execution root paths. If this causes breakages for you, ensure that
genrules are using $(location :target) to access files and Skylark rules are
using http://bazel.io/docs/skylark/lib/File.html's path, dirname, etc.
functions.
Roll forward of bdfd58a.
--
MOS_MIGRATED_REVID=133606309
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=133257532
|
|
|
|
|
|
|
|
|
|
|
| |
Chipping away at making the big CL for #1262 smaller. Only runfiles paths
are different right now, so this makes getPathUnderExecRoot and getSourceRoot
return the same thing. Also corrected a couple places where
Label.EXTERNAL_PATH_PREFIX and Label.EXTERNAL_PACKAGE_NAME were being used
incorrectly.
--
MOS_MIGRATED_REVID=132671081
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is now enabled by default, and this change removes the code path where
it's disabled.
Remove a few tests that were testing the removed code, and rewrite some others
that still seem useful. We still drop configured targets on configuration
changes, so we use that to check that things are dropped from Skyframe.
--
MOS_MIGRATED_REVID=132226208
|
|
|
|
|
|
|
| |
now to forbid it, since Skyframe lookups are interruptible.
--
MOS_MIGRATED_REVID=130429286
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This doesn't do anything yet, it's in preparation for the execroot rearranging
change. The execroot will have one bazel-out per repo, so it'll look like:
execroot/
repo1/
bazel-out/
local-fastbuild/
bin/
repo2/
bazel-out/
local-fastbuild/
bin/
genfiles/
repo3/
bazel-out/
local-fastbuild/
testlogs/
and so on. Thus, any output path (getBinDirectory() & friends) needs to know
what the repo name is. This changes so many places in the code I thought it
would be good to do separately, then just flip the functionality in the
execroot-rearranging commit.
While I was poking around, I changed all of the refs I could from getPackageRelativeArtifact() to getBin/GenfilesArtifact(), so that 1) rule implementation don't have to know as much about roots and 2) they'll be more isolated from other output dir changes.
`bazel info` and similar just return roots for the main repository.
The only "change" is passing around a target label in the Java rules.
Continues work on #1262.
--
MOS_MIGRATED_REVID=129985336
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=129887102
|
|
|
|
|
|
|
| |
This allows us to make the coverage module stateless if it depends on options.
--
MOS_MIGRATED_REVID=129852270
|
|
|
|
|
|
|
| |
change error messages in these cases to not assume there was an execution phase.
--
MOS_MIGRATED_REVID=129723717
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
execroot change
This is in prep for making the execution root path for external repositories
../repo_name (instead of external/repo_name). Right now, the getRunfilesPath() returns that path, so that is renamed getExecRoot() (since the runfiles are really just a reflection of the execRoot structure). getSourceRoot() replaces getPathFragment, which has always been a confusing name (it's not clear from the name
what the difference is between it and getPackageFragment()). It returns the relative path to source files for external repositories (external/repo_name).
Also renamed/moved to more sensible class a few static RepositoryName fields.
--
MOS_MIGRATED_REVID=128594419
|
|
|
|
|
|
|
| |
purposes of license checking instead of having a bespoke method in BuildConfiguration.Fragment and encoding knowledge about static linking in buildtool/ .
--
MOS_MIGRATED_REVID=128557444
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The execution root currently uses the basename of the workspace directory for
the workspace name, not the name in the WORKSPACE file. (For example, if our
sources were in /path/to/foo and our WORKSPACE file had workspace(name = "bar"),
our execution root would look like execroot/foo.)
This creates a symlink bar -> foo, so that accessing ../repo_name actually works
for the main repository.
RELNOTES[INC]: The main repository's execution root is under the main
repository's workspace name, not the source directory's basename. This shouldn't
have any effect on most builds, but it's possible it could break someone doing
weird things with paths in actions.
--
MOS_MIGRATED_REVID=128175455
|