aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google
Commit message (Collapse)AuthorAge
* Automated rollback of commit 67330ad52391ad6562d439f77cc5133a0ea4247d.Gravatar plf2018-01-10
| | | | | | | | | | | | | *** Reason for rollback *** Breaks nightly: b/71790513 *** Original change description *** C++ refactoring: Separate compilation and linking calls to CcLibraryHelper RELNOTES:none PiperOrigin-RevId: 181457811
* Automated rollback of commit a705eaa9225ff8a03975c8cb49faa6b2899e398d.Gravatar plf2018-01-10
| | | | | | | | | | | | | | | | | *** Reason for rollback *** Rolling back due to previous CL breaking nightly. *** Original change description *** Removes call to CcLibraryHelper.link() in cc_binary. This call is unnecessary when the sources of the cc_binary are being built as EXECUTABLE or DYNAMIC LIBRARY. The call doesn't do anything, no linking outputs are returned. RELNOTES:none PiperOrigin-RevId: 181457495
* Removes call to CcLibraryHelper.link() in cc_binary.Gravatar plf2018-01-10
| | | | | | | | | This call is unnecessary when the sources of the cc_binary are being built as EXECUTABLE or DYNAMIC LIBRARY. The call doesn't do anything, no linking outputs are returned. RELNOTES:none PiperOrigin-RevId: 181455622
* Remove ctx.fragments.jvm .Gravatar lberki2018-01-10
| | | | | | | | It contained no fields or any other information accessible from Skylark, so it's not a big loss. RELNOTES[INC]: ctx.fragments.jvm is not available anymore. PiperOrigin-RevId: 181455474
* Create function createJavaInfo with new API. Implement ↵Gravatar dbabkin2018-01-10
| | | | | | | | | | JavaCompilationArgsProvider. Added tests for checking JavaCompilationArgsProvider state. All other providers will be implemented in next CLs. RELNOTES:none PiperOrigin-RevId: 181451235
* BEP: add a separate id for visibility errorsGravatar Klaus Aehlig2018-01-10
| | | | | | | | | | A build might fail because of a visibility violation that does not happen at a top-level target. To avoid confusion, add a separate namespace for configured targets that are just mentioned to report the details of an error. Change-Id: I86587f7489500f1d888bae6ce3d6f4bd79ea1609 PiperOrigin-RevId: 181448003
* Adds a CODEC for CppConfiguration.Gravatar shahan2018-01-10
| | | | | | | * Creates an enum for cpu transformer, which is easier to serialize than an opaque function. This also means moving FakeCPU to avoid introducing a circular dependency. * Adds a CODEC to Path using InjectingObjectCodec. PiperOrigin-RevId: 181445911
* Remove package loading from JvmConfigurationLoader .Gravatar lberki2018-01-10
| | | | | | | | | | | | | This should not cause a user-visible change: --{host_,}javabase was already required to point to a java_runtime_suite / java_runtime rule, the only change is that we now enforce it differently. If anything, this makes Bazel more lenient in that it now accepts Skylark rules that provide JavaRuntimeInfo, but I doubt anyone does that, since it does not work at HEAD. RELNOTES: None. PiperOrigin-RevId: 181444563
* Adjust semantics of Metadata interface, remove isFile (use getType)Gravatar ulfjack2018-01-10
| | | | | | | | After some consideration, I think it makes sense to always allow a getDigest call, instead of specifying it as disallowed based on type. This is a follow-up CL for a previous CL introducing the getType method, which increased the complexity of the specification. I have a follow-up CL, which is related, namely unknown commit. After that CL, Metadata instances for directories (but not Filesets) also have digests rather than using mtime, which is compatible with the documentation changes made here. Said CL is solving a correctness issue with directory dependencies, which I think we want, and using the digest in the Metadata is a natural way to get correct action cache lookups. PiperOrigin-RevId: 181440548
* use built-in params file support in DexArchiveAspectGravatar kmb2018-01-09
| | | | | | RELNOTES: None. PiperOrigin-RevId: 181397098
* Automated rollback of commit 80c8ff1819a889814cbe2dae477d7fedce6aa181.Gravatar tomlu2018-01-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Rolling forward after underlying issue has been fixed. *** Original change description *** Automated rollback of commit d50cbbeef115f28c0cea1ac17572e0f12c0cf312. *** Reason for rollback *** b/71442447 *** Original change description *** Remove synchronization from file system. After the path refactor we will no longer have path instances to synchronize on. The underlying OS file systems are already naturally thread safe, that is, their internal data structures cannot be damaged. Any further synchronization (eg. races between directory creation and deletion) has to be managed at the client level. The l... *** PiperOrigin-RevId: 181368707
* Automated rollback of commit cb7689404ef9a69488d64bfc2e0bfb9326e664d6.Gravatar tomlu2018-01-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Rolling forward after the underlying issue has been fixed. *** Original change description *** Automated rollback of commit 6a54339bb943702bd7dffc43f85267dac98dc355. *** Reason for rollback *** b/71442447 *** Original change description *** Call through to Path#createDirectoryAndParents from FileUtils. This CL removes a method that due to its implementation causes threading difficulties for Path#createDirectory. The tests for the method are brought across to FileSystemTests since the methods are now implemented natively by the FileSystem classes. The tests were also cleaned up. The test revealed an edge c... *** PiperOrigin-RevId: 181367850
* Stop memoizing Label#hashCode()Gravatar michajlo2018-01-09
| | | | | | | | | | | | Both members of Label (String & PackageIdentifier) have memoized hash codes so this should be marginally more expensive but probably not noticably so. The benefit is it makes Label objects smaller in certain vm conditions. As to why things were the way they were, I believe this is from before PackageIdentifier memoized its hashCode. RELNOTES: None PiperOrigin-RevId: 181362077
* Refactor ObjcProvider to abide by Native Declared Provider best practices.Gravatar cparsons2018-01-09
| | | | | | | This has the effect of documenting exposed struct fields on the provider. RELNOTES: None. PiperOrigin-RevId: 181346052
* RELNOTES: Make PIC and non PIC outputs for C++ compilation with Tree ArtifactsGravatar Googler2018-01-09
| | | | PiperOrigin-RevId: 181330907
* sandbox: allow adding some non-existent pathsGravatar Laszlo Csomor2018-01-09
| | | | | | | | | | | | | | | | | | | | | | | | | When Bazel creates the sandbox, it will allow making non-existent paths writable, as long as the path is under the sandbox root. As Bazel adds entries to the sandbox's set of writable paths, Bazel needs to make sure that it's not adding symlinks, because doing so would make the symlink writable, not what the link points to. If the path is under the sandbox root, then at the time of setting up the sandbox's writable paths the path surely doesn't exist yet, but that's OK, because at that time Bazel didn't yet create the sandbox root. If the path is not under the sandbox root, then Bazel needs to resolve all symlinks on this path, which is only possible if the path exists, therefore Bazel checks for the path's existence. Change-Id: Ic7d99a81905e7401455286c0b375d69b85ece1d5 PiperOrigin-RevId: 181325749
* Removes unnecessary check for LinkTargetType.EXECUTABLE.Gravatar plf2018-01-09
| | | | | | | | | | | The precondition check in line 1274 makes sure that it has Staticness.STATIC. EXECUTABLE has Staticness.DYNAMIC which precludes the checks from ever being executed. NO_SQ=Kokoro failing without giving an actual error. RELNOTES:none PiperOrigin-RevId: 181314900
* Expose the Java home to Skylark.Gravatar lberki2018-01-09
| | | | | RELNOTES: None. PiperOrigin-RevId: 181297029
* Cleanup: move some tests {ArtifactFunction,FileArtifactValue}TestGravatar ulfjack2018-01-09
| | | | | | | | These tests don't require a full Skyframe instance, so we might as well move them to a lighter-weight test class. Also, it turns out that we have duplicate tests for equality and hashing - this is now explicit. PiperOrigin-RevId: 181285144
* Fix android_binary.aapt_version docs referencing the wrong flagGravatar Googler2018-01-08
| | | | PiperOrigin-RevId: 181255541
* Expose apple_common.link_multi_arch_binary to Skylark.Gravatar cparsons2018-01-08
| | | | | | | | This API mimics the linking logic of apple_binary, and is a step to migrating apple_binary to skylark. This API is *highly experimental* and subject to change. RELNOTES: None. PiperOrigin-RevId: 181215275
* Add another path to the windows_jni.dll lookup.Gravatar Pascal Muetschard2018-01-08
| | | | | | | | | | | | | | This is to fix building android outside of the bazel repository. To reproduce the issue (on a Windows machine, of course): 1. Copy the examples/android folder from a bazel checkout to a new folder (keep the same folder structure - i.e. `<new folder>/examples/android`) 2. Create a `WORKSPACE` file in `<new folder>` with the `android_sdk_repository` and `android_ndk_repository` rules as described in the example README. 3. `bazel build examples/android/java/bazel:hello_world` 4. Observe the failure to locate `windows_jni.dll` Closes #4392. PiperOrigin-RevId: 181181641
* Use EmptyActionInput instead of null in SpawnInputExpanderGravatar ulfjack2018-01-08
| | | | | | | | This simplifies some spawn runners, which no longer have to specially handle null; unfortunately, the sandbox runners do not support VirtualActionInput, so they still have to special-case it. PiperOrigin-RevId: 181175408
* C++ refactoring: Separate compilation and linking calls to CcLibraryHelperGravatar plf2018-01-08
| | | | | RELNOTES:none PiperOrigin-RevId: 181169134
* Remove code that used to support --javabase=<absolute path>.Gravatar lberki2018-01-08
| | | | | | | | | This is the first step in removing package loading from JvmConfigurationLoader (I didn't want to add the rest into this change because it's technically possible to access ctx.fragments.jvm even though it contains no fields, so removing that is an incompatible change) and it's also possible that removing error reporting from JvmConfigurationLoader causes some subtle changes in behavior. Baby steps. Now that the hard part is done, there is no need to rush. RELNOTES: None. PiperOrigin-RevId: 181143978
* Cleanup: remove use of LegacySkyKey for TargetCompletionKeyGravatar ulfjack2018-01-08
| | | | PiperOrigin-RevId: 181141383
* actions: don't add the server's TMPDIR to the envGravatar Laszlo Csomor2018-01-08
| | | | | | | | | | | | | | | The BazelConfiguration no longer adds the Bazel server process' TMPDIR/TMP/TEMP environment variables. I added that code before having implemented always creating a temp directory for actions: https://github.com/bazelbuild/bazel/commit/cfccdf1f6e93125d894ff40e0ccecaf20cc20ef5 See https://github.com/bazelbuild/bazel/issues/4376 Change-Id: I8ba63d6120a0aa849997b274fb2d68ad50b2285c PiperOrigin-RevId: 181134179
* sandbox runners: always use updated environmentGravatar Laszlo Csomor2018-01-08
| | | | | | | | | | | The sandboxed Spawn runners already used to call LocalEnvProvider.rewriteEnvironment in order to add TMPDIR for example, but didn't consistently use this rewritten environment everywhere, and used the Spawn's original environment instead. Change-Id: Ifbede6ac0f14b83c617dcbcd85edfae88718b157 PiperOrigin-RevId: 181130506
* For InjectingObjectCodec, also forwards dependency to serialize.Gravatar shahan2018-01-07
| | | | PiperOrigin-RevId: 181105886
* Deletes FakeAutoCodecProcessor.Gravatar shahan2018-01-07
| | | | | | | This is not needed for bootstrapping, which can be done using the real AutoCodecProcessor anyway. PiperOrigin-RevId: 181099386
* @AutoCodec: allow CONSTRUCTOR strategy to be used with dependency element.Gravatar shahan2018-01-05
| | | | | | | | | | It's very common for a child to need a dependency that the parent does not. This eliminates the need for a `@AutoCodec.Dependency D unusedDependency' constructor parameter. * Adds a marshaller for HashCode. PiperOrigin-RevId: 180989432
* Codecs for all non-test Fragment subclasses (except CppConfiguration, ↵Gravatar shahan2018-01-05
| | | | | | handled separately). PiperOrigin-RevId: 180974083
* Update documentation on local_repository.path.Gravatar jcater2018-01-05
| | | | | | Fixes #4391. PiperOrigin-RevId: 180963440
* PiperOrigin-RevId: 180959513Gravatar Googler2018-01-05
|
* Enables dependency injection for PUBLIC_FIELD and POLYMORPHIC AutoCodec ↵Gravatar shahan2018-01-05
| | | | | | strategies. PiperOrigin-RevId: 180954849
* Automated rollback of commit 6a54339bb943702bd7dffc43f85267dac98dc355.Gravatar tomlu2018-01-05
| | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** b/71442447 *** Original change description *** Call through to Path#createDirectoryAndParents from FileUtils. This CL removes a method that due to its implementation causes threading difficulties for Path#createDirectory. The tests for the method are brought across to FileSystemTests since the methods are now implemented natively by the FileSystem classes. The tests were also cleaned up. The test revealed an edge case bug in JavaIoFileSystem, so fix this. In two cases some code was using the return value from the old method. Returning "f... *** ROLLBACK_OF=179864042 PiperOrigin-RevId: 180946251
* Automated rollback of commit d50cbbeef115f28c0cea1ac17572e0f12c0cf312.Gravatar tomlu2018-01-05
| | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** b/71442447 *** Original change description *** Remove synchronization from file system. After the path refactor we will no longer have path instances to synchronize on. The underlying OS file systems are already naturally thread safe, that is, their internal data structures cannot be damaged. Any further synchronization (eg. races between directory creation and deletion) has to be managed at the client level. The last attempt to do this failed because of races in FileUtils#createDirectoryAndParents on Windows. This method is now gone, rep... *** ROLLBACK_OF=180290901 PiperOrigin-RevId: 180936132
* Remove support for Windows relative-to-current-drive paths.Gravatar tomlu2018-01-05
| | | | | | Eg. 'C:foo' was previously "the directory 'foo' relative to the current directory of drive 'C:\'". Now it is simple interpreted as "the relative path fragment 'C:foo'". PiperOrigin-RevId: 180936012
* sandbox: error out if $TEST_TMPDIR doesn't existGravatar Laszlo Csomor2018-01-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | As part of setting up a sandbox, Bazel creates the list of writable paths. If the action's environment defines $TEST_TMPDIR, then it's a test action and the sandbox must allow writing to that path, therefore Bazel must add $TEST_TMPDIR to the writable paths. Bazel must resolve symlinks in that path though, at least on the last path segment, because in case the path points to a symlink, the action would be allowed to modify the symlink itself, and not access what the link points to. However the path must exist for Bazel to successfully resolve symlinks, therefore this commit adds a check for that. Given that the code was there since at least July 2017, and I'm not aware of bugs caused by it, I conclude that this code path either never runs or nobody ever triggered it. Either way, adding the check is the right thing to do. Change-Id: I87a5d3fc3fe7878a918ed318c71e8d135f10f1b8 PiperOrigin-RevId: 180931382
* Automated rollback of commit 9e63684a58025d98bfe2f180d56ba7ece69545ae.Gravatar juliexxia2018-01-05
| | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Roll forward of commit 86b4532769c22cca2ed7068a60f3326beaad34af after fixing bad import. +small misc fixes suggested by critique *** Original change description *** Automated rollback of commit 86b4532769c22cca2ed7068a60f3326beaad34af. *** Reason for rollback *** Probably breaking //javatests/com/google/devtools/build/lib:Query2Tests *** Original change description *** Restructure how universeScope is used when testing configured query to mimick impending changes to the configured query interface (CL/179872445) which will pull build targets out of the query expression. Fill in testTopLevelTransitions on the way! PiperOrigin-RevId: 180930388
* Fix the attr documentationGravatar vladmos2018-01-05
| | | | | | Fixed a broken link, also applied a couple of minor changes. PiperOrigin-RevId: 180913699
* Merge the runfiles of @androidsdk//:aapt_binary into ↵Gravatar jingwen2018-01-04
| | | | | | | | | | | | | android_instrumentation_test's runfiles, and pass the execpath of aapt_binary to the entry point using the --aapt flag. This allows android_instrumentation_test to use the dynamically linked AAPT from the user-provided SDK. The reason for not using %aapt% template expansion in the stub template is because @androidsdk//:aapt_binary is a shell script with hardcoded paths to the actual dependencies in its runfiles directory, but since this binary is called within an android_instrumentation_test's runfiles directory, the nested aapt runfiles directory doesn't exist because runfiles are not nested, but merged. We can make this work by referring to the actual external/androidsdk/aapt_binary using a `../../` directory traversal, and we can also assume that the aapt_binary is there because android_instrumentation_test merged aapt's runfiles from the SDK. RELNOTES: None. PiperOrigin-RevId: 180888739
* Automated rollback of commit 86b4532769c22cca2ed7068a60f3326beaad34af.Gravatar juliexxia2018-01-04
| | | | | | | | | | | | | | *** Reason for rollback *** Probably breaking //javatests/com/google/devtools/build/lib:Query2Tests *** Original change description *** Restructure how universeScope is used when testing configured query to mimick impending changes to the configured query interface (CL/179872445) which will pull build targets out of the query expression. Fill in testTopLevelTransitions on the way! PiperOrigin-RevId: 180880350
* Restructure how universeScope is used when testing configured query to ↵Gravatar juliexxia2018-01-04
| | | | | | | | mimick impending changes to the configured query interface (CL/179872445) which will pull build targets out of the query expression. Fill in testTopLevelTransitions on the way! PiperOrigin-RevId: 180854150
* Allow late bound defaults in skylark aspectsGravatar cparsons2018-01-04
| | | | | RELNOTES: None. PiperOrigin-RevId: 180849649
* Move PatchTransition and kin to analysis.config.transitions.Gravatar gregce2018-01-04
| | | | | | | HostTransition can't be migrated yet because it depends on BuildConfiguration. PiperOrigin-RevId: 180842784
* Fix Action subclasses so that the execution platform is properly set inGravatar John Cater2018-01-04
| | | | | | | | | more cases. Part of #4128. Change-Id: Ife5e4581f91ac07931d193ed5eaa256aab3ad047 PiperOrigin-RevId: 180826445
* Propagate deps' objc providers with AppleLoadableBundleGravatar cparsons2018-01-04
| | | | | | | | This change allows turndown of top-level ObjcProvider propagation by apple_binary via --noexperimental_objc_provider_from_linked. ios test bundle rules depend on loadable bundle apple_binary, and require the binary's deps' objc providers -- thus this is the only mechanism to propagate these providers. RELNOTES: None. PiperOrigin-RevId: 180824037
* Remove defunct Android incremental dexing flagsGravatar kmb2018-01-04
| | | | | | RELNOTES: Remove defunct flags --experimental_incremental_dexing_for_lite_proto and --experimental_incremental_dexing_error_on_missed_jars that have long been enabled by default PiperOrigin-RevId: 180821902
* Extract LocalEnvProvider members to classes.Gravatar Laszlo Csomor2018-01-04
| | | | | | | | | | | | | | | | | | Create a PosixLocalEnvProvider and WindowsLocalEnvProvider class, with singleton instances for now. This refactoring should not change functionality, it's just a requirement for an upcoming change. That upcoming change is for these classes to respect the client environment's TMPDIR or TMP/TEMP envvars. See https://github.com/bazelbuild/bazel/issues/4376 Change-Id: I032bb6f18adf8af9e43e6bc543c09c58adae3863 PiperOrigin-RevId: 180799936