Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not compatible with --noexperimental_python_import_all_repositories #2594

Open
likesum opened this issue Nov 11, 2024 · 1 comment
Open

Not compatible with --noexperimental_python_import_all_repositories #2594

likesum opened this issue Nov 11, 2024 · 1 comment

Comments

@likesum
Copy link

likesum commented Nov 11, 2024

The --noexperimental_python_import_all_repositories setting is useful in working around bazelbuild/bazel#14640 with the PYTHONPATH becoming too large if you have python targets with large numbers of dependencies.

But rules_apple does not seem to be compatible with this. Specifically, when using apple_core_ml_library with --noexperimental_python_import_all_repositories

ERROR:*****/BUILD:346:22: MlmodelGenerate ****/****.m failed: (Exit 1): xctoolrunner failed: error executing MlmodelGenerate command (from target //****:****.CoreML) bazel-out/darwin_arm64-opt-exec-ST-13d3ddad9198/bin/external/build_bazel_rules_apple/tools/xctoolrunner/xctoolrunner coremlc generate ... (remaining 2 arguments skipped)



Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging

Traceback (most recent call last):

  File "****/../build_bazel_rules_apple/tools/xctoolrunner/xctoolrunner.py", line 43, in <module>

    from tools.wrapper_common import execute

ModuleNotFoundError: No module named 'tools'
@jiawen
Copy link

jiawen commented Nov 11, 2024

This is an unfortunate entangling of rules_python dependencies with rules_apple internals, which happens to use a Python based xctoolrunner.py which should in principle have its separate hermetic PYTHONPATH.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants