diff options
author | elenairina <elenairina@google.com> | 2018-06-29 08:10:12 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-06-29 08:11:27 -0700 |
commit | 1458c61f6b458747906dec95b3592bf9b3eb6c91 (patch) | |
tree | 1ba931864af3242475c26e06fe4a2b5ee47d895a /src/test/java/com/google/devtools/build/lib/packages | |
parent | c816b89a2224c3c318f1228755ef41c53975f45c (diff) |
[java_common.compile] Always generate a source jar.
[Rolling forward https://github.com/bazelbuild/bazel/commit/c4e128e2c6d8cacaeba034d6a3195796d50f1745]
java_common.compile doesn't generate the output source jar when a source jar is
the only input for the compilation. This is wrong because the source jar can
include APT generated sources. It is also inconsistent with java_library and
leads to inconsistent Skylark rules where a declared output will not always have a
generating action.
This new behavior is guarded by a new flag --incompatible_generate_javacommon_source_jar.
RELNOTES: None.
PiperOrigin-RevId: 202648346
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/packages')
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/packages/SkylarkSemanticsConsistencyTest.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/packages/SkylarkSemanticsConsistencyTest.java b/src/test/java/com/google/devtools/build/lib/packages/SkylarkSemanticsConsistencyTest.java index fc30103bb6..4a8e303a50 100644 --- a/src/test/java/com/google/devtools/build/lib/packages/SkylarkSemanticsConsistencyTest.java +++ b/src/test/java/com/google/devtools/build/lib/packages/SkylarkSemanticsConsistencyTest.java @@ -130,6 +130,7 @@ public class SkylarkSemanticsConsistencyTest { "--incompatible_disallow_legacy_javainfo=" + rand.nextBoolean(), "--incompatible_disallow_old_style_args_add=" + rand.nextBoolean(), "--incompatible_disallow_slash_operator=" + rand.nextBoolean(), + "--incompatible_generate_javacommon_source_jar=" + rand.nextBoolean(), "--incompatible_new_actions_api=" + rand.nextBoolean(), "--incompatible_no_support_tools_in_action_inputs=" + rand.nextBoolean(), "--incompatible_package_name_is_a_function=" + rand.nextBoolean(), @@ -157,6 +158,7 @@ public class SkylarkSemanticsConsistencyTest { .incompatibleDisallowLegacyJavaInfo(rand.nextBoolean()) .incompatibleDisallowOldStyleArgsAdd(rand.nextBoolean()) .incompatibleDisallowSlashOperator(rand.nextBoolean()) + .incompatibleGenerateJavaCommonSourceJar(rand.nextBoolean()) .incompatibleNewActionsApi(rand.nextBoolean()) .incompatibleNoSupportToolsInActionInputs(rand.nextBoolean()) .incompatiblePackageNameIsAFunction(rand.nextBoolean()) |