aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google
Commit message (Collapse)AuthorAge
* Integrate import_deps_checker into aar_import.Gravatar cnsun2018-03-13
| | | | | RELNOTES: Enable dependency checking for aar_import targets. PiperOrigin-RevId: 188912126
* Remove documentation regarding keystore name and password.Gravatar ajmichael2018-03-13
| | | | | RELNOTES: None PiperOrigin-RevId: 188895880
* Add a helper method for checking whether toolchain resolution is enabled for ↵Gravatar John Cater2018-03-13
| | | | | | | | | a toolchain type. Closes #4832. Change-Id: Ia4fce6dd7003dc441f81ea7ca65ce865ca222142 PiperOrigin-RevId: 188882041
* PiperOrigin-RevId: 188862123Gravatar lpino2018-03-13
|
* Make DeployArchiveBuilder fetch the C++ toolchain identifier throughGravatar lberki2018-03-13
| | | | | | | | | CcToolchainProvider instead of BuildConfiguration. This is a step towards removing BuildConfiguration#getPlatformName(). RELNOTES: None. PiperOrigin-RevId: 188862029
* tests: add TimestampGranularityUtilsGravatar laszlocsomor2018-03-13
| | | | | | | | | | | | | | Add a new test utility class TimestampGranularityUtils which offers methods to wait for the filesystem timestamp granularity to pass. Such waiting is necessary if a test asserts changes in a file's mtime or ctime. This is a follow-up to comments on https://github.com/bazelbuild/bazel/commit/a31e035fb42aa8db9fd248ef2ebd665a411053b8. PiperOrigin-RevId: 188847729
* Fix toolchain and execution platform registration to use patterns.Gravatar John Cater2018-03-12
| | | | | | | | This allows more flexibility in registering toolchains and execution platforms, both in the WORKSPACE and from the command-line. Change-Id: I6fe75507d1a74de74085b7c927fdf093c152b894 PiperOrigin-RevId: 188813688
* Add mostly-ide-generated hashCode for RootedPathGravatar michajlo2018-03-12
| | | | | | | Removed null-checks since not expecting null. RootedPath's hashCode is called enough that it's worth optimizing. PiperOrigin-RevId: 188801280
* Tag Attribute, SkylarkDefinedAspect and some other Skylark classes withGravatar mjhalupka2018-03-12
| | | | | | | | | @AutoCodec. Remove Environment from SkylarkDefinedAspect. Add a note to BuiltInFunction that we shouldn't need to serialize it because all instances should be constant. PiperOrigin-RevId: 188763259
* Remove comment that is false as of a recent commit.Gravatar nharmata2018-03-12
| | | | | RELNOTES: None PiperOrigin-RevId: 188739970
* Remove support for blaze dump --vfs.Gravatar tomlu2018-03-12
| | | | | | | It is no longer meaningful since the vfs doesn't have an internal path tree to dump. RELNOTES: Remove support for blaze dump --vfs. It is no longer meaningful. PiperOrigin-RevId: 188739379
* Clarify description of the configuration typeGravatar brandjon2018-03-12
| | | | | RELNOTES: None PiperOrigin-RevId: 188735555
* Automated rollback of commit 7ba939dfd5df48903929e9c14ebd0449656403e4.Gravatar shreyax2018-03-12
| | | | | | | | | | | | *** Reason for rollback *** Likely cause for non-determinism in skyframe *** Original change description *** Cache SkylarkLookupImportValues in memory so that we don't recompute them multiple times. PiperOrigin-RevId: 188729929
* Unify action_configs for static librariesGravatar hlopko2018-03-12
| | | | | | | | | | | 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
* Fix docstring variable expansion for @SkylarkModuleGravatar brandjon2018-03-12
| | | | | RELNOTES: PiperOrigin-RevId: 188712452
* Add RuleContext#getConfiguredTargetAndDataMap and use it in analysis/Util.Gravatar janakr2018-03-10
| | | | PiperOrigin-RevId: 188629293
* Make RuleContext#getSplitPrerequisiteConfiguredTargetAndTargets public and ↵Gravatar janakr2018-03-10
| | | | | | use it in android/NativeLibs. PiperOrigin-RevId: 188625886
* Fix broken links and formattingGravatar brandjon2018-03-10
| | | | | RELNOTES: None PiperOrigin-RevId: 188625855
* Add RuleContext#getPrerequisiteConfiguredTargetAndTarget and use it in ↵Gravatar janakr2018-03-10
| | | | | | GoTest to avoid calling ConfiguredTarget#getConfiguration. PiperOrigin-RevId: 188623273
* Replace some #getConfiguration calls coming from a TransitiveInfoCollection ↵Gravatar janakr2018-03-10
| | | | | | that was obtained from a ConfiguredTargetAndData object anyway. PiperOrigin-RevId: 188621245
* Get rid of non-class-based lookups for ObjectCodecs. There were basically no ↵Gravatar janakr2018-03-10
| | | | | | | | 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
* Open-source ImmutableMapCodec and make it able to handle arbitrary ↵Gravatar janakr2018-03-10
| | | | | | | | | | 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
* Replace ConfiguredTargetAndData#getConfiguredTarget()#getConfiguration() ↵Gravatar janakr2018-03-10
| | | | | | with ConfiguredTargetAndData#getConfiguration(). Done using intellij structural replace. PiperOrigin-RevId: 188618282
* Make memoizing serialize and deserialize methods that take a codec ↵Gravatar janakr2018-03-10
| | | | | | package-private. PiperOrigin-RevId: 188610579
* Explicitly don't serialize/deserialize Package objects in ↵Gravatar janakr2018-03-10
| | | | | | ConfiguredTargetValue. The nested set of packages isn't usually set when serializing/deserializing, but it's good to be explicit, especially in tests. PiperOrigin-RevId: 188605043
* Update links to examplesGravatar brandjon2018-03-10
| | | | | | | See changes in https://github.com/bazelbuild/examples/pull/56 RELNOTES: None PiperOrigin-RevId: 188601311
* Add BuildConfiguration to ConfiguredTargetAndTarget and rename it to ↵Gravatar janakr2018-03-10
| | | | | | ConfiguredTargetAndData. We want to get BuildConfiguration out of ConfiguredTarget because it uses >800K when serialized. PiperOrigin-RevId: 188600002
* ActionOwner references only BuildEvent instead of full BuildConfigurationGravatar shahan2018-03-10
| | | | | | This reduces the size of its serialized representation. PiperOrigin-RevId: 188597127
* remote/http: support refresh of oauth2 tokens in the remote cache.Gravatar Jakob Buchgraber2018-03-10
| | | | | | Closes #4622. PiperOrigin-RevId: 188595430
* Allow ObjectCodecRegistry to handle MemoizingCodecs. Initially this is just ↵Gravatar janakr2018-03-09
| | | | | | | | | | | | | | | | 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
* Remove cycle error reporting from query results since they're not strictly ↵Gravatar juliexxia2018-03-09
| | | | | | relevant and only trigger when the implicit or explicit max depth > 20 which is confusing. PiperOrigin-RevId: 188559702
* Use RuleContext.getConfiguration() instead of ↵Gravatar janakr2018-03-09
| | | | | | | | RuleConfiguredTarget.getConfiguration(), since we have it handy. We'd like to get rid of BuildConfiguration from RuleConfiguredTarget. PiperOrigin-RevId: 188545048
* Support for passing options to LTO Backend actions onlyGravatar Googler2018-03-09
| | | | | | | | This is very useful for debugging and performance tuning. RELNOTES[NEW]: Adds --ltobackendopt and --per_file_ltobackendopt for passing options to ThinLTO LTO backend compile actions only. PiperOrigin-RevId: 188521075
* Add the ability to reconstruct a BuildOptions from the diff with another ↵Gravatar janakr2018-03-09
| | | | | | 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
* Improve the warning for malformed recursive configs.Gravatar ccalvarin2018-03-09
| | | | | | | | | 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
* Enable static_linking_mode or dynamic_linking_mode features from cc_binaryGravatar hlopko2018-03-09
| | | | | RELNOTES: CppRules: cc_binary/cc_test now enable 'static_linking_mode' or 'dynamic_linking_mode'. PiperOrigin-RevId: 188482267
* tests: fix flaky RecursiveFSTraversalFunctionTestGravatar Laszlo Csomor2018-03-09
| | | | | | | | | | | | | | | | | | 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
* tests: fix flaky SkyframeAwareActionTestGravatar Laszlo Csomor2018-03-09
| | | | | | | | | | | | | 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
* Optimize GC churn of parameter bindings performed before each user defined ↵Gravatar nharmata2018-03-08
| | | | | | | | | | | | | | | 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
* Add the flag --experimental_import_deps_checking to control the dependencyGravatar cnsun2018-03-08
| | | | | | | checking for aar_import and java_import targets. RELNOTES:None. PiperOrigin-RevId: 188399775
* Remove all dynamic type checking overhead for struct field accesses. These ↵Gravatar nharmata2018-03-08
| | | | | | | checks are unnecessary by construction; see the codepaths that construct SkylarkInfo instances. RELNOTES: None PiperOrigin-RevId: 188373688
* Tag SkylarkComputedDefault with @AutoCodecGravatar mjhalupka2018-03-08
| | | | PiperOrigin-RevId: 188367892
* Tag SkylarkType with @AutoCodec.Gravatar mjhalupka2018-03-08
| | | | PiperOrigin-RevId: 188367672
* As a micro-optimization, inline the "Callstack.enabled" guard. The java-land ↵Gravatar nharmata2018-03-08
| | | | | | | | | function call overhead of the morally no-op Callstack#push/pop was profiled to be ~1.4% CPU in a benchmark of loading a BUILD file that was particularly heavy in Skylark function calls. Alternatives considered: writing code that I hoped would be more amenable to the JIT choosing to inline the function call. I couldn't get this to work. RELNOTES: None PiperOrigin-RevId: 188350132
* Intern CollectTargetsInPackagKey. Bug from ↵Gravatar janakr2018-03-08
| | | | | | https://github.com/bazelbuild/bazel/commit/5fb2a487e53cc3d80e3654d5b63d062f7f70588b. PiperOrigin-RevId: 188348546
* Add an interface to interact with sandboxfs.Gravatar jmmv2018-03-08
| | | | | | | | | | | | | | | | 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
* Remove unnecessary I/O operations from handling remotely executed actions ↵Gravatar olaola2018-03-08
| | | | | | | | (fixes performance regression #4749). Also adding Skylark tests for input/output directories. TESTED=locally RELNOTES: Fix performance regression PiperOrigin-RevId: 188346410
* Remove unnecessary space in error message.Gravatar ajmichael2018-03-08
| | | | | RELNOTES: None PiperOrigin-RevId: 188341095
* update to MethodDescriptor methods instead of fieldsGravatar Carl Mastrangelo2018-03-08
| | | | | | | | @buchgr Closes #4790. PiperOrigin-RevId: 188332795
* C++: Marks Skylark exposed as not documented.Gravatar plf2018-03-08
| | | | | | | This is to avoid listing them in the Bazel docs for now. RELNOTES:none PiperOrigin-RevId: 188295824