| Commit message (Collapse) | Author | Age |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
NDK15 changelog:
https://android.googlesource.com/platform/ndk/+/ndk-r15-release/CHANGELOG.md
Notable changes for this CL:
- Clang has been updated to v5.0.300080.
- android-9 is not supported anymore. Anything lower than android-14 will default to android-14.
- NDK sysroot has been changed to %ndk%/sysroot
- Requires additional compilation flags because the headers are now unified in a single location across archs and API levels
Also removed NDK 10 checks in integration tests because it is old and we don't test against that anymore.
Fixes https://github.com/bazelbuild/bazel/issues/3137
Paves the way for r16: https://github.com/bazelbuild/bazel/issues/4068
RELNOTES[NEW]: Added Android NDK r15 support, including compatibility with Unified Headers.
PiperOrigin-RevId: 187648715
|
|
|
|
|
|
|
|
|
|
| |
Needed so that actions are properly invalidated and re-run when the platform's remote execution properties change.
Fixes #4756.
Closes #4728.
Change-Id: Ia227d110c10c9aad2164cefa8a90361cc4359332
PiperOrigin-RevId: 187621349
|
|
|
|
|
|
|
| |
crosstool top.
Change-Id: I531034b0c991d18b05818db4b40cbd739535b565
PiperOrigin-RevId: 187617580
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix the failing test in
//src/test/java/com/google/devtools/build/lib:bazel-rules-tests
on Windows.
The problem was that the test setup read a
resource file and assumed line endings to be "\n",
but on Windows this resource file was generated
with "\r\n" endings.
The test setup code then put those strings into a
set.
Finally, the test tried to match a string in this
set, but because the entries had an invisible "\r"
at the end, the matching failed.
This commit trims the entries before putting them
in the set.
Fixes https://github.com/bazelbuild/bazel/issues/4752
Closes #4754.
PiperOrigin-RevId: 187608803
|
|
|
|
|
|
|
|
|
| |
Instead of --direct_dependency, --indirect_dependency args we now emit --direct_dependencies. We no longer need to emit any jar owner information since that is baked into the jar by JavaBuilder.
This CL also contains the deletion of CustomMultiArgv and the injecting_rule_kind aspect parameter, as the deleted code was the last remaining usage.
RELNOTES: None
PiperOrigin-RevId: 187558628
|
|
|
|
|
|
|
|
|
| |
objc provider skylark fields.
This flag is not fully implemented -- there should also be a way to disable the provider getters using this flag, but, since @SkylarkCallable does not allow for evaluation of SkylarkSemantics, this is not yet possible.
RELNOTES: None.
PiperOrigin-RevId: 187542004
|
|
|
|
|
| |
RELNOTES: None.
PiperOrigin-RevId: 187531006
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With this cl toolchain author can specify different flags for linking shared
library produced by cc_library and a shared library produced by cc_binary.
This is what is needed to remove linking_mode_flags - MOSTLY_STATIC_LIBRARIES
from the crosstool. What this linking mode was used for was to separate when we
link transitive shared library from cc_binary and when we link this
little-and-not-really-useful-outside-of-bazel nodeps shared library in cc_library.
RELNOTES: CcToolchain: Introduced action_config for "c++-link-transitive-dynamic-library"
PiperOrigin-RevId: 187523334
|
|
|
|
|
|
|
| |
a nice consequence, this lets us reduce GC churn since we no longer need to create a frame instance for the lexical frame at a callsite of either a function when the environment is frozen or a builtin function (since builtins cannot modify bindings in their lexical frame).
RELNOTES: None
PiperOrigin-RevId: 187495787
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The output files are created without a repository, but the expected
filenames have them
This resolves issues when having a proto_library from an external build
file.
This seems to be a regression, so maybe should go into the 0.8.0 branch?
Note: Work at Square and we have a signed CLA with google
Note, without this fix we get errors like
```
ERROR: /private/var/tmp/_bazel_lewis/4a25cfc2b9b758043413ac58525ef6b4/external/AllProtos/BUILD.bazel:27:1: output 'external/AllProtos/squareup/objc/objc.j2objc.pb.m' was not created
ERROR: /private/var/tmp/_bazel_lewis/4a25cfc2b9b758043413ac58525ef6b4/external/AllProtos/BUILD.bazel:27:1: output 'external/AllProtos/squareup/objc/objc.j2objc.pb.h' was not created
```
Closes #4058.
PiperOrigin-RevId: 187480864
|