From 9cb254851c974ccaecaf1430081db589b3da238c Mon Sep 17 00:00:00 2001 From: Alex Trotta Date: Thu, 12 Mar 2026 12:05:23 -0400 Subject: [PATCH] Export json files for --incompatible_no_implicit_file_export I believe this happens when two things happen: 1. Bump Bazel past https://github.com/bazelbuild/bazel/pull/27674 or add `--incompatible_no_implicit_file_export` 2. Use the deps declared in your main module in another module (for example a manually built wheel) Note that I couldn't even get close to getting `--incompatible_no_implicit_file_export` working on this repo overall, but this patch works for my repo. --- pycross/private/toolchain_helpers.bzl | 1 + 1 file changed, 1 insertion(+) diff --git a/pycross/private/toolchain_helpers.bzl b/pycross/private/toolchain_helpers.bzl index 21ead25f..c14ff188 100644 --- a/pycross/private/toolchain_helpers.bzl +++ b/pycross/private/toolchain_helpers.bzl @@ -432,6 +432,7 @@ def _pycross_environment_repo_impl(rctx): root_build_sections.append(" {},".format(repr(env["output"]))) root_build_sections.append(" ]") root_build_sections.append(")") + root_build_sections.append("exports_files(glob([\"*.json\"]))") rctx.file(rctx.path("BUILD.bazel"), "\n".join(root_build_sections))