Skip to content

Commit

Permalink
Remove allow_empty = False from BUILD files (#2032)
Browse files Browse the repository at this point in the history
  • Loading branch information
keith authored Jan 18, 2024
1 parent eb18a3c commit 802c47d
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 92 deletions.
10 changes: 2 additions & 8 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@ load("//bazel:flags.bzl", "CPP_FLAGS", "MAPLIBRE_FLAGS")
# Generate code required by the core
filegroup(
name = "style_data",
srcs = glob(
["**/*.ejs"],
allow_empty = False,
),
srcs = glob(["**/*.ejs"]),
)

genrule(
Expand All @@ -40,10 +37,7 @@ genrule(

filegroup(
name = "shader_data",
srcs = ["shaders/manifest.json"] + glob(
["shaders/*.glsl"],
allow_empty = False,
),
srcs = ["shaders/manifest.json"] + glob(["shaders/*.glsl"]),
)

genrule(
Expand Down
1 change: 0 additions & 1 deletion expression-test/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ cc_test(
"*.cpp",
"*.hpp",
],
allow_empty = False,
),
copts = CPP_FLAGS + MAPLIBRE_FLAGS,
data = [
Expand Down
16 changes: 5 additions & 11 deletions metrics/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,16 @@ filegroup(
"ios-render-test-runner/**", # iOS only
"expectations/platform-ios/**", # iOS only
],
allow_empty = False,
) + select({
"//:metal_renderer": glob(["expectations/platform-ios-metal/**"]), # iOS Metal only
) + select({
"//:metal_renderer": glob(["expectations/platform-ios-metal/**"]), # iOS Metal only
"//conditions:default": [],
}) + [
"cache-metrics.db",
"cache-style.db",
"ios-render-test-runner-metrics.json", # iOS only
"ios-render-test-runner-style.json", # iOS only
"ios-metal-render-test-runner-metrics.json", # iOS Metal only
"ios-metal-render-test-runner-style.json", # iOS Metal only
"ios-render-test-runner-metrics.json", # iOS only
"ios-render-test-runner-style.json", # iOS only
"linux-gcc8-release-metrics.json",
"linux-gcc8-release-style.json",
],
Expand All @@ -31,12 +30,7 @@ filegroup(

filegroup(
name = "expression-test-files",
srcs = glob(
[
"integration/expression-tests/**",
],
allow_empty = False,
) + [
srcs = glob(["integration/expression-tests/**"]) + [
"ignores/platform-all.json",
],
visibility = [
Expand Down
18 changes: 4 additions & 14 deletions platform/darwin/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ load(
"MLN_DARWIN_OBJCPP_HEADERS",
"MLN_DARWIN_OBJC_HEADERS",
"MLN_DARWIN_PRIVATE_HEADERS",
"MLN_DARWIN_PUBLIC_OBJCPP_SOURCE",
"MLN_DARWIN_PUBLIC_OBJCPP_OPENGL_SOURCE",
"MLN_DARWIN_PUBLIC_OBJCPP_CUSTOM_DRAWABLE_SOURCE",
"MLN_DARWIN_PUBLIC_OBJCPP_OPENGL_SOURCE",
"MLN_DARWIN_PUBLIC_OBJCPP_SOURCE",
"MLN_DARWIN_PUBLIC_OBJC_SOURCE",
"MLN_GENERATED_DARWIN_STYLE_HEADERS",
"MLN_GENERATED_DARWIN_STYLE_PUBLIC_HEADERS",
Expand Down Expand Up @@ -147,14 +147,10 @@ objc_library(
"test/*.m",
"test/*.h",
],
allow_empty = False,
),
copts = MAPLIBRE_FLAGS + WARNING_FLAGS["ios"],
data = glob(
[
"test/Media.xcassets/**",
],
allow_empty = False,
["test/Media.xcassets/**"],
),
sdk_frameworks = [
"MapKit",
Expand All @@ -175,7 +171,6 @@ objc_library(
"test/*.h",
"test/*.mm",
],
allow_empty = False,
exclude = [
"test/MLNOfflineStorageTests.mm",
],
Expand All @@ -192,12 +187,7 @@ objc_library(
swift_library(
name = "shared_tests_swift_srcs",
testonly = True,
srcs = glob(
[
"test/*.swift",
],
allow_empty = False,
),
srcs = glob(["test/*.swift"]),
data = [
"test/amsterdam.geojson",
"test/one-liner.json",
Expand Down
7 changes: 1 addition & 6 deletions platform/ios/iosapp-UITests/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,7 @@ configure_device_profiles()
swift_library(
name = "uitest_srcs",
testonly = True,
srcs = glob(
[
"*.swift",
],
allow_empty = False,
),
srcs = glob(["*.swift"]),
)

ios_ui_test(
Expand Down
7 changes: 1 addition & 6 deletions platform/ios/test/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ objc_library(
"*.h",
"*.m",
],
allow_empty = False,
exclude = [
"MLNMapViewContentInsetTests.m",
],
Expand All @@ -30,7 +29,6 @@ objc_library(
"*.mm",
"*.h",
],
allow_empty = False,
),
copts = CPP_FLAGS + MAPLIBRE_FLAGS + WARNING_FLAGS["ios"],
deps = [
Expand All @@ -41,10 +39,7 @@ objc_library(
swift_library(
name = "ios_tests_swift_srcs",
testonly = True,
srcs = glob(
["*.swift"],
allow_empty = False,
) + [
srcs = glob(["*.swift"]) + [
"//platform/darwin:test/MLNSDKTestHelpers.swift",
],
deps = [
Expand Down
6 changes: 1 addition & 5 deletions platform/ios/vendor/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,9 @@ objc_library(
"SMCalloutView/*.h",
"SMCalloutView/*.m",
],
allow_empty = False,
),
hdrs = glob(
[
"SMCalloutView/*.h",
],
allow_empty = False,
["SMCalloutView/*.h"],
),
copts = WARNING_FLAGS["ios"],
includes = ["SMCalloutView"],
Expand Down
7 changes: 1 addition & 6 deletions test/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,9 @@ cc_library(
cc_library(
name = "testlib",
srcs = select({
"//:ios": glob(
["src/mbgl/test/*.cpp"],
allow_empty = False,
),
"//:ios": glob(["src/mbgl/test/*.cpp"]),
"//conditions:default": glob(
["src/mbgl/test/*.cpp"],
allow_empty = False,
exclude = ["src/mbgl/test/http_server.cpp"],
),
}) + [
Expand Down Expand Up @@ -74,7 +70,6 @@ filegroup(
name = "fixtures",
srcs = glob(
["fixtures/**/*"],
allow_empty = False,
),
visibility = [
"//platform/ios/test/core:__pkg__",
Expand Down
44 changes: 9 additions & 35 deletions vendor/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ load("//bazel:flags.bzl", "CPP_FLAGS")
# vendor/mapbox-base-files.json
cc_library(
name = "mapbox-base",
hdrs = glob(
hdrs = [
"mapbox-base/extras/args/args.hxx",
] + glob(
[
"mapbox-base/deps/cheap-ruler-cpp/include/mapbox/*.hpp",
"mapbox-base/deps/geojson-vt-cpp/include/**/*.hpp",
Expand All @@ -18,10 +20,8 @@ cc_library(
"mapbox-base/extras/filesystem/include/ghc/*.hpp",
"mapbox-base/extras/kdbush.hpp/include/*.hpp",
"mapbox-base/extras/rapidjson/include/**/*.h",
"mapbox-base/extras/args/args.hxx",
"mapbox-base/include/mapbox/**/*.hpp",
],
allow_empty = False,
exclude = ["mapbox-base/deps/jni.hpp/include/jni/string_conversion.hpp"],
),
copts = CPP_FLAGS,
Expand Down Expand Up @@ -51,12 +51,7 @@ cc_library(
cc_library(
name = "parsedate",
srcs = ["parsedate/parsedate.cpp"],
hdrs = glob(
[
"parsedate/**/*.hpp",
],
allow_empty = False,
),
hdrs = glob(["parsedate/**/*.hpp"]),
copts = CPP_FLAGS,
includes = ["parsedate"],
visibility = ["//visibility:public"],
Expand All @@ -65,12 +60,7 @@ cc_library(
# vendor/optional
cc_library(
name = "optional",
hdrs = glob(
[
"mapbox-base/deps/optional/*.hpp",
],
allow_empty = False,
),
hdrs = glob(["mapbox-base/deps/optional/*.hpp"]),
copts = CPP_FLAGS,
includes = ["mapbox-base/deps/optional"],
visibility = ["//visibility:public"],
Expand All @@ -84,7 +74,6 @@ cc_library(
"csscolorparser/**/*.hpp",
"csscolorparser/**/*.cpp",
],
allow_empty = False,
),
copts = CPP_FLAGS,
includes = ["csscolorparser"],
Expand All @@ -95,10 +84,7 @@ cc_library(
# vendor/wagyu-files.json
cc_library(
name = "wagyu",
hdrs = glob(
["wagyu/include/mapbox/geometry/wagyu/*.hpp"],
allow_empty = False,
),
hdrs = glob(["wagyu/include/mapbox/geometry/wagyu/*.hpp"]),
copts = CPP_FLAGS,
includes = ["wagyu/include"],
visibility = ["//visibility:public"],
Expand All @@ -115,7 +101,6 @@ objc_library(
"zip-archive/SSZipArchive/minizip/*.c",
"zip-archive/SSZipArchive/minizip/*.h",
],
allow_empty = False,
),
defines = ["ZLIB_COMPAT"],
includes = ["zip-archive/SSZipArchive"],
Expand All @@ -130,7 +115,6 @@ cc_library(
"boost/include/boost/**/*.hpp",
"boost/include/boost/**/*.h",
],
allow_empty = False,
),
copts = CPP_FLAGS,
includes = ["boost/include"],
Expand All @@ -148,10 +132,7 @@ cc_library(
# vendor/protozero-files.json
cc_library(
name = "protozero",
hdrs = glob(
["protozero/include/protozero/*.hpp"],
allow_empty = False,
),
hdrs = glob(["protozero/include/protozero/*.hpp"]),
copts = CPP_FLAGS,
includes = ["protozero/include"],
visibility = ["//visibility:public"],
Expand All @@ -178,10 +159,7 @@ cc_library(
# vendor/metal-cpp.json
cc_library(
name = "metal-cpp",
hdrs = glob(
["metal-cpp/**/*.hpp"],
allow_empty = False,
),
hdrs = glob(["metal-cpp/**/*.hpp"]),
copts = CPP_FLAGS,
includes = ["metal-cpp"],
visibility = ["//visibility:public"],
Expand All @@ -208,10 +186,7 @@ cc_library(
# vendor/vector-tile-files.json
cc_library(
name = "vector-tile",
hdrs = glob(
["vector-tile/include/mapbox/**/*.hpp"],
allow_empty = False,
),
hdrs = glob(["vector-tile/include/mapbox/**/*.hpp"]),
copts = CPP_FLAGS,
includes = ["vector-tile/include"],
visibility = ["//visibility:public"],
Expand All @@ -225,7 +200,6 @@ cc_library(
"icu/src/*.cpp",
"icu/src/*.h",
],
allow_empty = False,
),
hdrs = glob(["icu/include/unicode/*.h"]),
copts = CPP_FLAGS + [
Expand Down

0 comments on commit 802c47d

Please sign in to comment.