aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/java_tools
Commit message (Collapse)AuthorAge
* 1) Fixes a bug in the checking of missing members. Before, MemberInfo containsGravatar cnsun2018-03-19
| | | | | | | | | | | both the owner and the name. However, this is wrong, as the field reference or method call may reference the same member with a different owner (e.g., subclass). 2) The type in ASM may refer to internal names, but also may refer to array descriptor. And arrays have methods such as clone(). Before, I just assume that a type can only be internal names. RELNOTES: None. PiperOrigin-RevId: 189630806
* Automated rollback of commit 2ee6dd262bcf5fd890e24d5f185616b8ab259608.Gravatar philwo2018-03-19
| | | | | | | | | | | | | | | | | *** Reason for rollback *** Rollforward as requested by the original author @hmemcpy. *** Original change description *** Skipping writing FILTERED tests to test.xml This fixes #3201 by preventing tests that haven't actually run to be written to the test.xml. This is consistent with how e.g. surefire reports work, tests that were filtered out do not appear in the xml. This allows changing the Bazel plugin in such a way that does not depend on `time` being 0.0. Closes #4596. PiperOrigin-RevId: 189610180
* Clean up after b/72379900Gravatar cushon2018-03-16
| | | | PiperOrigin-RevId: 189380767
* Clean up whitespace in add_dep messagesGravatar cushon2018-03-15
| | | | PiperOrigin-RevId: 189225279
* Emit SJD errors even if we don't know the label of a dependencyGravatar cushon2018-03-14
| | | | | | Fixes bazelbuild/bazel#4846 PiperOrigin-RevId: 189123353
* Allow @Ignore on junit test classesGravatar Stephen Amar2018-03-13
| | | | | | | | | | | | | | | | | | | | | | | | Currently a test class annotated with `@Ignore` will cause the test runner to fail with ``` Exception in thread "main" java.lang.IllegalArgumentException: Top test must be a suite at com.google.testing.junit.runner.junit4.JUnit4TestModelBuilder.get(JUnit4TestModelBuilder.java:53) ``` This change treats classes with no tests (either no @Test annotations or @Ignore at class level) as an empty test suite. The main motivation behind this is allowing an entire test class to be ignored (e.g. to quickly deal with a flaky test) without having to modify the BUILD file. This is desirable in order to reduce the likelihood that a developer forgets to update the BUILD file when removing the `@Ignore` annotation. This pull request overrides the previous pull request https://github.com/bazelbuild/bazel/pull/4073 Closes #4293. PiperOrigin-RevId: 188850828
* Fix javac-turbine diagnostic formatting to include source positionGravatar cushon2018-03-12
| | | | PiperOrigin-RevId: 188799934
* Automated rollback of commit 3edf41b70de9bb1a8702d0342beeb2ad13898d71.Gravatar philwo2018-03-09
| | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Rollback was requested by original authors @hmemcpy and @ittaiz in #3201: "We found a problem with this patch... seems that tests that are added dynamically by the test runner (in our case, specs2 'examples' that are generated with Fragments.foreach) do not appear in the xml!" This should be part of 0.12.0-rc1, otherwise that release will have the above mentioned regression. *** Original change description *** Skipping writing FILTERED tests to test.xml This fixes #3201 by preventing tests that haven't actually run to be written to the test.xml. This is consistent with how e.g. surefire reports work, tests that were filtered out do not appear in the xml. This allows changing the Bazel plugin in such a way that does not depend on `time` being 0.0. Closes #4596. PiperOrigin-RevId: 188455315
* Add a flag to control whether to treat missing dependencies as errors orGravatar cnsun2018-03-08
| | | | | | | warnings (--emit_errors or --noemit_errors). RELNOTES:None. PiperOrigin-RevId: 188397338
* Allow --classpath_entry to be empy.Gravatar cnsun2018-03-02
| | | | | | RELNOTES:None. PiperOrigin-RevId: 187711775
* Delete F5 JarDexer.Gravatar Googler2018-03-02
| | | | | | | | The only two remaining users are for JAR, so directly call into BazelJavaBuilder rather than through our multiplex tool. This requires opening the visibility of BazelJavaBuilder up to public. PiperOrigin-RevId: 187690855
* Improve error message of import_deps_checker.Gravatar cnsun2018-03-01
| | | | | RELNOTES: None. PiperOrigin-RevId: 187571707
* Change the strict deps plugin to read jar owner from manifest.Gravatar tomlu2018-02-28
| | | | | | | | | | | | | | | | | The plugin tries to read the following attributes: Target-Label: <label> Injecting-Rule-Kind: <rule kind> These are used instead of the jar owners passed to JavaBuilder from blaze. Any owners currently passed from blaze are now ignored. This CL also half-reverts the command line syntax for JavaBuilder and Turbine. It is now: --classpath <jar1> <jar2> ... --direct_dependencies <jar1> ... RELNOTES: None PiperOrigin-RevId: 187419469
* Remove support for --rule_kindGravatar cushon2018-02-22
| | | | | | now that Bazel no longer passes it. PiperOrigin-RevId: 186708415
* Automated rollback of commit 11cc89a27544311111473dc7a17522635c2b6e70.Gravatar eaftan2018-02-21
| | | | | | | | | | | | | | *** Reason for rollback *** Superceded by https://github.com/bazelbuild/bazel/commit/e734c479956df7a675c61f531d769609d3af3e5d *** Original change description *** JavaBuilder accepts a new --testonly argument to mark compilations of test code. Error Prone will use these to distinguish between test and production code, e.g. for enforcing @VisibleForTesting. PiperOrigin-RevId: 186520809
* Add --experimental_fix_deps_tool to JavaBuilderGravatar Googler2018-02-21
| | | | | RELNOTES: None PiperOrigin-RevId: 186494122
* Expose import-deps-checker to //tools/android so that AarImport can use it.Gravatar cnsun2018-02-16
| | | | | RELNOTES:n/a. PiperOrigin-RevId: 186043433
* Rewrite visibility handling for all java_toolsGravatar ulfjack2018-02-16
| | | | PiperOrigin-RevId: 185959149
* Skipping writing FILTERED tests to test.xmlGravatar Igal Tabachnik2018-02-15
| | | | | | | | | This fixes #3201 by preventing tests that haven't actually run to be written to the test.xml. This is consistent with how e.g. surefire reports work, tests that were filtered out do not appear in the xml. This allows changing the Bazel plugin in such a way that does not depend on `time` being 0.0. Closes #4596. PiperOrigin-RevId: 185810400
* Use a diagnostic listener, and match diagnostic codes for the reduced ↵Gravatar cushon2018-02-14
| | | | | | classpath heuristic PiperOrigin-RevId: 185746460
* Remove deprecated rule_kind argument from Turbine and JavaBuilder.Gravatar cushon2018-02-14
| | | | | | Roll forward of unknown commit PiperOrigin-RevId: 185727344
* Accept --target_label, --injecting_rule_kind in JavaBuilder and Turbine.Gravatar tomlu2018-02-13
| | | | | | | | | | | The values (if present) are written into the manifest with this format: Target-Label: <label> Injecting-Rule-Kind: <kind> In the future, JavaBuilder will make sure of this instead of command line arguments to find owners for jars for its add_dep commands. PiperOrigin-RevId: 185557317
* Use a different date time when normalizing zip entriesGravatar cushon2018-02-12
| | | | | | Fixes #4614 PiperOrigin-RevId: 185474153
* 1) Make checker exit with 199 if there is any dependency issue.Gravatar cnsun2018-02-12
| | | | | | | | 2) Also print the dependency issues to stderr. 3) Add golden tests to test the above two. RELNOTES:n/a. PiperOrigin-RevId: 185423338
* Use a different date time when normalizing zip entriesGravatar cushon2018-02-12
| | | | PiperOrigin-RevId: 185419668
* add srcs filegroups for import_deps_checkerGravatar Benjamin Peterson2018-02-09
| | | | | Change-Id: I1fa7867ffb08af95c1eef5ae3e32cff34292328b PiperOrigin-RevId: 185189976
* Use MoreAsserts.assertThrowas instead of the Junit's version.Gravatar cnsun2018-02-08
| | | | | RELNOTES:none. PiperOrigin-RevId: 185075745
* Make some tests compatible with JDK 9Gravatar cushon2018-02-08
| | | | PiperOrigin-RevId: 185003013
* Add a new tool to check the deps of aar_import. This is the first cl of aGravatar cnsun2018-02-06
| | | | | | | series. The following CLs will integrate this into bazel. RELNOTES:n/a. PiperOrigin-RevId: 184706507
* Add a Path-returning method to JavacBootclasspathGravatar cushon2018-02-02
| | | | PiperOrigin-RevId: 184370036
* Don't suppress non-NOTE diagnostics for failed buildsGravatar cushon2018-02-02
| | | | | | | | To avoid hiding compiler.warn.sun.proprietary warnings when running with -Werror. Fixes bazelbuild/bazel#4564 PiperOrigin-RevId: 184367653
* Migrate DependencyModule to use jarToTarget/directJarsGravatar cushon2018-01-29
| | | | | | instead of directJarsToTargets/indirectJarsToTargets. PiperOrigin-RevId: 183780563
* Change JavaBuilder and Turbine command lines to not require CustomMultiArgv.Gravatar tomlu2018-01-24
| | | | | | | | | | | | | | | | | | | | Instead of passing: --direct_dependency jar1 jarowner1 aspect1 --indirect_dependency jar2 jarowner2 aspect2 --classpath jar1 jar2 we pass --dependencies jar1 jarowner1;aspect1 jar2 jarowner2:aspect2 --direct_dependencies jar1 This formats doesn't need to inspect each item in the incoming nested set, and thus doesn't need CustomMultiArgv. This change needs to be rolled out in phases, so this CL changes JavaBuilder and Turbine to accept either format. RELNOTES: None PiperOrigin-RevId: 183155036
* Fix "Could not reserve enough space for object heap" error on Windows during ↵Gravatar philwo2018-01-24
| | | | | | Bazel bootstrap. PiperOrigin-RevId: 183065122
* Consolidate Error Prone resource handlingGravatar cushon2018-01-22
| | | | | | Fixes bazelbuild/bazel#4483 PiperOrigin-RevId: 182847474
* Minimal support for compiling module-infosGravatar cushon2018-01-18
| | | | PiperOrigin-RevId: 182461095
* Normalize javacopts for javac-turbineGravatar cushon2018-01-16
| | | | PiperOrigin-RevId: 182130131
* If a compilation uses both -source and --release, prefer --releaseGravatar cushon2018-01-16
| | | | | | | | javac does not allow both -source and --release to be set, which makes it difficult to migrate to --release when javacopts are combined from multiple sources. PiperOrigin-RevId: 182113897
* Add a TODOGravatar cushon2018-01-14
| | | | PiperOrigin-RevId: 181908311
* Avoid mixing -source and --releaseGravatar cushon2018-01-12
| | | | | | | | javac doesn't allow both to be set, so when defaulting to target Java 8 use --release if the javacopts already include a --release flag. PiperOrigin-RevId: 181777670
* Fix breakage caused by unknown commitGravatar cushon2018-01-12
| | | | PiperOrigin-RevId: 181703395
* Require --javacopts to be terminated with --Gravatar cushon2018-01-11
| | | | PiperOrigin-RevId: 181687846
* Concatenate reference config files in singlejarGravatar Tony Liang2018-01-11
| | | | | | | | | | | Merge reference.conf files in single jar since [akka will break](https://doc.akka.io/docs/akka/current/general/configuration.html#when-using-jarjar-onejar-assembly-or-any-jar-bundler) if reference.conf files are overwritten. The feature is added to both java and cpp implementations of singlejar to concatenate reference.conf files to keep behaviors consistent. For the cpp implementation, using `OutputJar.ExtraCombiner` in singlejar_main.cc feels less intrusive than adding a new `Concatenator` in the output_jar code. Bazel-dev discussion on the issue is [here](https://groups.google.com/forum/#!topic/bazel-dev/C30dwAPL708). Closes #4413. PiperOrigin-RevId: 181622277
* Use Iterable#forEach instead of `.stream().forEach`.Gravatar cushon2018-01-08
| | | | PiperOrigin-RevId: 181180652
* Make SJD @Generated handling compatible with ↵Gravatar cushon2018-01-05
| | | | | | javax.annotation.processing.Generated PiperOrigin-RevId: 181012373
* 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
* 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
* Terminate --javacopts in tests with --Gravatar cushon2017-12-21
| | | | PiperOrigin-RevId: 179841278
* Update bootclasspath handling for JDK 9Gravatar cushon2017-12-20
| | | | | | | rt.jar etc. no longer exist, retrieve the default bootclasspath contents using a Java program instead. PiperOrigin-RevId: 179747945
* Add support for --javacopt flags terminated by `--` to JavaBuilderGravatar cushon2017-12-19
| | | | | | | | | | | JDK 9 adds javac flags that start with `--`, so we can't assume that `--` flags belong to JavaBuilder. Instead, we will use `--` by itself as a delimiter to parse e.g. `--javacopts --release 8 -- sources Hello.java`. This change just adds support for dropping a trailing `--` after parsing javacopts. We can't rely on the delimiter until after the next Blaze release. PiperOrigin-RevId: 179589863