Skip to content

Broken python target due to missing external repo #576

@z8v

Description

@z8v

The python target relies on the @python repo which is not included in the dependencies.

Seems like we need a config option that will configure a python toolchain and make it available for the target.

Using the following MODULE.bazel file from the readme is enough to re-produce it, with an empty WORKSPACE and BUILD.bazel file.

# Boost
# Famous C++ library that has given rise to many new additions to the C++ Standard Library
# Makes @boost available for use: For example, add `@boost//:algorithm` to your deps.
# For more, see https://github.com/nelhage/rules_boost and https://www.boost.org
bazel_dep(name = "rules_boost", repo_name = "com_github_nelhage_rules_boost")
archive_override(
    module_name = "rules_boost",
    strip_prefix = "rules_boost-master",
    urls = "https://github.com/nelhage/rules_boost/archive/refs/heads/master.tar.gz",
    # It is recommended to edit the above URL and the below sha256 to point to a specific version of this repository.
    # integrity = "sha256-...",
)

non_module_boost_repositories = use_extension("@com_github_nelhage_rules_boost//:boost/repositories.bzl", "non_module_dependencies")
use_repo(
    non_module_boost_repositories,
    "boost",
)
$ bazel build @boost//:python
ERROR: no such package '@@[unknown repo 'python' requested from @@rules_boost~~non_module_dependencies~boost]//': The repository '@@[unknown repo 'python' requested from @@rules_boost~~non_module_dependencies~boost]' could not be resolved: No repository visible as '@python' from repository '@@rules_boost~~non_module_dependencies~boost'
...

Worth adding bazel build @boost//... on the CI as well when this is fixed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions