| Commit message (Collapse) | Author | Age |
... | |
|
|
|
|
|
|
|
|
|
|
| |
We don't need to separate them into 4 different flavours, all crosstools define
them identically anyway.
RELNOTES: CppRules: Unified action_configs for static libraries
From now on only c++-link-static-library is read.
PiperOrigin-RevId: 188726352
|
|
|
|
|
|
|
|
| |
Increase the connect timeout to 30 seconds Windows sometimes
seems to need more time.
RELNOTES: None
PiperOrigin-RevId: 188702864
|
|
|
|
|
|
|
|
| |
remaining non-test users (ErrorInfoEncoder was it). Should help to simplify our codec registration.
I want to converge MemoizingCodec and ObjectCodec, and the unnecessary complexity around ObjectCodec registration is annoying.
PiperOrigin-RevId: 188620988
|
|
|
|
|
|
|
|
|
|
| |
keys/values without injecting the codecs. Also allow it to handle ImmutableSortedMap, since we were always silently degrading to ImmutableMap for objects that weren't declared as ImmutableSortedMap, and there's no good way to handle non-natural comparators. This will lead to runtime failures if a class actually needs an ImmutableSortedMap with a different comparator than the natural one.
This changes the semantics of ImmutableMap serialization. Previously, we went off the declared type. In the case of a declared ImmutableSortedMap, we ignored the comparator, potentially leading to incorrect serialization (new test added in AutoCodecProcessorTest that would have caught that). Moreover, declared ImmutableMaps were deserialized as ImmutableMaps even if they were actually ImmutableSortedMaps. Now, we preserve the ordering unconditionally, and preserve the type if possible. I think this is a better state to be in.
This is needed to kill off MemoizingCodec, since MemoizingCodec has an ImmutableMapMemoizingCodec, which I want to get rid of in favor of this.
PiperOrigin-RevId: 188619637
|
|
|
|
|
|
| |
ConfiguredTargetAndData. We want to get BuildConfiguration out of ConfiguredTarget because it uses >800K when serialized.
PiperOrigin-RevId: 188600002
|
|
|
|
|
|
| |
This reduces the size of its serialized representation.
PiperOrigin-RevId: 188597127
|
|
|
|
|
|
| |
Closes #4622.
PiperOrigin-RevId: 188595430
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Skylark memoization, but we may extend in future to handle more than just Skylark this way. In fact, we probably want most of our ObjectCodecs to be MemoizingCodecs that can efficiently fall back to ObjectCodec if not using memoization (maybe coming in a follow-up).
At a high level, this CL merges the functionality of MemoizingCodecMap into ObjectCodecRegistry, adds auto-registration of MemoizingCodec, and uses that to get rid of a lot of codecs that were just delegating. The big one to get rid of there is SkylarkValueCodec: all of its delegation duties are implicitly now in ObjectCodecRegistry and friends.
One danger with this CL is that many of the features of Skylark serialization are only being tested in unit tests, which had to be reworked as part of this change. I don't think we've lost any coverage, but I could be wrong. SkylarkValueCodec had a bunch of methods that were effectively test-only, which made it easier to remove.
The plan is to provide a Memoizer.Serializer inside the SerializationContext. At the top level, it will be a DUMMY_SERIALIZER that does no memoization, but a MemoizingCodec can do
context = context.ensureMemoizing()
which will recreate the context with a true memoizing serializer. Then all references to the Serializer in codec code can be cleaned up, and the MemoizingCodec and ObjectCodec signatures will be the same. At that point, we can make all ObjectCodecs compatible with memoization by default (with strategy MEMOIZE_AFTER), and add a "memoize" boolean to @AutoCodec. That should allow us to have full interoperability between all codecs.
This CL also makes CodecScanner deterministic in the order of classes that it processes (there was a lurking bug here where constants must be deterministically ordered but that wasn't enforced at all).
PiperOrigin-RevId: 188559983
|
|
|
|
|
|
| |
BuildOptions. Motivation is that the diffs are likely to be much smaller than the actual BuildOptions objects themselves, so in places we need a BuildOptions (I'm looking at you, BuildConfigurationValue.Key), we can instead store a diff, reconstructing the BuildOptions object itself on demand when needed.
PiperOrigin-RevId: 188511251
|
|
|
|
|
|
|
|
|
| |
Unlike in fixed-point (legacy) expansion of configs, with --expand_configs_in_place we do not use the options parser to parse each config-definition default override - we first find the full expansion and then expand it in place of the original --config=value instance. For this reason though, we don't support space-separation of recursive configs and their values.
The old warning for this was confusing though, and did not provide much guidance. This should be better, now the warning specifies which config is malformed, in what file, and that it expects the "=" character.
RELNOTES: None.
PiperOrigin-RevId: 188509060
|
|
|
|
| |
PiperOrigin-RevId: 188503085
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix the testTraversalOfGeneratedDirectory method
in RecursiveFilesystemTraversalFunctionTest that
was flaky on Windows.
The fix is to wait so that changes to files in the
InMemoryFileSystem will have observable effects on
the file ctimes.
Depends on https://github.com/bazelbuild/bazel/pull/4787
Fixes https://github.com/bazelbuild/bazel/issues/4755
Closes #4788.
PiperOrigin-RevId: 188470080
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix FilesystemValueCheckerTest.testExplicitFiles()
by ensuring that the filesystem timestamp
granularity has elapsed before attempting to
update the files.
Fixes https://github.com/bazelbuild/bazel/issues/4755
Closes #4786.
PiperOrigin-RevId: 188467381
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix testCacheBypassingActionWithMtimeChangingInput
in SkyframeAwareActionTest by ensuring that enough
time elapses between file updates so their effects
are observable on the file's ctime.
Fixes https://github.com/bazelbuild/bazel/issues/4755
Closes #4787.
PiperOrigin-RevId: 188458542
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
function call.
This is the 2nd attempt at this commit. The first attempt (https://github.com/bazelbuild/bazel/commit/f1013485d41efd8503f9d4f937e17d1b4bc91ed3) was rolled back because it introduced the following two bugs:
(1) The side effects of Environment#enterScope are relevant: it creates and stores a new Continuation that has a reference to the set currently referenced by 'knownGlobalVariables', and then overwrites the value of the variable. When there are e.g. nested function calls, 'knownGlobalVariables' will be wrong in the Environment used to stage the inner call (see the added test for an example).
(2) The finally block in UserDefinedFunction#call assumes the env.enterScope was called. Because of the EvalException (incorrectly) thrown due to (1), this is no longer true.
I restructured the code such that (2) isn't possible and I also added a unit test that would have caught the two bugs.
In my first attempt, I was doing too much - I was also trying to save the CPU-costs in the env.update call (dispatches to the just-created lexical frame, and calls LexicalFrame#put, which does an unnecessary mutability sanity check, etc) and in doing so completely missed the above bugs. Sorry.
RELNOTES: None
PiperOrigin-RevId: 188411737
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The new SandboxfsProcess interface allows interacting with sandboxfs.
There are two implementations: RealSandboxfsProcess, which spawns the
sandboxfs binary, and FakeSandboxfsProcess, which mimics what sandboxfs
does but using symlinks and is intended for testing purposes only.
The RealSandboxfsProcess implementation works but still carries many
TODOs. The most "painful" one may be that the test requires manual
invocation because we do not yet have an easy way to integrate with
sandboxfs. That will be solved later on; for now this is sufficient
for initial testing.
RELNOTES: None.
PiperOrigin-RevId: 188347393
|
|
|
|
|
|
|
|
| |
@buchgr
Closes #4790.
PiperOrigin-RevId: 188332795
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add these tests to the transitive closure of
//src:all_windows_tests thus run them on CI.
See https://github.com/bazelbuild/bazel/issues/4292
Change-Id: Iae0bd925bdde2921fb0b2d4222b81fcecb28dea3
Closes #4800.
Change-Id: Iae0bd925bdde2921fb0b2d4222b81fcecb28dea3
PiperOrigin-RevId: 188324317
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add the c.g.d.build.android.desugar.runtime
tests to the transitive closure of
//src:all_windows_tests, thus running them on CI.
See https://github.com/bazelbuild/bazel/issues/4292
Closes #4796.
PiperOrigin-RevId: 188312286
|
|
|
|
|
| |
RELNOTES: None.
PiperOrigin-RevId: 188201686
|
|
|
|
|
|
|
| |
This was migrated incorrectly, as there's a semantic difference between @Param for @SkylarkSignature and for @SkylarkCallable, it would appear.
RELNOTES: None.
PiperOrigin-RevId: 188190409
|
|
|
|
|
|
|
|
| |
Very thin wrapper, nothing except swallow+log all errors.
TESTED=presubmit
RELNOTES: None
PiperOrigin-RevId: 188177872
|
|
|
|
|
|
|
| |
files for include statments. This binary is currently only used for an internal feature - but that feature may be supported externally eventually.
RELNOTES: None
PiperOrigin-RevId: 188173513
|
|
|
|
|
|
|
|
|
| |
This fixes https://github.com/bazelbuild/bazel/issues/4731.
Also, add test coverage for posting of ParsingFailedEvent and handling of cycles in LoadingPhaseRunnerTest.
Change-Id: I88c9d33417b9c3c7a06c92a6137d58f37b991b0c
PiperOrigin-RevId: 188138972
|
|
|
|
|
|
|
|
|
| |
Given a target (for example from a skylark aspect), one will be able to access a list of actions that the target generated using "target.actions". This is without additional memory footprint.
Actions themselves are not fully exposed to skylark (and thus there isn't much meaning to gather from them in skylark yet). Access methods will follow soon.
RELNOTES: None.
PiperOrigin-RevId: 188098079
|
|
|
|
|
|
|
| |
WANT_LGTM=buchgr
TESTED=unit tests, 500 runs per test
RELNOTES: None
PiperOrigin-RevId: 188093043
|
|
|
|
| |
PiperOrigin-RevId: 188085895
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
//tools/defaults:android_jar is a synthetic target that is being
replaced by the regular target @bazel_tools//tools/android:android_jar
in Bazel 0.11 and later. See cf097e4.
Change-Id: I2cfc38a0dcd25f43985e75b386f9f1cadec86320
RELNOTES: None
Closes #4785.
Change-Id: I2cfc38a0dcd25f43985e75b386f9f1cadec86320
PiperOrigin-RevId: 188080503
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It was previously assumed that safety wasn't needed because
1) all builtins should be registered in static initializer blocks, and
2) all retrievals should occur during Skylark evaluation, after static initialization completes.
It turns out these assumptions aren't actually true (Who would've thunk it!). SkylarkActionFactory has been observed to be initialized as late as analysis time, and retrievals occur as early as constructing a PackageFactory (when scanning the native module). The failure mode is particularly ugly: Random Skylark method lookups will fail non-deterministically.
This change guards against this by making the builtins registry implement a form of freezing. Before freezing, reads and writes are allowed and are synchronized. After freezing, only reads are allowed and they are unsynchronized for performance. BlazeRuntime is responsible for flipping the bit, and for ensuring classes like SkylarkActionFactory run their initialization by that point. Unit tests don't need to worry, since they just stay unfrozen and synchronized throughout.
RELNOTES: None
PiperOrigin-RevId: 188080136
|
|
|
|
|
|
|
|
|
|
|
|
| |
This prevents both creation and access to platform providers from
Skylark.
This is needed so we can load platforms directly from platform-rule
targets without needing a full configured target, and to effiently
distinguish platform providers from non-platform providers.
Change-Id: I6b61f9ee7518d5e9311232908a922596e18fe32f
PiperOrigin-RevId: 188070457
|
|
|
|
|
|
| |
BuildConfiguration, BuildOptions, CollectTargetsUnderDirectoryValue.
PiperOrigin-RevId: 188059815
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
Breaks external cc_proto_library. See https://github.com/bazelbuild/bazel/issues/4780
RELNOTES: None.
*** Original change description ***
Fixing issue with external j2objc protos
PiperOrigin-RevId: 188041921
|
|
|
|
|
| |
RELNOTES: None.
PiperOrigin-RevId: 188038131
|
|
|
|
|
| |
RELNOTES:none
PiperOrigin-RevId: 188026038
|
|
|
|
|
|
| |
Closes #4640.
PiperOrigin-RevId: 188022228
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It shouldn't be open sourced at all, since it solves a very specific internal
use case, and for external use cc_library with its includes, include_prefix, and
strip_include_prefix attributes can be used to perfectly replace cc_inc_library.
RELNOTES: Removed cc_inc_library, please use cc_library instead
Use includes, include_prefix, and strip_include_prefix attributes of cc_library
to replace the behavior of cc_inc_library with cc_library.
PiperOrigin-RevId: 187991313
|
|
|
|
|
|
|
| |
This isn't strictly necessary since we disable caching and require local
execution.
PiperOrigin-RevId: 187985476
|
|
|
|
| |
PiperOrigin-RevId: 187956593
|
|
|
|
| |
PiperOrigin-RevId: 187945746
|
|
|
|
|
|
| |
multiple times.
PiperOrigin-RevId: 187941859
|
|
|
|
|
| |
RELNOTES: None
PiperOrigin-RevId: 187936071
|
|
|
|
|
|
|
|
|
|
| |
This provides a io.grpc.ClientInterceptor implementation that can be used to log gRPC call information. The interceptor can select a logging handler to use based on the gRPC method being called (Watch, Execute, Write, etc) to build a LogEntry, which can then be logged after the call has finished. Unit tests for the interceptor are included.
In this change, the interceptor is never invoked, nor are there any handlers implemented for any gRPC methods. The interceptor also never tries to log any entries.
To avoid circular dependency issues (Remote library will depend on logger which depends on remote library for utils), I've factored out the utility classes from the remote library into their own directory/package as part of this change.
PiperOrigin-RevId: 187926516
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Link inputs are there only to invalidate the action, they don't affect the
execution of the compile action. This cl optimizes the action execution by not
having to collect unnecessary inputs into the sandbox.
Since this is CppCompileAction and nothing is easy here, let me elaborate on my
assumptions. The goal of this cl is to stop passing unneeded inputs into Spawns.
This is implemented by introducing a dispensableInputs field to the
CppCompileAction. SpawnGccStrategy then doesn't forward these further.
I'm not adding dispensableInputs to the ActionKey. I think it's enough to put
them to the inputs and into the updateActionInputs method.
RELNOTES: None.
PiperOrigin-RevId: 187849482
|
|
|
|
|
|
|
|
| |
doesn't save memory in the 32-bit case, but makes it easier for people to see how many SkyKeys we have.
There's some unnecessary interning in tests, but it was easier to copypasta and doesn't harm anything, I think.
PiperOrigin-RevId: 187694309
|
|
|
|
|
|
|
| |
the directory
RELNOTES: None.
PiperOrigin-RevId: 187692669
|
|
|
|
|
|
|
| |
published via the BEP, instead of only publishing failed actions and extra actions.
RELNOTES: Add a --build_event_publish_all_actions flag to allow all actions to be published via the BEP.
PiperOrigin-RevId: 187683799
|
|
|
|
|
|
| |
don't care about the group structure, and simplify the logic for prefetching old deps.
PiperOrigin-RevId: 187681887
|
|
|
|
|
|
| |
Needed for Attribute serialization.
PiperOrigin-RevId: 187676061
|
|
|
|
|
|
| |
RELNOTES: None.
PiperOrigin-RevId: 187671513
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Changelog: https://android.googlesource.com/platform/ndk/+/ndk-release-r16/CHANGELOG.md
> The deprecated headers have been removed. Unified Headers are now simply The Headers.
Support for this was added in r15.
> libc++ is out of beta and is now the preferred STL in the NDK. Starting in r17, libc++ is the default STL for CMake and standalone toolchains. If you manually selected a different STL, we strongly encourage you to move to libc++. For more details, see this blog post.
We bind the default `//external:android/crosstool` in AndroidNdkRepositoryRule before the repository function is evaluated, so changing the default STL will affect the older NDK revisions too. Until we have a new mechanism to specify the default crosstool, users will need to use `--android_crosstool_top=@androidndk//:toolchain-libcpp` to use `libc++`.
> GCC, armeabi, mips, mip64 are deprecated but still buildable/useable.
We can remove support for these in the r17 configuration.
There are no other actionable differences between r15 and r16, so we can reuse the r15 configuration for r16.
RELNOTES: Added Android NDK r16 support. Use --cxxopt='-std=c++11` compile with the C++11 standard, and `--android_crosstool_top=@androidndk//:toolchain-libcpp` to use the `libc++` STL.
Fixes https://github.com/bazelbuild/bazel/issues/4068
PiperOrigin-RevId: 187664390
|