aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/tools
Commit message (Collapse)AuthorAge
* 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
* Fold OptionUsageRestrictions into OptionDocumentationCategory and ↵Gravatar ccalvarin2017-07-11
| | | | | | | | | | OptionMetadataTags. These are similar, no need to have both fields. Removing the "DOCUMENTED" default, the absence of UNDOCUMENTED will be used instead. Since requiring a documentation category for undocumented options doesn't make sense, list that as one of the OptionDocumentationCategories, but list HIDDEN and INTERNAL as part of OptionMetadata. These options should list UNDOCUMENTED as their category. PiperOrigin-RevId: 161515674
* Make the number of jobs in the worker configurable via an optionGravatar ulfjack2017-07-11
| | | | PiperOrigin-RevId: 161505952
* AndroidResourceOutputs: fix ZipEntry pathsGravatar Laszlo Csomor2017-07-11
| | | | | | | | | | Make sure that ZipEntry paths always use forward slashes, even on Windows. Also add a test. See https://github.com/bazelbuild/bazel/issues/3264 Change-Id: I4508e46dde49cd44c8e3792017d0d280a51dc565 PiperOrigin-RevId: 161500049
* Android BusyBox: use the JunctionCreatorGravatar Laszlo Csomor2017-07-11
| | | | | | | | | | | | | | | | | | | Use the recently added JunctionCreator class in the Android BusyBox. Query the current OS's name, where the BusyBox process runs (using System.getProperty("os.name")) and instantiate the corresponding JunctionCreator implementation. This allows the BusyBox to work around path length limitations on Windows; see WindowsJunctionCreator. See https://github.com/bazelbuild/bazel/issues/3264 Change-Id: Ifc1a3c86971e64c2f42bcec2988b7e9239a1d29a PiperOrigin-RevId: 161494557
* Windows, Android BusyBox: create JunctionCreatorGravatar Laszlo Csomor2017-07-10
| | | | | | | | | | | Introduce the JunctionCreator classes that the Android BusyBox can use to work around path length limitations on Windows. See https://github.com/bazelbuild/bazel/issues/3264 Change-Id: Ia5ee39f0635dcc2690ffb1755dc56d21e7bc7536 PiperOrigin-RevId: 161378422
* Android: fix path bugs and enable tests on WindowsGravatar Laszlo Csomor2017-07-10
| | | | | | | | | | | | | | Now all tests under //src/test/j/c/g/devtools/build/android/...:* pass on Windows, yay! Also adjust test sizes as advised by Bazel (using --test_verbose_timeout_warnings). See https://github.com/bazelbuild/bazel/issues/3264 Change-Id: I3f1f4978306bdedaf805149295daa413d2248fbb PiperOrigin-RevId: 161373699
* Remove an unused constructorGravatar cushon2017-07-07
| | | | PiperOrigin-RevId: 161125326
* Rewrite the watcher / execution servers to use a thread-pool for executionGravatar ulfjack2017-07-06
| | | | | | | Also change them to use ListenableFuture, so multiple watchers can watch the same action execution. PiperOrigin-RevId: 160989277
* Rewrite blob upload to use temporary filesGravatar ulfjack2017-07-06
| | | | | | | | | | | | | | Previously, it was allocating in-memory buffers for upload, which caused it to run out of memory on large file uploads (or on many small uploads running simultaneously). Unfortunately, we don't create the temporary file in the right location (due to separation of the BlobStore from the ByteStreamServer), so we copy the file again to write it to the OnDiskBlobStore, which isn't ideal. There'll need to be another BlobStore API change to make that work, when the InMemoryBlobStore is gone. PiperOrigin-RevId: 160974550
* fix singlejar signedness problemsGravatar Benjamin Peterson2017-07-05
| | | | | | | | | | | | while (total_written < count) { ~~~~~~~~~~~~~~^~~~~~~ Most of these can be fixed by simply by storing the return value of various functions in the right variable type. E.g., cen_offset32 can naturally be stored in uin32_t rather than uint64_t. Change-Id: I9f188ca541e4fe2587c636670807f56887e1655e PiperOrigin-RevId: 160897953
* Add an on-disk storage option for the remote workerGravatar ulfjack2017-07-05
| | | | | | | | | | I'm planning to switch the remote worker over to the on-disk storage system, and delete the in-memory option. Currently, running a Bazel build with the in-memory storage system uses up over 50% of the total available memory on my machine (I only have 32 GB total), and grinds it to a complete halt (unless I close most of my apps) on a simple build of //src:bazel. PiperOrigin-RevId: 160877546
* Move the SimpleBlobStore and implementations to a subpackageGravatar ulfjack2017-07-05
| | | | | | | | | | Also extend the API to throw exceptions rather than having to wrap or swallow. This is in preparation for adding yet another implementation using an on-disk cache. Having the RemoteWorker keep everything in memory is not good for my sanity. PiperOrigin-RevId: 160871586
* Identify which methods are used in invokedynamic, and only desugar theseGravatar cnsun2017-07-03
| | | | | | | methods. RELNOTES: None PiperOrigin-RevId: 160663025
* Windows, Android: ScopedTemporaryDirectory bugfixGravatar Laszlo Csomor2017-07-03
| | | | | | | | | | | | ScopedTemporaryDirectory now makes all files writable before attempting to delete them. This is important on Windows where readonly files cannot be deleted, the attempt resulting in an exception. See https://github.com/bazelbuild/bazel/issues/3264 Change-Id: If79478a4b419c05d77ce89cc30cb701d42df1b75 PiperOrigin-RevId: 160644599
* Enforce the new category and effect tags.Gravatar ccalvarin2017-07-03
| | | | | | | | | | All options need to explicitly list their category and effect. If they are uncategorized, this makes the lack of information obvious. Remove defaults from the annotation to enforce this. Also enforce the sanity check that no option should have UNKNOWN or NO_OP effects listed with other effect tags. Includes some last default sets for options I missed in the previous mass-setting change, and some that were added since. PiperOrigin-RevId: 160641861
* Implement retry logic for the gRPC calls in remote execution and caching. TheGravatar olaola2017-06-30
| | | | | | | | retry strategy may need tuning. Other behavior changes: swallowing gRPC CANCELLED errors when the thread is interrupted, as these are expected and just make debugging difficult. Also, distinguishing between the gRPC DEADLINE_EXCEEDED caused by the actual command timing out on the server vs. other causes (the former should not be retriable, while the latter should retry). TESTED=unit tests, remote worker on Bazel PiperOrigin-RevId: 160605830
* Slight refactoring, functional noop: uploadChunks will need to get a ↵Gravatar olaola2017-06-30
| | | | | | | Chunker.Builder in my next change, so all the from factory methods are removed. TESTED=unit test PiperOrigin-RevId: 160594730
* Add the rest of the categories transition values to android options.Gravatar ccalvarin2017-06-30
| | | | | | Automated formatting fixes standardize the @Option annotation. PiperOrigin-RevId: 160582653
* Flip the flag --rewrite_calls_to_long_compare to false by default. NowGravatar cnsun2017-06-30
| | | | | | | | desugaring Long.compare(long, long) is only enabled if either --min_sdk_version < 19 or --rewrite_calls_to_long_compare is specified. RELNOTES: set --rewrite_calls_to_long_compare to false by default. PiperOrigin-RevId: 160578028
* Add categories transition values to android options.Gravatar ccalvarin2017-06-30
| | | | | | Automated formatting fixes standardize the @Option annotation. PiperOrigin-RevId: 160567787