aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/tools
Commit message (Collapse)AuthorAge
* Enable proto based resource shrinkingGravatar corysmith2018-08-15
| | | | | RELNOTES: None PiperOrigin-RevId: 208831294
* Optimize the shrinking pass to prevent timeouts.Gravatar corysmith2018-08-14
| | | | | RELNOTES: None PiperOrigin-RevId: 208666806
* Add test to ensure that the binary building pipeline works.Gravatar corysmith2018-08-14
| | | | | RELNOTES: None PiperOrigin-RevId: 208647642
* Automated rollback of commit 18e76da46b0c15d3309ac9d41f16fbd0468bc672.Gravatar Googler2018-08-13
| | | | | | | | | | | | | *** Reason for rollback *** Continuous build failure *** Original change description *** Enable proto based resource shrinking. RELNOTES: None PiperOrigin-RevId: 208572831
* Enable proto based resource shrinking.Gravatar corysmith2018-08-13
| | | | | RELNOTES: None PiperOrigin-RevId: 208532627
* Correctly manage the ProtoApk lifecycle by ensuring it is closed when finished.Gravatar corysmith2018-08-13
| | | | | | | | | Move finding used resources to ProtoResourceUsageAnalyzer for correctness and memory improvements. New report format: now records the kept resource along with the resource that keep it, as well maintaining the root status for each resource. Example line: {number/foo[isRoot: false] = 0x07f...} => [{array/foos[isRoot: true] = 0x...}...] RELNOTES: None PiperOrigin-RevId: 208529350
* Adding test for an instance of Style having both reference and item.Gravatar corysmith2018-08-13
| | | | | RELNOTES: None PiperOrigin-RevId: 208525880
* Changed all instances of /*itf=*/ to /*isInterface=*/ to eliminate errors.Gravatar Googler2018-08-13
| | | | | RELNOTES: None PiperOrigin-RevId: 208523963
* update data binding to 3.2.0 release (gradle)Gravatar Googler2018-08-10
| | | | | | | This CL updates the data binding to the latest public release. RELNOTES: update data binding to 3.2.0 PiperOrigin-RevId: 208267702
* Automated rollback of commit 29b57c3afcfeb8e3fedcc2edcb0f28f13c784179.Gravatar corysmith2018-08-10
| | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Rolling forward with assets being included after relinking. *** Original change description *** Automated rollback of commit bab4b04ad09a571615d04aacadf8b3a2b820ba5f. *** Reason for rollback *** Appears to cause issues with the new apk. *** Original change description *** Relink instead of convert proto apks. RELNOTES: None PiperOrigin-RevId: 208245517
* Java, runfiles: move runfiles library sourcesGravatar laszlocsomor2018-08-10
| | | | | | | | | | | | Move the Java runfiles library's sources from //src/tools/runfiles/j/c/g/devtools/build/runfiles:* to //tools/java/runfiles. Fixes https://github.com/bazelbuild/bazel/issues/5803 RELNOTES[NEW]: Java, runfiles: the Java runfiles library is now in @bazel_tools//tools/java/runfiles. The old target (@bazel_tools//tools/runfiles:java-runfiles) is deprecated and will be removed in Bazel 0.18.0. PiperOrigin-RevId: 208191521
* Windows, Bash launcher: Make sure bash bin tool directory is in PATHGravatar pcloudy2018-08-10
| | | | | | | | | | | If bash_bin_path exists, we add it's directory to PATH to make bash bin tools available. If bash_bin_path doesn't exist, there are two cases: 1. bash.exe is in PATH, and that means bash bin tools should also be in PATH. 2. bash.exe isn't in PATH, the launcher will fail with "The system cannot find the file specified." error. RELNOTES: None PiperOrigin-RevId: 208182717
* Java: add @bazel_tools//tools/java/runfilesGravatar Laszlo Csomor2018-08-09
| | | | | | | | | | | See https://github.com/bazelbuild/bazel/issues/5803 Change-Id: I49a2e744af667d34aedc3384629acd48641b0921 Closes #5804. Change-Id: I75f85f02384fd1d9f6ebac5fff7c96c7278f7cdd PiperOrigin-RevId: 208010815
* [singlejar] Port mapped_file for WindowsGravatar Loo Rong Jie2018-08-08
| | | | | | | | | | `src/tools/singlejar/mapped_file_*.inc` are now included in `src/tools/singlejar/mapped_file.cc` instead of header file and no longer inline most member functions: these functions are too large for inlining. /cc @laszlocsomor Closes #5780. PiperOrigin-RevId: 207998444
* [singlejar] Remove redundant test_util depsGravatar Loo Rong Jie2018-08-07
| | | | | | | | | | Side-note: `options_test`, `zip_headers_test` and `zlib_interface_test` now pass on Windows. /cc @laszlocsomor Closes #5781. PiperOrigin-RevId: 207699280
* [singlejar] Set binary flag for WindowsGravatar Loo Rong Jie2018-08-07
| | | | | | | | /cc @laszlocsomor Closes #5779. PiperOrigin-RevId: 207693540
* Automated rollback of commit bab4b04ad09a571615d04aacadf8b3a2b820ba5f.Gravatar corysmith2018-08-06
| | | | | | | | | | | | | *** Reason for rollback *** Appears to cause issues with the new apk. *** Original change description *** Relink instead of convert proto apks. RELNOTES: None PiperOrigin-RevId: 207590807
* Turn on proto based resource shrinking.Gravatar corysmith2018-08-06
| | | | | RELNOTES: None PiperOrigin-RevId: 207584302
* Relink instead of convert proto apks.Gravatar corysmith2018-08-06
| | | | | RELNOTES: None PiperOrigin-RevId: 207575371
* Added functionality to let the ResourceLinker link ProtoApks.Gravatar corysmith2018-08-06
| | | | | RELNOTES: None PiperOrigin-RevId: 207570745
* Allow a ProtoApk to write a manifest as xmlGravatar corysmith2018-08-06
| | | | | | RELNOTES: None PiperOrigin-RevId: 207548204
* Pass digest to Chunker construction when available.Gravatar tomlu2018-08-03
| | | | | | | | | * Refactor Chunker constructor to a builder to reduce constructor overload. * Pass digest into this where we have it * Redo ensureInputsPresent to not lose the missing digests during processing so we can pass them to the Chunker constructor. RELNOTES: None PiperOrigin-RevId: 207297915
* aapt2 creates larger apks when converting from proto.Gravatar corysmith2018-08-03
| | | | | | | Create binary directly then convert to proto format. RELNOTES: None PiperOrigin-RevId: 207273767
* Tool attribute processing added to resource shrinking.Gravatar corysmith2018-08-02
| | | | | RELNOTES: None PiperOrigin-RevId: 207171755
* Expose AndroidResourceUsageAnalyzer methods to enable proto-based resource ↵Gravatar corysmith2018-08-02
| | | | | | | shrinking without tool attributes. RELNOTES: PiperOrigin-RevId: 207132534
* Automatic code cleanup.Gravatar Googler2018-08-01
| | | | PiperOrigin-RevId: 206960449
* Parse raw xml resources for tools annotations.Gravatar corysmith2018-08-01
| | | | | RELNOTES: None PiperOrigin-RevId: 206960066
* Add the ability to do a filtered copy of a ProtoApkGravatar corysmith2018-08-01
| | | | | RELNOTES: None PiperOrigin-RevId: 206949407
* Add support for extracting references and declarations from a proto ↵Gravatar corysmith2018-08-01
| | | | | | | formatted apk RELNOTES: None PiperOrigin-RevId: 206945173
* Automated rollback of commit 0a635c5236ce30ea84b765ce752267992733a649.Gravatar corysmith2018-07-31
| | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Rolling forward with the correct attribute handling. *** Original change description *** Automated rollback of commit 8fe0f45852a620a078013310989396caed273342. *** Reason for rollback *** Breaks a couple of builds due to a bad merge. *** Original change description *** Add apk converted to proto and all attributes from CompiledResources to ResourcesZip. Add new proto format for tool attributes stored in the AndroidDataXml for storing them in the resources.zip. RELNOTES:None PiperOrigin-RevId: 206786645
* Automated rollback of commit 8fe0f45852a620a078013310989396caed273342.Gravatar corysmith2018-07-31
| | | | | | | | | | | | | | *** Reason for rollback *** Breaks a couple of builds due to a bad merge. *** Original change description *** Add apk converted to proto and all attributes from CompiledResources to ResourcesZip. Add new proto format for tool attributes stored in the AndroidDataXml for storing them in the resources.zip. RELNOTES:None PiperOrigin-RevId: 206774364
* Add apk converted to proto and all attributes from CompiledResources to ↵Gravatar corysmith2018-07-31
| | | | | | | | | ResourcesZip. Add new proto format for tool attributes stored in the AndroidDataXml for storing them in the resources.zip. RELNOTES:None PiperOrigin-RevId: 206765679
* Add profiling data to the resources zip.Gravatar corysmith2018-07-31
| | | | | RELNOTES:None PiperOrigin-RevId: 206762523
* Expanding execution log parser to filter by runner type.Gravatar Googler2018-07-30
| | | | | RELNOTES: Execution Log Parser can now, when printing it out, filter the log by runner type PiperOrigin-RevId: 206602183
* [singlejar] cleanup port libraryGravatar Loo Rong Jie2018-07-27
| | | | | | | | /cc @laszlocsomor Closes #5655. PiperOrigin-RevId: 206319221
* Remove Hazelcast dependencyGravatar Philipp Wollermann2018-07-25
| | | | | | | | | | The only remaining use was a testing REST backend in the LRE. I wrote a replacement for that using netty, which we use for our network stuff in Bazel, which means we can now get rid of Hazelcast. :) I'll remove the Hazelcast files in a separate change when this is merged. PiperOrigin-RevId: 205985996
* Windows,tests: port singlejar bash testsGravatar Loo Rong Jie2018-07-23
| | | | | | | | | | Make these tests run on Windows, but currently does not pass. /cc @laszlocsomor Closes #5652. PiperOrigin-RevId: 205658932
* Enable aapt2 for aar_import by adding the AndroidConfiguration fragment.Gravatar corysmith2018-07-18
| | | | | RELNOTES: Fixed compatibility with aar_import when using aapt2. AAPT2 is now supported for Android app builds without resource shrinking. To use it, pass the `--android_aapt=aapt2` flag or define android_binary.aapt_version=aapt2. PiperOrigin-RevId: 205136160
* [singlejar] Change off_t and ssize_t to C standard ptrdiff_tGravatar Loo Rong Jie2018-07-18
| | | | | | | | | | | | | | MSVC does not have `ssize_t` type. MSVC does have `off_t`, but is defined as 32-bit `long` due to legacy reason, this will prevent us from handling large file. Changing `off_t` and `ssize_t` to C standard `ptrdiff_t` for portability and consistency. Changing one instance of `S_ISDIR(st.st_mode)` to `(st.st_mode & S_IFDIR) == S_IFDIR` as MSVC does not have `S_ISDIR` macro. /cc @laszlocsomor Closes #5538. PiperOrigin-RevId: 205038203
* Make default method stubbing resilient to core library renaming, to preserve ↵Gravatar kmb2018-07-17
| | | | | | | | idempotency. RELNOTES: None. PiperOrigin-RevId: 204957400
* [singlejar] Add port library for various MSVC hacksGravatar Loo Rong Jie2018-07-17
| | | | | | | | | | | | A small `port` library with various MSVC hacks. This is needed for future PRs. For non-Windows platforms, `port.cc` will produce an empty object file. #2241 /cc @laszlocsomor Closes #5501. PiperOrigin-RevId: 204889516
* Drop module-info "class" in Android desugaringGravatar kmb2018-07-13
| | | | | | RELNOTES: None. PiperOrigin-RevId: 204492527
* Cleanup Optional usageGravatar corysmith2018-07-11
| | | | | RELNOTES:None PiperOrigin-RevId: 204170706
* [Skylint] Fix a crash on analyzing augmented assignment to IndexExpression.Gravatar Taras Tsugrii2018-07-11
| | | | | | | | | | | | | | | | | | Fixes #5534. Skylint was operating under assumption that all lvalues have a single bound identifier, which is not true for `IndexExpression`s like ``` d["foo"] += "bar" ``` As a result, Skylint would crash. This change makes it handle cases without bound identifiers gracefully. Ideally `IndexExpression` assigments should be analyzed too, but it's a more involved change. Closes #5535. PiperOrigin-RevId: 204109060
* [singlejar] Various portability fixes for MSVCGravatar Loo Rong Jie2018-07-10
| | | | | | | | | | | | | | | - MSVC does not have `errx` functions, so use `diag_errx` etc. instead. - Fix format when trying to print `size_t`, use `%zu` so that the function will handle 32/64-bit `size_t` according to target system automatically. - Adding/guarding a few includes for MSVC. - MSVC does not have `ssize_t`, so replace it with `ptrdiff_t` #2241 /cc @laszlocsomor Closes #5499. PiperOrigin-RevId: 204074420
* Synchronize on process factory to inhibit ETXTBSYGravatar George Gensure2018-07-10
| | | | | | | | | | | | | | | | | | | | | | | | | | Refocus synchronization mechanism to cope with file descriptor set fork- induced races to more tightly constrain concurrent fork/exec pairs. This problem has been observed in bazel proper repeatedly, exhibiting as the iconic ETXTBSY - Text file busy in wide worker pool builds and tests. Evidence that this was discovered by @buchgr is in the comment and change to the embedded ExecutionService implementation, and the description of the race and the need for the synchronization was lifted from that scope to the JavaSubprocessFactory. This factory is a singleton and represents the gateway to all worker process execution, and serves as the correct lock primitive to ensure that file descriptor sets are not duplicated across forks, which gave rise to this issue. To test this, I demonstrated a reproducer presented at https://bugs.java.com/view_bug.do?bug_id=8068370 with 2.4% of invocations in that pathological case exhibiting the issue. With a functionally equivalent change - synchronizing around a processBuilder.start() call - as the only modification to the reproducer, no further failures of any kind were observed, over several hundred runs. Closes #5556. PiperOrigin-RevId: 203947224
* Bazel server, tools: ensure Readers are closedGravatar laszlocsomor2018-07-09
| | | | | | | | | | | | | | | | | | | | Follow-up to commit 59f17d6e0550bf63a0b6ef182e2d63474e058ede. Use try-with-resources to ensure Reader objects are closed eagerly. Eagerly closing Readers avoids hanging on to file handles until the garbage collector finalizes the object, meaning Bazel on Windows (and other processes) can delete or mutate these files. Hopefully this avoids intermittent file deletion errors that sometimes occur on Windows. See https://github.com/bazelbuild/bazel/issues/5512 RELNOTES: none PiperOrigin-RevId: 203771262
* Windows,JNI: more robust nativeCreateJunctionGravatar Laszlo Csomor2018-07-09
| | | | | | | | | | | | | | | | | | | | | | | | Rewrite the CreateJunction function in the Windows JNI library. The new implementation's improvements: - succeeds if the junction already exists with the desired target; hopefully this will fix issue https://github.com/bazelbuild/bazel/issues/5433 - tolerant to concurrent filesystem modifications, e.g. if the junction's path suddenly disappears, the function reports the error correctly Fixes https://github.com/bazelbuild/bazel/issues/5433 Change-Id: I58a2314a00f6edaa7c36c35ba54616168b44eb7d Closes #5528. Change-Id: I9f5dc9237b70a433d0d8c2578a826de3d462d110 PiperOrigin-RevId: 203744515
* windows,launcher: Rlocation function now handles absolute paths correctlyGravatar pcloudy2018-07-06
| | | | | | | Fix https://github.com/bazelbuild/bazel/issues/5516 RELNOTES: None PiperOrigin-RevId: 203448188
* Bazel server: ensure OutputStreams are closedGravatar laszlocsomor2018-07-05
| | | | | | | | | | | | | | | | | | | Use try-with-resources to ensure OutputStreams that we open via FileSystem.OutputStream(path) are closed. Eagerly closing OutputStreams avoids hanging on to file handles until the garbage collector finalizes the OutputStream, meaning Bazel on Windows (and other processes) can delete or mutate these files. Hopefully this avoids intermittent file deletion errors that sometimes occur on Windows. See https://github.com/bazelbuild/bazel/issues/5512 RELNOTES: none PiperOrigin-RevId: 203342889