aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/tools
Commit message (Collapse)AuthorAge
* multi-thread DexFileMergerGravatar kmb2017-08-11
| | | | | | RELNOTES: speedup of incremental dexing tools PiperOrigin-RevId: 164926895
* Adds aapt2.ResourceCompiler and CompileLibraryResourcesAction.Gravatar corysmith2017-08-11
| | | | | | | | | | Refactorings: * Change data binding to have configurable archive generation * Extract a ZipBuilder class from the ZipBuilderVisitor to provide a general purpose archiving class. * Small changes to visibility AaptCommandLineBuilder for reuse in the aapt2 code. RELNOTES: None PiperOrigin-RevId: 164880571
* Rewrite the Command APIGravatar ulfjack2017-08-10
| | | | | | | | | | | | | | | | | | | | | | | | Important: the simplified API now defaults to forwarding interrupts to subprocesses. I did audit all the call sites, and I think this is a safe change to make. - Properly support timeouts with all implementations - Simplify the API - only provide two flavours of blocking calls, which require no input and forward interrupts; this is the most common usage - provide a number of async calls, which optionally takes input, and a flag whether to forward interrupts - only support input streams, no byte arrays or other 'convenience features' that are rarely needed and unnecessarily increase the surface area - use java.time.Duration to specify timeout; for consistency, interpret a timeout of <= 0 as no timeout (i.e., including rather than excluding 0) - KillableObserver and subclasses are no longer part of the public API, but still used to implement timeouts if the Subprocess.Factory does not support them - Update the documentation for Command - Update all callers; most callers now use the simplified API PiperOrigin-RevId: 164716782
* Remove invalid check. It is possible that an interface initializer can setGravatar cnsun2017-08-09
| | | | | | | | fields in other classes. The original check assumes that this is not possible. This CL just deletes that check. RELNOTES: None PiperOrigin-RevId: 164622080
* write dex archives uncompressedGravatar kmb2017-08-09
| | | | | | RELNOTES: none PiperOrigin-RevId: 164620306
* Automated rollback of commit 963db879575132933d9254406b4c76a8f10b0ad1.Gravatar ajmichael2017-08-09
| | | | | | | *** Reason for rollback *** RELNOTES: None PiperOrigin-RevId: 164590392
* Remove special ordering of resources from PlaceholderIdFieldInitializerBuilderGravatar Googler2017-08-08
| | | | | | | | | | | | | | | | | | | | | | Before this change, PlaceholderIdFieldInitializerBuilder attempted to exactly mimic the behavior of Aapt and Gradle in assigning resource IDs. However, nothing should be relying on that specific behavior. Even if code for some reason is relying on that behavior (by, for example, doing math on a resource ID to get another resource ID), this code is currently only used to compile library resource files, which are not actually used in finished android_binary targets. This change removes the part that relies on a specific ordering of ResourceTypes; it instead just relies on the names and ordering within ResourceType. This makes things a bit simpler and also ensures new resource types added to the ResourceType enum will be picked up automatically. In particular, this change will allow us to use the new Font resource type as soon as it is released in android_ide_common. RELNOTES: none PiperOrigin-RevId: 164497262
* improve efficiency of no-op desugaringsGravatar kmb2017-08-08
| | | | | | | | | - skip lambda desugaring when it won't do anything - skip ASM class writing when no desugarings apply to an input class also minor improvements to prefix remapping RELNOTES: none PiperOrigin-RevId: 164492293
* remote_worker: Serialize fork() calls. Fixes #3356Gravatar buchgr2017-08-07
| | | | | | | | | | | | | Spawning processes concurrently from multiple threads doesn't work reliably on Linux (see bug for details). This change introduces simply puts a synchronized block around fork(). I have tested this change by repeatedly running a build of bazel for 2 hours on a 64 core machine with up to 200 concurrent actions. There wasn't a single failure. PiperOrigin-RevId: 164450559
* Internal changeGravatar Googler2017-08-07
| | | | PiperOrigin-RevId: 164436730
* Windows, sh_bin. launcher: fix manifest pathGravatar Laszlo Csomor2017-08-07
| | | | | | | | | | | | Fix the path we set in the exe launcher for the RUNFILES_MANIFEST_FILE path. It now uses forward slashes because it's to be consumed by the shell script. This is a follow-up to commit 837e1b3d4859140d29aaa6bbab8fbb008e6d701e Change-Id: Id8331cdcf58adb31ed2b60ebbc57022a0bf32438 PiperOrigin-RevId: 164436539
* don't use methods and classes removed in upstream dxGravatar kmb2017-08-07
| | | | | | RELNOTES: update dexing tools to Android SDK 26.0.1 PiperOrigin-RevId: 164278101
* Android BusyBox: deprecate --libraries flagGravatar laszlocsomor2017-08-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Deprecate the --libraries flag of the GENERATE_BINARY_R tool in favour of --library. The new flag is multi-value and uses "," as the pair-separator instead of ":". The value converter still supports ":"-separated pairs as well, but looks for "," first. Old format: --libraries=key1:value1,key2:value2,... New format: --library=key1,value1 --library=key2,value2 Motivation: - the ":"-separator prevents using absolute paths on Windows The old flag is still supported, but will be removed after 2018-02-28 (about 6 months from now). Also in this commit: - add a new method to CustomCommandLine.Builder to lazily construct the command line for the --library flag See https://github.com/bazelbuild/bazel/issues/3264 RELNOTES: none PiperOrigin-RevId: 164246506
* Windows, sh_bin. launcher: export runfiles envvarsGravatar Laszlo Csomor2017-08-03
| | | | | | | | | | | Fix the exe launcher of sh_binary rules to export the RUNFILES_MANIFEST_ONLY and RUNFILES_MANIFEST_FILE environment variables. Fixes https://github.com/bazelbuild/bazel/issues/3492 Change-Id: I8507565f44c8b59f8218570306375cc083a41e03 PiperOrigin-RevId: 164095286
* Tolerate missing interface markers in method calls from interface methods to ↵Gravatar kmb2017-08-03
| | | | | | | | methods in that interface. RELNOTES: none PiperOrigin-RevId: 164041648
* Alter the order of class visitors, to make sure that Objects.requireNonNUllGravatar cnsun2017-08-03
| | | | | | | and Long.compare are correctly handled. RELNOTES: None PiperOrigin-RevId: 164018569
* Bazel, Android: fix Bazel CI breakageGravatar laszlocsomor2017-08-01
| | | | | | | | Add a `select` so Bazel won't try to build windows_jni.dll on Linux/MacOS. RELNOTES: none PiperOrigin-RevId: 163832982
* Android BusyBox: remove dead codeGravatar laszlocsomor2017-08-01
| | | | | | | | Remove Converters.ExistingPathListConverter, it wasn't used anywhere. RELNOTES: none PiperOrigin-RevId: 163810436
* Windows: Android BusyBox can access the JNI libGravatar Laszlo Csomor2017-07-31
| | | | | | | | | | | | | | | Add a data-dependency on the windows_jni.dll from the BusyBox in BUILD.tools, so the BusyBox in @build_tools// can actually find it at runtime. Also update the script that builds the .dll so that it works if the source files have an "external/bazel_tools/" prefix. Related to https://github.com/bazelbuild/bazel/issues/3264 Change-Id: I005e9d2c00253a59d2cd5cc9f3a93528dc4d2e9e PiperOrigin-RevId: 163691320
* Using cc_binary to build windows_jni.dllGravatar Yun Peng2017-07-31
| | | | | | | Get rid of build_windows_jni.sh and the corresponding genrule. Change-Id: I89a199b61109f5687f8b500b60d284cae97f6457 PiperOrigin-RevId: 163679307
* Remove old intellij aspect code bundled with BazelGravatar Googler2017-07-31
| | | | PiperOrigin-RevId: 163538636
* Automated rollback of commit ed6f653834ac5069c6ab0fb871bc41554fbf36f1.Gravatar ulfjack2017-07-28
| | | | | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** The original change actually works, but our export process was using an old configuration. *** Original change description *** Automated rollback of commit d164e6679650c50197f4aac1a31d65010dd7bc04. *** Reason for rollback *** Relies on https://github.com/bazelbuild/bazel/commit/ecd3ff16277729abb1baea66e51b3bd0835af01e, which removes src/tools/benchmark/BUILD file: see https://github.com/bazelbuild/bazel/commit/ecd3ff16277729abb1baea66e51b3bd0835af01e *** Original change description *** Auto-export src/tools/benchmark/**/BUILD This and further changes may contain minor modifications to BUILD files that don't serve any apparent purpose. The reason for these changes is that we're switching from checked-in BUILD... *** PiperOrigin-RevId: 163392962
* Disable desugaring try-with-resources when --min_sdk_version is above 18.Gravatar cnsun2017-07-28
| | | | | RELNOTES: None PiperOrigin-RevId: 163376758
* Include <cinttypes> instead of <stdint.h>Gravatar Damien Martin-Guillerez2017-07-27
| | | | | | | | | | | cinttypes is the C++ header that should replace stdint.h. Not using the correct header was leading to compilation error on CentOS 6.7 Fixes #3455. To be cherry-picked for #3375. Change-Id: I6df22134a4a4902ec9fa7ecdfaeb5408eacf3564 PiperOrigin-RevId: 163334651
* Fix NPE when passing null Location to XMLStreamException.Gravatar Googler2017-07-27
| | | | PiperOrigin-RevId: 163291269
* Resource filtering should preserve all matching artifacts, despite shared namesGravatar Googler2017-07-27
| | | | | | | | | | | | | | | | | | Before this change, density-based resource filtering tracked resources by qualifiers and name. Resources with density qualifiers specified would go into this code, but only one resource would be chosen from each each (qualifier, name) pair. Instead, track the resource using its entire path, this tracking resources with the same name seperately. Also, in case multiple resource are passed to the resource processing action, resource filtering only ignores a file if its name was in the list of resources to ignore *and* it does not exist. Otherwise, legitimate resources with the same name as a filtered resource might be ignored. RELNOTES: none PiperOrigin-RevId: 163235681
* Automated rollback of commit dc0d036b7dac011fc7aae9cbf2e4427d6d62d63a.Gravatar dmarting2017-07-26
| | | | | | | | | | | | | | | | | *** Reason for rollback *** Relies on https://github.com/bazelbuild/bazel/commit/ecd3ff16277729abb1baea66e51b3bd0835af01e, which removes src/tools/benchmark/BUILD file: see https://github.com/bazelbuild/bazel/commit/ecd3ff16277729abb1baea66e51b3bd0835af01e *** Original change description *** Auto-export src/tools/benchmark/**/BUILD This and further changes may contain minor modifications to BUILD files that don't serve any apparent purpose. The reason for these changes is that we're switching from checked-in BUILD files to generated BUILD files, and there may be small differences between these files. PiperOrigin-RevId: 163196332
* Auto-export src/tools/benchmark/**/BUILDGravatar ulfjack2017-07-26
| | | | | | | | | This and further changes may contain minor modifications to BUILD files that don't serve any apparent purpose. The reason for these changes is that we're switching from checked-in BUILD files to generated BUILD files, and there may be small differences between these files. PiperOrigin-RevId: 163185826
* BEP: add events about fetches to the streamGravatar Klaus Aehlig2017-07-26
| | | | | | | | | Fetching is an important action, if it happens, as external resources are accessed. Therefore, report this activity in the build event stream. Change-Id: Ia443fe01e6478016993231377d8f65c5d4634e00 PiperOrigin-RevId: 163184329
* Start generating BUILD files from internal BUILD filesGravatar ulfjack2017-07-26
| | | | | | | | | This and further changes may contain minor modifications to BUILD files that don't serve any apparent purpose. The reason for these changes is that we're switching from checked-in BUILD files to generated BUILD files, and there may be small differences between these files. PiperOrigin-RevId: 163062395
* Fix ScopedTemporaryDirectory causes crash when filesystem doesn't support xattr.Gravatar philwo2017-07-25
| | | | PiperOrigin-RevId: 163053841
* Remove generate_workspace from BazelGravatar kchodorow2017-07-25
| | | | | | | It now exists as a separate project at https://github.com/bazelbuild/migration-tooling. PiperOrigin-RevId: 162970509
* In UseBridge.class, check whether the owner of the method call instruction andGravatar cnsun2017-07-24
| | | | | | | | | | the owner of the method reference have assignable relation. If yes, use the bridge method. This CL addresses the integration problem between Desugar and the lambda factory of JDK 9. The change in JDK 9 is here,http://hg.openjdk.java.net/jdk9/dev/jdk/rev/a3b3c7b6464d. RELNOTES: None PiperOrigin-RevId: 162965244
* Stop reporting manifest merge errors as exceptions with stack traces as well ↵Gravatar apell2017-07-24
| | | | | | | as printing the merge error report. The stack traces duplicated the error report and gave the impression that the error may be an internal error instead of a build error. RELNOTES: None. PiperOrigin-RevId: 162755827
* Windows: Implement native binary launcherGravatar Yun Peng2017-07-24
| | | | | | | | The native launcher is implemented based on this design doc: https://docs.google.com/document/d/1z6Xv95CJYNYNYylcRklA6xBeesNLc54dqXfri0z0e14/edit?usp=sharing Change-Id: I83bae844f792a587ce0e342a3c0f238b760afeaa PiperOrigin-RevId: 162736269
* Fix #3416: catch the ALREADY_EXISTS status code on upload, and treat it as ↵Gravatar olaola2017-07-21
| | | | | | | | | success. This can happen per spec, if multiple builds try to upload the same blob concurrently. Also, added this to the RemoteWorker, per spec. PiperOrigin-RevId: 162647548
* Automated rollback of commit 01ddfb7bf418b371859de62f4eab2f41ea9a4a4a.Gravatar laszlocsomor2017-07-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a partial rollback. I restored the old flags (with PathListConverter), added the new ones, added deprecation warnings and annotations, and added code to concat the values of new and old. Existing released versions of Bazel should keep working with the new code until 2018-01-31, i.e. for the next ~6 months. After that I'll remove the old flags and the PathListConverter. *** Reason for rollback *** Fixed broken integration with release Blaze. *** Original change description *** Automated rollback of commit 5752463ece84ebb4fb074888cba57412ab8d86b3. *** Reason for rollback *** Broke too many targets. *** RELNOTES: none PiperOrigin-RevId: 162587548
* Make the @Option annotation depend on the java version of the tagging enums.Gravatar ccalvarin2017-07-18
| | | | | | | The option filters proto dependency can be removed from the OptionsParser. This is in response to option parser users that want to avoid the bazel-internal proto file in their dependencies. RELNOTES: None. PiperOrigin-RevId: 162249778
* Internal changeGravatar Googler2017-07-17
| | | | PiperOrigin-RevId: 162194755
* Silence useless netty warnings in the remote workerGravatar ulfjack2017-07-17
| | | | | | | | | | | | | | | | | | Otherwise it logs warnings that look like this: 170714 08:16:28.552:WT 18 [io.grpc.netty.NettyServerHandler.onStreamError] Stream Error io.netty.handler.codec.http2.Http2Exception$StreamException: Received DATA frame for an/ unknown stream 11369 As far as we can tell, these do not indicate any problem with the connection. We believe they happen when the local side closes a stream, but the remote side hasn't received that notification yet, so there may still be packets for that stream en-route to the local machine. The wording 'unknown stream' is misleading - the stream was previously known, but was recently closed. I'm told upstream discussed this, but didn't want to keep information about closed streams around. PiperOrigin-RevId: 162194736
* AndroidBusyBox: deprecate path-list-type flagsGravatar laszlocsomor2017-07-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit: - deprecates PathListConverter - removes ExistingPathListConverter because it was not used in production, only tests - deprecated List<Path> type flags that use PathListConverter - introduces new List<Path> type flags next to the deprecated ones that use @Options.allowMultiple and convert with PathConverter; the new and old lists are concatenated, yielding the flag value PathListConverter and all of its occurrences should be removed after 2018-01-31 (about 6 months from now, which is a safe enough timeframe for everyone to upgrade Bazel so it uses the new-style flags). Reason for deprecation is that colon-separated path lists don't work on Windows because paths have colons in them. Since the Android BusyBox is not intended to be executed by users but by Bazel only, there's no release notes necessary. See https://github.com/bazelbuild/bazel/issues/3264 RELNOTES: none PiperOrigin-RevId: 162193998
* Workaround for the Linux-induced race that causes ETXTBSYGravatar ulfjack2017-07-17
| | | | | | | | Retry execution when we think it's ETXTBSY. Fixed #3356. PiperOrigin-RevId: 161958095
* Fix the executorGravatar ulfjack2017-07-14
| | | | | | | It turns out that I didn't read the docs, and the previous settings resulted in a single-threaded executor. PiperOrigin-RevId: 161924238
* If globbing throws an IOException, fail to construct the package instead of ↵Gravatar janakr2017-07-14
| | | | | | | | constructing the package with an error. Prior to this change, if a Package.Builder object was constructed, it was guaranteed that a Package (possibly with errors) would be created. This is no longer true: if an IOException is set on the Package.Builder object, it will throw a NoSuchPackageException during #build(). PiperOrigin-RevId: 161832111
* Add flag to turn Android resource merge conflicts from warnings into errorsGravatar Googler2017-07-14
| | | | | RELNOTES: none PiperOrigin-RevId: 161831232
* Fix bug where merge conflicts for resources defined in XML with equal values ↵Gravatar Googler2017-07-13
| | | | | | | were being falsely logged during build as warnings RELNOTES: none PiperOrigin-RevId: 161723206
* Fixing the handling of retries for watch and execute calls.Gravatar olaola2017-07-13
| | | | | | TESTED=remote worker, triggered some errors RELNOTES: fixes #3305, helps #3356 PiperOrigin-RevId: 161722997
* remote: Rewrite ChunkerGravatar buchgr2017-07-12
| | | | | | | | | | | | | | | | | - Remove the Chunker.Builder and use the Chunker constructors instead. - Fix a correctness bug, where the chunker would ignore the return value of InputStream.read(byte[]). - Have Chunk.getData() return a ByteString as opposed to a byte[]. All callsides need ByteString objects and this change makes the subsequent change possible. - Have the Chunker use a preallocated byte[] in order to avoid allocating a new one on every call to next(). RELNOTES: None. PiperOrigin-RevId: 161637158
* Pass timeouts to the RemoteWorker.Gravatar olaola2017-07-12
| | | | PiperOrigin-RevId: 161582236
* Not log warnings when the RPC was cancelled.Gravatar olaola2017-07-12
| | | | | | RELNOTES: none TESTED=remote worker PiperOrigin-RevId: 161572597