aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/tools
Commit message (Collapse)AuthorAge
* Automated g4 rollback of commit 5c2dc673a3ad2aa52f25c6f7d767671ba3e9b02c.Gravatar corysmith2017-06-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Appears that the generated R classes are not correct, causing test failures. *** Original change description *** Automated g4 rollback of commit 1be84ee92a825694b0c0026ac77134f8a084bd9c. *** Reason for rollback *** Rolling forward with the generated resources directory being created for tests without resources. *** Original change description *** Automated g4 rollback of commit d028d7854d3e95d97143945a1ec32944e5e4594b. *** Reason for rollback *** Breaks 1000+ targets in the depot: [] *** Original change description *** Generate pre-reconciled ids R classes for dependen... *** RELNOTES: None PiperOrigin-RevId: 159032530
* Switching to Watcher API instead of wait_for_completion, in preparation forGravatar olaola2017-06-14
| | | | | | | | | deprecating the wait_for_completion field. Note on errors: in the RemoteWorker, I currently handle all errors as onError of the watch call. Other options are: pass them as the operation error field, and pass some of them as the onError of the execute call. For now, I'm just using the simplest option; the Bazel client is ready to handle all possible options. RELNOTES: none PiperOrigin-RevId: 158974207
* Automated g4 rollback of commit 1be84ee92a825694b0c0026ac77134f8a084bd9c.Gravatar corysmith2017-06-13
| | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Rolling forward with the generated resources directory being created for tests without resources. *** Original change description *** Automated g4 rollback of commit d028d7854d3e95d97143945a1ec32944e5e4594b. *** Reason for rollback *** Breaks 1000+ targets in the depot: [] *** Original change description *** Generate pre-reconciled ids R classes for dependency libraries with resources in the transitive closure of robolectric tests. RELNOTES: None PiperOrigin-RevId: 158756991
* Extract FieldInfo as a top-level class. In the following CL, I will use thisGravatar cnsun2017-06-12
| | | | | | | class in DefaultMethodClassFixer to fix the bug b/38255926 RELNOTES: n/a PiperOrigin-RevId: 158561127
* Make singlejar aware of FreeBSDGravatar Klaus Aehlig2017-06-09
| | | | | | | | | | | | | The C implementation of singlejar verifies that it is built for a supported system; currently those are 64-bit linux and apple systems. However, the code is portable enough that it can easily be adapted to run on 64-bit FreeBSD systems as well. In fact, only the path of a single header file is different, and we need to link with -lm. Fixes #3096. Change-Id: Id69542ad940f1161aceb55eb8f5dabda2f486747 PiperOrigin-RevId: 158533955
* Switching Bazel to use the new remote execution API: ↵Gravatar olaola2017-06-09
| | | | | | | | | https://docs.google.com/document/d/1AaGk7fOPByEvpAbqeXIyE8HX_A3_axxNnvroblTZ_6s/edit Also refactored away the various *Interface* files, no need since unit testing can be done with mocking the appropriate gRPC Impl classes directly (see tests). This also fixes the RemoteSpawnRunner, which should use different objects for remote caching and remote execution, the same way RemoteSpawnStrategy does. RELNOTES: n/a PiperOrigin-RevId: 158473700
* Erase <clinit> of interfaces to prevent <clinit> from execution during desugar.Gravatar cnsun2017-06-08
| | | | | | | For all declared non-premitive fields, this CL sets each one to null. RELNOTES: n/na PiperOrigin-RevId: 158305638
* Move bridge methods for default methods down to the implementing classes.Gravatar cnsun2017-06-07
| | | | | RELNOTES: n/na PiperOrigin-RevId: 158162658
* Automated g4 rollback of commit d028d7854d3e95d97143945a1ec32944e5e4594b.Gravatar lpino2017-06-07
| | | | | | | | | | | | | | *** Reason for rollback *** Breaks 1000+ targets in the depot: [] *** Original change description *** Generate pre-reconciled ids R classes for dependency libraries with resources in the transitive closure of robolectric tests. RELNOTES: None PiperOrigin-RevId: 158159550
* protobuf: Use bazel's native java_proto_library rules.Gravatar Jakob Buchgraber2017-06-06
| | | | | | | | | Additional changes: - Introduce a Skylark macro java_library_srcs that provides the source jars of a java_*_library rule. - Remove bazel's own java_proto_library implementation. Change-Id: I18f2259bc75ca0fb32dcd8a6a857c609bd2c7773 PiperOrigin-RevId: 158146210
* Improve the error message when Desugar fails to load a class from theGravatar cnsun2017-06-05
| | | | | | | classpath. Now it prints the name of the class that is under desugaring. RELNOTES: n/a PiperOrigin-RevId: 157889131
* Generate pre-reconciled ids R classes for dependency libraries with resourcesGravatar corysmith2017-06-02
| | | | | | | in the transitive closure of robolectric tests. RELNOTES: None PiperOrigin-RevId: 157762190
* Simplify the remote workerGravatar ulfjack2017-05-31
| | | | | | | | | | | | - Reduce scope of try-catch blocks - Handle non-zero exit the same as zero exit - Basic infrastructure to handle time outs, currently hard-coded to 15 mins Some of this code is copied from LocalSpawnRunner. Ideally, we'd reuse that implementation instead of writing yet another one, but that will have to wait for some more refactoring. PiperOrigin-RevId: 157506934
* Enable desugaring try-with-resources by default.Gravatar cnsun2017-05-31
| | | | | RELNOTES: none PiperOrigin-RevId: 157490771
* Remote tests should not depend on lib:runtimeGravatar buchgr2017-05-31
| | | | | | | | Move AuthAndTLSOptions to its own package, so that tests/remote no longer depends on lib:runtime. RELNOTES: None. PiperOrigin-RevId: 157469629
* Migrate Java tests to Truth.Gravatar lberki2017-05-30
| | | | | | RELNOTES: None. PiperOrigin-RevId: 157446717
* Remote worker: skip non-existent files after action executionGravatar ulfjack2017-05-30
| | | | | | | | | | | | | | | | | Tests basically always finish with non-existent files, and this is not an error on the server side. Instead, the client (Bazel) checks whether all the files it expects are present. The test didn't catch this because it was silently falling back to local execution. Non-existent files were leading to an IOException, which caused the remote worker to log nothing, and silently return an error with no output. Log errors in the remote worker to make future debugging easier. Fixes #2887. PiperOrigin-RevId: 157400131
* For static interface method, when we move it to the companion class,Gravatar cnsun2017-05-26
| | | | | | | | append a suffix to the method name, so as to avoid name clash in the companion class. RELNOTES: n/a PiperOrigin-RevId: 157021961
* Fix bug with combining resource attributes. Attributes were reporting that ↵Gravatar apell2017-05-26
| | | | | | | they were over-writable in all cases instead of differentiating by attribute type. RELNOTES: None. PiperOrigin-RevId: 156999284
* Add a new action for generating reconciled R classes for Robolectric.Gravatar corysmith2017-05-23
| | | | | | | | | This includes some refactoring: * Move the symbol deserialization our of the merger and into the ParsedAndroidData (probably move again.) * Change the FailedFutureAggregator generics to work more callables RELNOTES: None PiperOrigin-RevId: 156863698
* Make Desugar work for relative dumpDirectory paths.Gravatar Googler2017-05-23
| | | | | | | | | | | | | Before CL 155913466, Desugar was not working when dumpDirectory was a relative path because of an extra/incorrect resolve() that ended up duplicating such a relative path. CL 155913466 fixed this by converting Desugar's dumpDirectory to an absolute path. However, CL 156257767 introduced a check that Desugar's dumpDirectory must match the one in Java's InnerClassLambdaMetafactory, which broke the case of a relative path again. Therefore, this CL undoes the conversion to absolute path again (so that Desugar's path matches that in InnerClassLambdaMetafactory). Instead, to make relative paths work, it drops the unnecessary/incorrect call to resolve(). A regression test is left for a future CL (I don't have a dev environment set up that would allow me to easily write one). RELNOTES: None. PiperOrigin-RevId: 156852882
* Make checking of lambda dump directory accept relative path.Gravatar cnsun2017-05-23
| | | | | | | | | | | | | | Before, we use Path.equals(Object), which will fail if we use relative path in the system property. Now I use Files.isSameFile which will check two paths point to the same file system resource. In https://github.com/bazelbuild/bazel/commit/69e855c7b0f0f7899a69a882cba0abd304233c97, I introduce the check to test whether setting the system property for lambda meta factory succeeds. However, the check does not consider relative path, which will always fail. RELNOTES: n/a PiperOrigin-RevId: 156796457
* Move the field name out of the FieldInitializerGravatar corysmith2017-05-23
| | | | | RELNOTES: None PiperOrigin-RevId: 156747534
* Keep annotations of default methods in interfaces during desugaring.Gravatar cnsun2017-05-22
| | | | | RELNOTES: n/a PiperOrigin-RevId: 156582965
* Remote+BES: Stabilize command line flags.Gravatar buchgr2017-05-22
| | | | | | | | | | | | | | | | | | | | Update the command line flags used by remote execution/caching as well as the build event service (BES). Major changes: - Remote execution/caching and BES share flags for authentication and TLS. - Removed API Key authentication from BES, as it's not being used. - Add TLS support to BES upload. - Add --bes_project_id flag. If set, the value is propagated as part of BES lifecycle events. For reviewers: Start your review at CommonRemoteAndBesOptions, BuildEventServiceOptions and RemoteOptions. The other changes are mostly automatic IDE renames of fields and flag updates in shell script tests. RELNOTES: None. PiperOrigin-RevId: 156553857
* Expose the target map from Package.Gravatar carmi2017-05-19
| | | | | | | | This doesn't really expose new information, because one can iterate over the existing getTargets() and recreate the map. Moreover, the map is immutable, so there's no risk in returning it to the user. RELNOTES: None PiperOrigin-RevId: 156349797
* Remove the RTxtSymbolEntry in favor of the FieldInitializer class.Gravatar corysmith2017-05-19
| | | | | RELNOTES: None PiperOrigin-RevId: 156321468
* Improve diagnostics. Report an error when we fail to register the lambda dumpGravatar cnsun2017-05-17
| | | | | | | | | | directory. This is achieved by checking InnerClassLambdaMetafactory.dumper's dumpDir. Also, if a user provides a dump folder, we verify whether the folder is empty. RELNOTES: n/a PiperOrigin-RevId: 156257767
* Use one writer for generating R.java source filesGravatar corysmith2017-05-17
| | | | | RELNOTES: None PiperOrigin-RevId: 156205544
* Refine assertion by providing more information. When the given path is NOT aGravatar cnsun2017-05-17
| | | | | | | directory, output its path. RELNOTES: n/a PiperOrigin-RevId: 156187835
* Further Refactoring/Yak ShavingGravatar corysmith2017-05-15
| | | | | | | | | * Extract the FieldInitializer with placeholder ids from the AndroidResourceClassWriter * Extract a resource sink interface from the AndroidResourceClassWriter (a little renaming, the change isn't actually that big.) RELNOTES: None PiperOrigin-RevId: 156053478
* Fix Desugar duplicating path for dumped classes.Gravatar Googler2017-05-15
| | | | | | | | | When dumpDirectory (jdk.internal.lambda.dumpProxyClasses) is a relative path, Desugar was duplicating that path because it was resolving lambdaClass.getKey() (which contained already the the dumpDirectory path). Fixed by ensuring dumpDirectory is always an absolute path. RELNOTES: n/a PiperOrigin-RevId: 155913466
* Remove strict_proto_deps from :serialize_format_proto.Gravatar carmi2017-05-15
| | | | | | | This should be a no-op because that proto has no deps. RELNOTES: None PiperOrigin-RevId: 155888238
* Optimize the runtime library for try-with-resources, by reducing theGravatar cnsun2017-05-11
| | | | | | | | granularity of locks. Now it uses a customized concurrent weak identity hash map. RELNOTES: n/a PiperOrigin-RevId: 155688279
* Set the correct main class on the desugar java_binary target in Bazel.Gravatar ajmichael2017-05-10
| | | | | | | | | | | | | | | | | | This will make it easier to build the desugarer tool from the Bazel source tree as an executable (deploy) jar and then use it for something else. For example, with this CL, you can do the following steps to get a standalone desugarer binary: 1. git clone https://github.com/bazelbuild/bazel 2. bazel build //src/tools/android/java/com/google/devtools/build/android/desugar:desugar_bin_deploy.jar 3. cp bazel-bin/src/tools/android/java/com/google/devtools/build/android/desugar/desugar_bin_deploy.jar ~/bin/desugar.jar And then you can invoke desugar without bazel with `java -jar ~/bin/desugar.jar`. https://github.com/bazelbuild/bazel/issues/2975 RELNOTES: None PiperOrigin-RevId: 155629711
* Define __STDC_FORMAT_MACROS to 1 in singlejarGravatar Damien Martin-Guillerez2017-05-08
| | | | | | | Build on CentOS was failing because of missing macros, see http://ci.bazel.io/job/bazel-docker-tests/BAZEL_VERSION=HEAD,PLATFORM_NAME=docker/557/console. Change-Id: I1b7b2ef2b1f26d4dac5439f4fcd01e2ef6553dcf PiperOrigin-RevId: 155365288
* fix issue with interfaces redefining (overriding) inherited default methodsGravatar kmb2017-05-08
| | | | | | RELNOTES: none PiperOrigin-RevId: 155293316
* Remove some more usages of res2.MergingException and open source some tests.Gravatar ajmichael2017-05-05
| | | | | | | Since https://github.com/bazelbuild/bazel/issues/2709 was fixed, this CL also enables ParsedAndroidDataTest. RELNOTES: None PiperOrigin-RevId: 155155095
* Remove MergingExceptionGravatar corysmith2017-05-04
| | | | | | | Fixes https://github.com/bazelbuild/bazel/issues/2709 RELNOTES: None. PiperOrigin-RevId: 155097576
* Remove java8 code from ResourceSymbols.java.Gravatar ajmichael2017-05-04
| | | | | RELNOTES: None PiperOrigin-RevId: 155005554
* * Fork the deprecated SymbolLoader/SymbolWriter code from ↵Gravatar corysmith2017-05-04
| | | | | | | | | com.android.builder.internal * Fixed formatting. RELNOTES: None PiperOrigin-RevId: 154973113
* Use ASM to collection exception types, so that we can avoid using class loadersGravatar cnsun2017-05-04
| | | | | | | to resolve classes hierarchy to determine whether a type is an exception type. RELNOTES:n/a PiperOrigin-RevId: 154971455
* Option for try-with-resources runtime classesGravatar Googler2017-05-03
| | | | | | | | | Add flag to disable output of the runtime classes necessary to support the try-with-resources feature on older devices. RELNOTES: n/a PiperOrigin-RevId: 154933632
* Bug fix. Enable Desugar to desugar try-with-resources multiple times.Gravatar cnsun2017-04-30
| | | | | RELNOTES: n/a PiperOrigin-RevId: 154594200
* Don't clean-up externally set dump dirGravatar Googler2017-04-30
| | | | | | | | | If the lambda dump dir has been set externally, its content will not be removed after Desugar ends. RELNOTES: n/a PiperOrigin-RevId: 154554712
* Don't copy lambda bodies from interfaces into implementing classes.Gravatar kmb2017-04-28
| | | | | | RELNOTES: none PiperOrigin-RevId: 154452158
* Use system property for lambda dir if setGravatar Googler2017-04-28
| | | | | | | | | | If system property that triggers writing lambda classes is already set, use that value for the lambda dump directory path. Otherwise, generate a temporary dir path, and set it. RELNOTES: n/a PiperOrigin-RevId: 154440327
* Desugar try-with-resources statements for Android. Any call toGravatar cnsun2017-04-27
| | | | | | | | | | | | | | Throwable.addSuppressed(Throwable), getSuppressed(), printStackTrace() printStackTrace(PrintStream), printStackTrace(PrintWriter) is directed to the ThrowableExtension class. At runtime, ThrowableExtension will determine the best behavior for try-with-resources. If the device has API level >= 19, the device's Thowable will be used. Otherwise, this class will mimic the behavior. RELNOTES: Desugar try-with-resources so that this language feature is available to deveces with API level under 19. PiperOrigin-RevId: 154386342
* Make companion classes public when desugaring default methods for androidGravatar kmb2017-04-27
| | | | | | RELNOTES: none PiperOrigin-RevId: 154362579
* Desugar default and static interface methods by default.Gravatar kmb2017-04-27
| | | | | | RELNOTES: none PiperOrigin-RevId: 154344780