aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
Commit message (Collapse)AuthorAge
* Fix android_binary.aapt_version docs referencing the wrong flagGravatar Googler2018-01-08
| | | | PiperOrigin-RevId: 181255541
* Serialize and package xml attributes from resources xml tags in values ↵Gravatar Googler2018-01-08
| | | | | | | folders for aapt2. RELNOTES: none PiperOrigin-RevId: 181226483
* 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 Iterable#forEach instead of `.stream().forEach`.Gravatar cushon2018-01-08
| | | | PiperOrigin-RevId: 181180652
* 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
* Fix param names - this is going to be enforced with error proneGravatar ulfjack2018-01-08
| | | | PiperOrigin-RevId: 181162816
* 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
* Make SJD @Generated handling compatible with ↵Gravatar cushon2018-01-05
| | | | | | javax.annotation.processing.Generated PiperOrigin-RevId: 181012373
* @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
* Batch SJD errors for an entire compilationGravatar cushon2018-01-05
| | | | | | | instead of emitting them one file at a time. This provides users with a single add_dep command instead of one-per-file. PiperOrigin-RevId: 180979982
* Codecs for all non-test Fragment subclasses (except CppConfiguration, ↵Gravatar shahan2018-01-05
| | | | | | handled separately). PiperOrigin-RevId: 180974083
* PiperOrigin-RevId: 180964207Gravatar kmb2018-01-05
|
* 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
* Add support for native header outputs to JavaBuilderGravatar cushon2018-01-05
| | | | | | | | Add a --native_header_output flag which, if set, causes JavaBuilder to set the equivalent of `javac -h`, and then collect all generated headers and write them to a jar archive at the given path. PiperOrigin-RevId: 180954084
* Relax the assertion on the inferred resource type. Now we only require that theGravatar cnsun2018-01-05
| | | | | | | | | resource type should have a (public) close() method. The old version requires the resource type implements AutoCloseable. When the classpath provided to Desugar has some problems, the resource type may not implement AutoCloseable, though it has the close() method. RELNOTES:n/a. PiperOrigin-RevId: 180950815
* 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
* action_temp_test: eliminate for-loopGravatar Laszlo Csomor2018-01-05
| | | | | | | | | | | | Refactor the test not to use a for-loop to iterate over the strategies. This way it's easier to see from the failure stack trace which strategy it was exactly that failed. This is preparation for https://github.com/bazelbuild/bazel/issues/4376 Change-Id: I2004b58957c823701c2d68682e7d8b78e80c834a PiperOrigin-RevId: 180911370
* 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
* Automatic code cleanup.Gravatar cushon2018-01-04
| | | | PiperOrigin-RevId: 180878300
* Automated rollback of changelist 180845132.Gravatar Googler2018-01-04
| | | | | | | | | | | | | | | | *** Reason for rollback *** Roll forward, add updated Resources.proto. Branch: pi-release Repo: platform/frameworks/base ID: 8552195d338da03df31ec188322ff30e2878d6d2 TAP Presubmit [] RELNOTES: New version of aapt2 and Resources.proto. PiperOrigin-RevId: 180873128
* 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
* Add new shell test target for CommandUsingLinuxSandboxTest, and remove it ↵Gravatar ruperts2018-01-04
| | | | | | | from the ShellTests catch-all target. RELNOTES: None. PiperOrigin-RevId: 180836428
* Make lib/shell test targets more consistent.Gravatar ruperts2018-01-04
| | | | | RELNOTES: None. PiperOrigin-RevId: 180826643
* 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
* Always filter resources by density in executionGravatar Googler2018-01-04
| | | | | | | | | | | | | | | Newly discovered bugs indicate that density filtering in analysis does not cover all cases. Filter in execution as a workaround for these cases. This will let us turn resource filtering in analysis on and avoid these bugs. (I will work on actually fixing these bugs in parallel.) Non-density filtering already runs in execution, even when already filtering in analysis, due to known limitations of filtering in analysis. (Specifically, aapt filters more strictly than android_ide_common, and also needs the resource filters passed anyway to generate pseudolocalized resources.) RELNOTES: none PiperOrigin-RevId: 180806206
* 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
* Allows @AutoCodec to handle injected deserialization dependencies.Gravatar shahan2018-01-04
| | | | | | | * Adds an interface, InjectingObjectCodec, taking an injected parameter in its deserialize method. * Adds the annotation, @AutoCodec.Dependency, that can be used to indicate that a constructor parameter is a dependency instead of a normal parameter. PiperOrigin-RevId: 180797816
* Rewrite //src/test/py/bazel:action_temp_testGravatar Laszlo Csomor2018-01-04
| | | | | | | | | | | | | | | | Merge the test methods into one test method, in order to reuse the workspace and the Bazel server. Add an input file to the mock build rules and update it before each build, to ensure that Bazel reruns the actions and uses the strategy-specific temp directory. This change reduces the test's runtime on Linux from 20.2s to 14.7s (average of 5 runs each). Change-Id: Ia2a8d477d13271af59cdf55cdc49f137460a1b96 PiperOrigin-RevId: 180796797
* Correct comment for OneVersionEnforcementLevelConverter.Gravatar Benjamin Peterson2018-01-04
| | | | | | | Fixup from copy-paste in c5672f8edb1cb9fb7806024706d776901d7d434e ("Add the option for warning-level enforcement of One Version violations.") Change-Id: I90909b2f14aa7a8e0beadb99a72c25ab71bc40d8 PiperOrigin-RevId: 180779047
* Consolidate GlobDescriptor functionalityGravatar michajlo2018-01-03
| | | | | | | | Makes GlobDescriptor directly implement SkyKey and adds custom serialization logic. This lets us narrow visibility and migrate yet another SkyKey away from LegacySkyKey. PiperOrigin-RevId: 180705483
* @AutoCodec: proper handling of checked exceptions thrown by constructors.Gravatar shahan2018-01-03
| | | | PiperOrigin-RevId: 180697983