mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 21:20:11 +01:00
The pip dependencies in github_tools are the reason the MODULE.bazel.lock is platform-dependent. Following complaints about the platform-dependence, split apart github_tools from the rest of the bazel repo and make it not track the lockfile: while there's an incremental safety risk due to not tracking checksums, it's unlikely the tools there would ever be part of a Carbon release process. If we eventually add Python tools that need pip to the release, it might be desirable to go back to re-unify the bazezl repos. This does make running pr_comments incrementally more inconvenient because a "bazel run" needs to be run from the github_tools subdir. As a consequence of separating the dependency, this means tests will not be continuously run in github_tools. They're now a separate repo, and we cannot add a dependency without restoring the platform-dependent issue. I think pr_comments is sufficiently low value and unchanging that it is not worth building separate CI for it. Cleans up some legacy references to third_party/llvm-project, since now github_tools needs to be added to the main bazelignore.
31 lines
1.0 KiB
Python
31 lines
1.0 KiB
Python
# Part of the Carbon Language project, under the Apache License v2.0 with LLVM
|
|
# Exceptions. See /LICENSE for license information.
|
|
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
|
|
"""Bazel modules.
|
|
|
|
This is set up as a separate bazel repo from the main Carbon directory in order
|
|
to split up the pip dependency, which makes MODULE.bazel.lock
|
|
platform-dependent. We don't commit the MODULE.bazel.lock for github_tools
|
|
because it's low-value, and would shift the platform dependence costs.
|
|
"""
|
|
|
|
module(name = "github_tools")
|
|
|
|
bazel_dep(name = "rules_python", version = "0.27.1")
|
|
|
|
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
|
|
python.toolchain(
|
|
python_version = "3.11",
|
|
)
|
|
use_repo(python, "python_versions")
|
|
|
|
# Create a central repo that knows about the pip dependencies.
|
|
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
|
|
pip.parse(
|
|
hub_name = "py_deps",
|
|
python_version = "3.11",
|
|
requirements_lock = "//:requirements.txt",
|
|
)
|
|
use_repo(pip, "py_deps")
|