Skip to content

Commit 613b5e3

Browse files
committed
fix(bazel): add missing load statements
Bazel 9 drops builtin `cc_*` rules, they need to be loaded explicitly now.
1 parent bbf8bdb commit 613b5e3

File tree

8 files changed

+226
-48
lines changed

8 files changed

+226
-48
lines changed

BUILD.bazel

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
load("@rules_cc//cc:defs.bzl", "cc_library")
2+
13
yaml_cpp_defines = select({
24
# On Windows, ensure static linking is used.
35
"@platforms//os:windows": ["YAML_CPP_STATIC_DEFINE", "YAML_CPP_NO_CONTRIB"],

MODULE.bazel

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module(
88
version = "0.8.0",
99
)
1010

11-
bazel_dep(name = "platforms", version = "0.0.7")
12-
bazel_dep(name = "rules_cc", version = "0.0.8")
11+
bazel_dep(name = "platforms", version = "1.0.0")
12+
bazel_dep(name = "rules_cc", version = "0.2.14")
1313

14-
bazel_dep(name = "googletest", version = "1.14.0", dev_dependency = True)
14+
bazel_dep(name = "googletest", version = "1.17.0.bcr.2", dev_dependency = True)

MODULE.bazel.lock

Lines changed: 213 additions & 45 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/BUILD.bazel

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test")
2+
13
package(default_visibility = ["//test:__subpackages__"])
24

35
cc_library(

test/fptostring_test.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#include "yaml-cpp/fptostring.h"
22
#include "gtest/gtest.h"
33

4+
#include <iomanip>
5+
46
namespace YAML {
57
namespace {
68

test/googletest-1.13.0/googlemock/test/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#
3131
# Bazel Build for Google C++ Testing Framework(Google Test)-googlemock
3232

33+
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_test")
3334
load("@rules_python//python:defs.bzl", "py_library", "py_test")
3435

3536
licenses(["notice"])

test/googletest-1.13.0/googletest/test/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#
3131
# Bazel BUILD for The Google C++ Testing Framework (Google Test)
3232

33+
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_test")
3334
load("@rules_python//python:defs.bzl", "py_library", "py_test")
3435

3536
licenses(["notice"])

test/integration/BUILD.bazel

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
load("@rules_cc//cc:defs.bzl", "cc_test")
2+
13
cc_test(
24
name = "test",
35
srcs = glob([

0 commit comments

Comments
 (0)