| Commit message (Collapse) | Author | Age |
|
|
|
|
| |
RELNOTES: None.
PiperOrigin-RevId: 165422514
|
|
|
|
|
|
|
| |
disk have changed since it was launched, print *which* files have changed.
RELNOTES: Improved logging when workers have to be restarted due to its files having changed.
PiperOrigin-RevId: 165419664
|
|
|
|
|
|
| |
This requires us to have OptionsData for all usage messages, since static functionality is being removed, but this should already have been the case. It was added as an optional argument when the expansion function feature was added, but there is actually no reason not to require it, as the public interface for usage text was already computing the optionsData anyway.
PiperOrigin-RevId: 165386893
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allowing add(Object) is too loose and can easily lead to programmer mistakes.
Because of type erasure, we can't use the same overload name for (eg.) add(NestedSet<String>) and add(NestedSet<Artifact>). The API is overhauled to use the same terms everywhere, eg. "add", "addPaths", "addExecPaths". This is similar to how it used to be a few CLs ago.
The API is overhauled to make sure it's consistent for all types. While tedious, the facade methods immediately dispatch to internal helpers, so implementation wise it's not too heavy.
While large, this CL is almost entirely an automated refactor.
PiperOrigin-RevId: 165358287
|
|
|
|
|
| |
RELNOTES: Removing a few unused objc_provider keys.
PiperOrigin-RevId: 165230824
|
|
|
|
|
|
|
|
|
|
|
| |
Send the startup options tagged with their origin so that the server has correct information about the command line as the client received it.
Removes the unconditional stderr printing of all bazelrc startup options in the bazel client. Instead, the startup options are sent to the server and the same informational printing is gated on the --announce_rc option. This avoids unconditional log spam to stderr early in startup. If the server is unreachable or there are errors parsing startup options, the message is still printed to stderr.
Fixes https://github.com/bazelbuild/bazel/issues/2530.
RELNOTES: --announce_rc now controls whether bazelrc startup options are printed to stderr.
PiperOrigin-RevId: 165211007
|
|
|
|
|
|
|
|
|
| |
This enforces certain memory-efficient patterns. For deliberate use of dynamic strings, explicitly named overloads are introduced, with javadoc that guides the programmer into making the right choice.
This CL is a memory no-op on benchmarks, but it tries to prevent backslide by making sure programmers make conscious choices when they construct their command lines.
RELNOTES: None
PiperOrigin-RevId: 165185997
|
|
|
|
|
|
| |
of CcToolchainProvider as a "toolchain" in platform-based toolchain resolution.
PiperOrigin-RevId: 165185303
|
|
|
|
|
|
|
|
| |
This allows more complex expressions to be called, not just identifiers.
For example, "x[0]()" is not a syntax error anymore.
RELNOTES: None
PiperOrigin-RevId: 165157981
|
|
|
|
|
|
|
|
|
|
| |
AbstractSpawnRunner now uses a SpawnCache if one is registered, this allows
adding caching to any spawn runner without having to be aware of the
implementations.
I will delete the old CachedLocalSpawnRunner in a follow-up CL.
PiperOrigin-RevId: 165024382
|
|
|
|
|
| |
RELNOTES:
PiperOrigin-RevId: 165012363
|
|
|
|
|
| |
RELNOTES: None
PiperOrigin-RevId: 165012084
|
|
|
|
|
|
|
|
|
| |
https://github.com/bazelbuild/bazel/commit/21436e062a12b64c8bee665b0cf79dfe48cff114.
That change broke module maps that depended on the transitive headers from ObjC protos.
RELNOTES: None
PiperOrigin-RevId: 165010275
|
|
|
|
|
|
|
|
|
|
|
|
| |
The tags associated with a rule is information that
is useful as information about the target, independent
of the configuration. At the moment, tags cannot be
configuration-dependent anyway, but even if the extend
bazel it that way, the union of all possible tags is
still useful information.
Change-Id: Iabca0c28b0da4b13b8a62b2638a881c53cc70ccc
PiperOrigin-RevId: 164996472
|
|
|
|
|
| |
RELNOTES: None.
PiperOrigin-RevId: 164981071
|
|
|
|
|
|
| |
These only had usages in test code. The tests could be altered to use other methods.
PiperOrigin-RevId: 164977900
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
state.
A remote cache must never serve a failed action. However, if it did
Bazel would not detect this and simply fail and display an error message
that's hard to distinquish from a local execution failure.
Bazel now displays a clear error message stating what went wrong.
RELNOTES: None.
PiperOrigin-RevId: 164975631
|
|
|
|
|
|
|
|
|
|
| |
Some information about a target is configuration independent and therefore can
already be provided at a target level (i.e., in the TargetConfigured event). Do
so, to have that information available earlier and, once the deprecation period
is over, avoid redundant information in the stream.
Change-Id: I8021ce3dd2a8168d409ea513190c4e3a349dbc2f
PiperOrigin-RevId: 164967059
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change the persistent worker spawn strategy to extend
AbstractSpawnStrategy and put the actual logic into
WorkerSpawnRunner. WorkerTestStrategy is unaffected.
I had to extend SpawnPolicy with a speculating() method. Persistent
workers need to know if speculation is happening in order to require
sandboxing.
Additionally, I added java_test rules for the local runner tests and
worker tests. See https://github.com/bazelbuild/bazel/issues/3481.
NOTE: ulfjack@ made some changes to this change before merging:
- changed Reporter to EventHandler; added TODO about its usage
- reverted non-semantic indentation change in AbstractSpawnStrategy
- reverted a non-semantic indentation change in WorkerSpawnRunner
- updated some internal classes to match
- removed catch IOException in WorkerSpawnRunner in some cases,
removed verboseFailures flag from WorkerSpawnRunner, updated callers
- disable some tests on Windows; we were previously not running them,
now that we do, they fail :-(
Change-Id: I207b3938f0dc84d374ab052d5030020886451d47
PiperOrigin-RevId: 164965398
|
|
|
|
| |
PiperOrigin-RevId: 164963238
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
linux-sandbox has a useful option -R, that runs the spawn as fake
root. However, it's not exposed to Bazel rules. Here, we do that via
the "requires-fakeroot" tag.
One possible usecase: In combination with "block-network",
"requires-fakeroot" makes it possible to integration test services
that insist on listening on privileged ports.
Unsurprisingly, this is incompatible with --sandbox_fake_username.
Change-Id: I9e8ab4d4abf0e45626e005ff21f73e6c17de0788
PiperOrigin-RevId: 164961019
|
|
|
|
|
|
|
| |
...instead of injecting it through the constructor. Simplify all the callers
accordingly.
PiperOrigin-RevId: 164955391
|
|
|
|
|
|
| |
RELNOTES: speedup of incremental dexing tools
PiperOrigin-RevId: 164926895
|
|
|
|
|
|
|
| |
Fixes #3072
RELNOTES: None
PiperOrigin-RevId: 164906305
|
|
|
|
|
|
|
|
|
|
| |
ConfigurationFactory.
This is a prerequisite to removing ConfigurationFactory (which is only used for static configurations). We still need List<ConfigurationFragmentFactory> to supply ConfigurationFragmentFunction.
Eventually even that will go away (for fully trimmed builds). But we're not there yet.
PiperOrigin-RevId: 164890139
|
|
|
|
|
|
|
|
|
|
| |
Refactorings:
* Change data binding to have configurable archive generation
* Extract a ZipBuilder class from the ZipBuilderVisitor to provide a general purpose archiving class.
* Small changes to visibility AaptCommandLineBuilder for reuse in the aapt2 code.
RELNOTES: None
PiperOrigin-RevId: 164880571
|
|
|
|
|
| |
RELNOTES: The `print` function now prints debug messages instead of warnings.
PiperOrigin-RevId: 164880003
|
|
|
|
|
|
|
|
|
| |
Apart from updating CustomCommandLineTest this CL is entirely automated.
We also sneak in a rename of addFormat -> addFormatted.
RELNOTES: None
PiperOrigin-RevId: 164870140
|
|
|
|
| |
PiperOrigin-RevId: 164850909
|
|
|
|
|
|
|
|
| |
Fixes #3055.
RELNOTES: `bazel info output_path` no longer relies on the root directory
filename being equal to the workspace name.
PiperOrigin-RevId: 164847833
|
|
|
|
|
|
|
|
| |
These are depended upon by analysis code, so need to live in the same library
as lib.analysis. Moving them here makes it possible to split the build-base
library into separate libraries for analysis, execution, and rules.
PiperOrigin-RevId: 164847161
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use $(location) to get the unittest.bash script, which allows this test to also
run with a different label prefix. This involves removing the intermediate
testenv.sh script, which doesn't seem to add much value.
We might want to consider a sh_unit_test rule or macro that has an implicit
dependency on the unittest.bash script and doesn't require every test to do
this manually.
PiperOrigin-RevId: 164846477
|
|
|
|
|
|
|
| |
Fixes #3522.
Change-Id: I41e0498ccf351f6ce57da4cfe1ef84d5567e6315
PiperOrigin-RevId: 164839897
|
|
|
|
|
|
|
| |
All prefetching now goes through AbstractSpawnStrategy's implementation of
SpawnExecutionPolicy. Make sure the sandbox runners also do this consistently.
PiperOrigin-RevId: 164836877
|
|
|
|
|
|
|
| |
This is part of splitting up the build-base library into separate libraries for
analysis, exec, and rules.
PiperOrigin-RevId: 164835678
|
|
|
|
| |
PiperOrigin-RevId: 164827022
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
RELNOTES: None
PiperOrigin-RevId: 164775289
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is the first in a series of changes stripping out Bazel's
static configuration code.
This change removes the ability to request static configurations but
not the (now orphaned) logic behind them. Because that logic is
all over the code base, it will be removed in layers in followup
changes.
PiperOrigin-RevId: 164769846
|
|
|
|
|
| |
RELNOTES: None.
PiperOrigin-RevId: 164755768
|
|
|
|
|
|
|
|
|
| |
ConfiguredTargetFunction.
Fixes #3430.
Change-Id: Iac1ab3fb4958dc6fb23e92a43a32b81461dcf0f3
PiperOrigin-RevId: 164754851
|
|
|
|
|
|
|
| |
Memory is saved by sharing the format string and label object instances, instead of constructing new strings for each action.
RELNOTES: None
PiperOrigin-RevId: 164731899
|
|
|
|
|
|
|
|
|
| |
Old ordering names ("stable", "compile", "naive_link", "link") are deprecated
and won't be available if --incompatible_disallow_set_constructor=true is set.
Use "default", "postorder", "preorder", and "topological" correspondingly
instead.
PiperOrigin-RevId: 164728439
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of having custom ArgvFragments for every combination of desired things, we make a combined "interpreter" of argvs. This saves memory and simplifies things as we do not have to allocate a strategy instance per call to args (instead pushing a single shared instance, followed by the args).
The generic interpreter does have a lot of branching compared to the bespoke implementations, but because the branch is always the same for long stretches the branch predictor should easily be able to handle it with minimal overhead (~1 cycle per branch IIRC).
This CL also elevates that we either want a NestedSet or an ImmutableCollection to the surface of the API, so consumers understand the cost when they call it with a non-immutable collection. Most of the changes in clients is due to this.
To cut down on CL churn, @Deprecated forwarding methods are added to CustomCommandLine. These will be removed in a separate CL using IDE inlining.
RELNOTES: None
PiperOrigin-RevId: 164725370
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Important: the simplified API now defaults to forwarding interrupts to
subprocesses. I did audit all the call sites, and I think this is a safe change
to make.
- Properly support timeouts with all implementations
- Simplify the API
- only provide two flavours of blocking calls, which require no input and
forward interrupts; this is the most common usage
- provide a number of async calls, which optionally takes input, and a flag
whether to forward interrupts
- only support input streams, no byte arrays or other 'convenience features'
that are rarely needed and unnecessarily increase the surface area
- use java.time.Duration to specify timeout; for consistency, interpret a
timeout of <= 0 as no timeout (i.e., including rather than excluding 0)
- KillableObserver and subclasses are no longer part of the public API, but
still used to implement timeouts if the Subprocess.Factory does not support
them
- Update the documentation for Command
- Update all callers; most callers now use the simplified API
PiperOrigin-RevId: 164716782
|
|
|
|
|
|
|
|
|
| |
For requests like fetch, we still produce a sequence of build
events, even though nothing is actually built. In the BuildStarting
event of that stream, also report the UUID of the request.
Change-Id: If34ce6a34221320ed4a24408732ba6d372569d04
PiperOrigin-RevId: 164710704
|
|
|
|
|
| |
RELNOTES: none
PiperOrigin-RevId: 164646858
|
|
|
|
|
|
| |
RELNOTES: none
PiperOrigin-RevId: 164620306
|
|
|
|
|
|
|
|
|
| |
This is part of splitting up the build-base library into separate libraries for
analysis, exec, and rules. Unfortunately, there are a number of reverse deps
from analysis code to Skylark classes, so moving these is the only way to make
progress.
PiperOrigin-RevId: 164612957
|
|
|
|
| |
PiperOrigin-RevId: 164590595
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
RELNOTES: None
PiperOrigin-RevId: 164590392
|