Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ public final class BuildLanguageOptions extends OptionsBase {

@Option(
name = "incompatible_no_implicit_file_export",
defaultValue = "false",
defaultValue = FlagConstants.DEFAULT_INCOMPATIBLE_NO_IMPLICIT_FILE_EXPORT,
documentationCategory = OptionDocumentationCategory.STARLARK_SEMANTICS,
effectTags = {OptionEffectTag.BUILD_FILE_SEMANTICS},
metadataTags = {OptionMetadataTag.INCOMPATIBLE_CHANGE},
Expand Down Expand Up @@ -1061,7 +1061,7 @@ public FlagConsumer setBool(String key, boolean ignored) {
"-incompatible_java_info_merge_runtime_module_flags";
public static final String INCOMPATIBLE_NO_ATTR_LICENSE = "+incompatible_no_attr_license";
public static final String INCOMPATIBLE_NO_IMPLICIT_FILE_EXPORT =
"-incompatible_no_implicit_file_export";
FlagConstants.DEFAULT_INCOMPATIBLE_NO_IMPLICIT_FILE_EXPORT_NAME;
public static final String INCOMPATIBLE_NO_RULE_OUTPUTS_PARAM =
"-incompatible_no_rule_outputs_param";
public static final String INCOMPATIBLE_RUN_SHELL_COMMAND_STRING =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,8 @@ private FlagConstants() {}
public static final String DEFAULT_INCOMPATIBLE_ENABLE_PROTO_TOOLCHAIN_RESOLUTION = "true";
public static final String DEFAULT_INCOMPATIBLE_ENABLE_PROTO_TOOLCHAIN_RESOLUTION_NAME =
"+incompatible_enable_proto_toolchain_resolution";

public static final String DEFAULT_INCOMPATIBLE_NO_IMPLICIT_FILE_EXPORT = "true";
public static final String DEFAULT_INCOMPATIBLE_NO_IMPLICIT_FILE_EXPORT_NAME =
"+incompatible_no_implicit_file_export";
}
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,11 @@ def _impl(ctx):
runtime_deps = [":proguard_import"],
)

alias(
name = "proguard_whitelister",
actual = ":proguard_allowlister.par",
)

java_import(
name = "TestRunner",
jars = ["TestRunner.jar"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1522,7 +1522,7 @@ public void testDefaultVisibilityReturnedInDepsForInputFiles() throws Exception
writeFile("mango/BUILD", "package_group(name='mango', packages=[])");

Set<T> result = eval("deps(//kiwi:kiwi.sh)");
assertThat(result).isEqualTo(eval("//mango:mango + //kiwi:kiwi.sh"));
assertThat(result).isEqualTo(eval("//kiwi:kiwi.sh"));
}

// Regression test for bug #2827101:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5968,6 +5968,7 @@ private static void createFiles(
"load('//" + bzlFilePath + ":extension.bzl', 'cc_starlark_library')",
"load('@rules_cc//cc:cc_binary.bzl', 'cc_binary')",
"load('@rules_cc//cc:cc_library.bzl', 'cc_library')",
"exports_files(['script.lds', 'extra_compiler_input'])",
"cc_library(",
" name = 'dep1',",
" srcs = ['dep1.cc'],",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ private void writeTest() throws IOException {
scratch.file(
"another/BUILD",
"""
exports_files(['another.txt'])
filegroup(name = 'another',
srcs = ['another.txt'])
""");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ public void defaultMainCannotBeAmbiguous() throws Exception {
scratch.file(
"pkg1/BUILD",
getPyLoad("py_binary"),
"exports_files(['bar.py'])",
"py_binary(",
" name = 'foo',",
" srcs = ['bar.py'])");
Expand All @@ -115,6 +116,7 @@ public void explicitMainCannotBeAmbiguous() throws Exception {
scratch.file(
"pkg1/BUILD",
getPyLoad("py_binary"),
"exports_files(['bar.py'])",
"py_binary(",
" name = 'foo',",
" srcs = ['bar.py'])");
Expand Down
3 changes: 3 additions & 0 deletions src/test/py/bazel/bzlmod/bazel_module_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ def setUp(self):
'build'
' --extra_toolchains=@bazel_tools//tools/python:autodetecting_toolchain'
),
# TODO: Remove once rules_python exports runtime_env_toolchain_interpreter.sh
# See https://github.com/bazel-contrib/rules_python/pull/3471
'build --noincompatible_no_implicit_file_export',
],
)

Expand Down
3 changes: 3 additions & 0 deletions src/test/py/bazel/bzlmod/bazel_repo_mapping_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ def setUp(self):
'build'
' --extra_toolchains=@bazel_tools//tools/python:autodetecting_toolchain'
),
# TODO: Remove once rules_python exports runtime_env_toolchain_interpreter.sh
# See https://github.com/bazel-contrib/rules_python/pull/3471
'build --noincompatible_no_implicit_file_export',
],
)

Expand Down
5 changes: 5 additions & 0 deletions src/test/shell/bazel/bazel_bootstrap_distfile_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ function test_bootstrap() {

JAVABASE=$(echo reduced*)

# TODO: Remove once rules_python exports runtime_env_toolchain_interpreter.sh
# See https://github.com/bazel-contrib/rules_python/pull/3471
export EXTRA_BAZEL_ARGS="${EXTRA_BAZEL_ARGS:-} --noincompatible_no_implicit_file_export"

./compile.sh || fail "Expected to be able to bootstrap bazel.\
If you updated MODULE.bazel, see the NOTE in that file."

Expand Down Expand Up @@ -134,6 +138,7 @@ EOF
--java_runtime_version=local_jdk --tool_java_runtime_version=local_jdk \
--extra_toolchains=@rules_python//python/runtime_env_toolchains:all \
--extra_toolchains=fake_java_toolchain:all \
--noincompatible_no_implicit_file_export \
src:bazel_nojdk &> "${TEST_log}" || fail "analysis with bootstrapped Bazel failed"
}

Expand Down
4 changes: 4 additions & 0 deletions src/test/shell/bazel/bazel_determinism_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,13 @@ function test_determinism() {
else
output_base_1="${TEST_TMPDIR}/ouäöü€t 1"
fi
# TODO: Remove once rules_python exports runtime_env_toolchain_interpreter.sh
# See https://github.com/bazel-contrib/rules_python/pull/3471
bazel \
--output_base="${output_base_1}" \
build \
--extra_toolchains=@rules_python//python:autodetecting_toolchain \
--noincompatible_no_implicit_file_export \
--enable_bzlmod \
--check_direct_dependencies=error \
--lockfile_mode=update \
Expand All @@ -112,6 +115,7 @@ function test_determinism() {
--output_base="${output_base_2}" \
build \
--extra_toolchains=@rules_python//python:autodetecting_toolchain \
--noincompatible_no_implicit_file_export \
--enable_bzlmod \
--check_direct_dependencies=error \
--lockfile_mode=update \
Expand Down
Loading