скомпилировать машинописный текст с помощью bazel: невозможно загрузить файл '@npm_bazel_typescript//:checked_in_ts_project.bzl': файл не существует

Я пытаюсь обновить проект с открытым исходным кодом в ветке для сборки bazel, которая раньше работала, но с последней версией bazel это не так, файлы выглядят следующим образом:

РАБОЧЕЕ ПРОСТРАНСТВО

workspace(name = "kimera")

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")


git_repository(
    name = "com_github_bazelbuild_buildtools",
    remote = "https://github.com/bazelbuild/buildtools.git",
    tag = "0.19.2.1",
)

git_repository(
    name = "build_bazel_rules_nodejs",
    remote = "https://github.com/bazelbuild/rules_nodejs.git",
    tag = "0.16.3",
)

load("@build_bazel_rules_nodejs//:package.bzl", "rules_nodejs_dependencies")

rules_nodejs_dependencies()

load("@build_bazel_rules_nodejs//:defs.bzl", "node_repositories")

node_repositories(
    node_version = "10.9.0",
    package_json = ["//:package.json"],
)

load("@build_bazel_rules_nodejs//:defs.bzl", "node_repositories", "yarn_install")

node_repositories()

http_archive(
    name = "io_bazel_rules_sass",
    strip_prefix = "rules_sass-1.15.1",
    url = "https://github.com/bazelbuild/rules_sass/archive/1.15.1.zip",
)

load("@io_bazel_rules_sass//:defs.bzl", "sass_repositories")

load("@io_bazel_rules_sass//:package.bzl", "rules_sass_dependencies")

rules_sass_dependencies()

sass_repositories()

git_repository(
    name = "build_bazel_rules_typescript",
    remote = "https://github.com/bazelbuild/rules_typescript.git",
    #    tag = "0.7.1",
    tag = "0.22.0",
)

load("@build_bazel_rules_typescript//:package.bzl", "rules_typescript_dependencies")

rules_typescript_dependencies()

load("@build_bazel_rules_nodejs//:package.bzl", "rules_nodejs_dependencies")

rules_nodejs_dependencies()

load("@build_bazel_rules_typescript//:defs.bzl", "ts_setup_workspace")

ts_setup_workspace()

yarn_install(
    name = "npm",
    package_json = "//:package.json",
    yarn_lock = "//:yarn.lock",
)

Мои правки:

РАБОЧЕЕ ПРОСТРАНСТВО

workspace(
  name = "kimera",
  managed_directories = {"@npm": ["node_modules"]},
)

load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")


git_repository(
    name = "com_github_bazelbuild_buildtools",
    remote = "https://github.com/bazelbuild/buildtools.git",
    tag = "3.3.0",
)

git_repository(
    name = "build_bazel_rules_nodejs",
    remote = "https://github.com/bazelbuild/rules_nodejs.git",
    tag = "1.7.0",
)

load("@build_bazel_rules_nodejs//:index.bzl", "check_bazel_version")

check_bazel_version("2.1.0")

load("@build_bazel_rules_nodejs//:package.bzl", "rules_nodejs_dev_dependencies")

rules_nodejs_dev_dependencies()

load("@build_bazel_rules_nodejs//:index.bzl", "node_repositories")

node_repositories(
    #node_version = "12.13.0",
    package_json = ["//:package.json"],
    #    yarn_version = "1.19.1",
)

load("@build_bazel_rules_nodejs//:index.bzl", "node_repositories", "yarn_install")

node_repositories()

git_repository(
    name = "io_bazel_rules_sass",
    remote = "https://github.com/bazelbuild/rules_sass.git",
    tag = "1.26.9.",
)

load("@io_bazel_rules_sass//:defs.bzl", "sass_repositories")

load("@io_bazel_rules_sass//:package.bzl", "rules_sass_dependencies")

rules_sass_dependencies()

sass_repositories()

git_repository(
    name = "build_bazel_rules_typescript",
    remote = "https://github.com/bazelbuild/rules_typescript.git",
    #    tag = "0.7.1",
    tag = "0.25.1",
)

yarn_install(
    name = "npm",
    package_json = "//:package.json",
    yarn_lock = "//:yarn.lock",
)

load("@npm//:install_bazel_dependencies.bzl", "install_bazel_dependencies")
install_bazel_dependencies()

load("@npm_bazel_typescript//:index.bzl", "ts_setup_workspace")
ts_setup_workspace()

load("@npm_bazel_typescript//:index.bzl", "ts_setup_workspace")
ts_setup_workspace()

/ site / ts / СТРОИТЬ

package(default_visibility = ["//visibility:public"])

load("@npm_bazel_typescript//:index.bzl", "ts_library")

ts_library(
    name = "kimerajs",
    srcs = ["source.ts"],
)

Сообщение об ошибке

bazel build //...

ERROR: C:/users/ruslanlopez/_bazel_ruslanlopez/z3giu6et/external/npm/@bazel/typescript/bin/BUILD.bazel:10:1: every rule of type nodejs_binary implicitly
 depends upon the target '@build_bazel_rules_nodejs//internal/linker:index.js', but this target could not be found because of: error loading package '@b
uild_bazel_rules_nodejs//internal/linker': Unable to load file '@npm_bazel_typescript//:checked_in_ts_project.bzl': file doesn't exist
ERROR: C:/users/ruslanlopez/_bazel_ruslanlopez/z3giu6et/external/npm/@bazel/typescript/bin/BUILD.bazel:10:1: every rule of type nodejs_binary implicitly
 depends upon the target '@build_bazel_rules_nodejs//internal/linker:runfiles_helper.js', but this target could not be found because of: error loading p
ackage '@build_bazel_rules_nodejs//internal/linker': Unable to load file '@npm_bazel_typescript//:checked_in_ts_project.bzl': file doesn't exist
ERROR: Analysis of target '//site/ts:kimerajs' failed; build aborted: error loading package '@build_bazel_rules_nodejs//internal/linker': Unable to load
 file '@npm_bazel_typescript//:checked_in_ts_project.bzl': file doesn't exist
INFO: Elapsed time: 5.000s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (104 packages loaded, 7895 targets configured)
    currently loading: @build_bazel_rules_nodejs// ... (3 packages)
    Fetching @build_bazel_rules_sass_deps; fetching

График зависимости

0 ответов

Другие вопросы по тегам