Remove allow_empty = False from BUILD files (#2032)

This commit is contained in:
Keith Smiley
2024-01-18 10:22:53 -05:00
committed by GitHub
parent eb18a3cefc
commit 802c47dd3b
9 changed files with 24 additions and 92 deletions

View File

@@ -22,10 +22,7 @@ load("//bazel:flags.bzl", "CPP_FLAGS", "MAPLIBRE_FLAGS")
# Generate code required by the core # Generate code required by the core
filegroup( filegroup(
name = "style_data", name = "style_data",
srcs = glob( srcs = glob(["**/*.ejs"]),
["**/*.ejs"],
allow_empty = False,
),
) )
genrule( genrule(
@@ -40,10 +37,7 @@ genrule(
filegroup( filegroup(
name = "shader_data", name = "shader_data",
srcs = ["shaders/manifest.json"] + glob( srcs = ["shaders/manifest.json"] + glob(["shaders/*.glsl"]),
["shaders/*.glsl"],
allow_empty = False,
),
) )
genrule( genrule(

View File

@@ -27,7 +27,6 @@ cc_test(
"*.cpp", "*.cpp",
"*.hpp", "*.hpp",
], ],
allow_empty = False,
), ),
copts = CPP_FLAGS + MAPLIBRE_FLAGS, copts = CPP_FLAGS + MAPLIBRE_FLAGS,
data = [ data = [

View File

@@ -9,17 +9,16 @@ filegroup(
"ios-render-test-runner/**", # iOS only "ios-render-test-runner/**", # iOS only
"expectations/platform-ios/**", # iOS only "expectations/platform-ios/**", # iOS only
], ],
allow_empty = False,
) + select({ ) + select({
"//:metal_renderer": glob(["expectations/platform-ios-metal/**"]), # iOS Metal only "//:metal_renderer": glob(["expectations/platform-ios-metal/**"]), # iOS Metal only
"//conditions:default": [], "//conditions:default": [],
}) + [ }) + [
"cache-metrics.db", "cache-metrics.db",
"cache-style.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-metrics.json", # iOS Metal only
"ios-metal-render-test-runner-style.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-metrics.json",
"linux-gcc8-release-style.json", "linux-gcc8-release-style.json",
], ],
@@ -31,12 +30,7 @@ filegroup(
filegroup( filegroup(
name = "expression-test-files", name = "expression-test-files",
srcs = glob( srcs = glob(["integration/expression-tests/**"]) + [
[
"integration/expression-tests/**",
],
allow_empty = False,
) + [
"ignores/platform-all.json", "ignores/platform-all.json",
], ],
visibility = [ visibility = [

View File

@@ -4,9 +4,9 @@ load(
"MLN_DARWIN_OBJCPP_HEADERS", "MLN_DARWIN_OBJCPP_HEADERS",
"MLN_DARWIN_OBJC_HEADERS", "MLN_DARWIN_OBJC_HEADERS",
"MLN_DARWIN_PRIVATE_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_CUSTOM_DRAWABLE_SOURCE",
"MLN_DARWIN_PUBLIC_OBJCPP_OPENGL_SOURCE",
"MLN_DARWIN_PUBLIC_OBJCPP_SOURCE",
"MLN_DARWIN_PUBLIC_OBJC_SOURCE", "MLN_DARWIN_PUBLIC_OBJC_SOURCE",
"MLN_GENERATED_DARWIN_STYLE_HEADERS", "MLN_GENERATED_DARWIN_STYLE_HEADERS",
"MLN_GENERATED_DARWIN_STYLE_PUBLIC_HEADERS", "MLN_GENERATED_DARWIN_STYLE_PUBLIC_HEADERS",
@@ -147,14 +147,10 @@ objc_library(
"test/*.m", "test/*.m",
"test/*.h", "test/*.h",
], ],
allow_empty = False,
), ),
copts = MAPLIBRE_FLAGS + WARNING_FLAGS["ios"], copts = MAPLIBRE_FLAGS + WARNING_FLAGS["ios"],
data = glob( data = glob(
[ ["test/Media.xcassets/**"],
"test/Media.xcassets/**",
],
allow_empty = False,
), ),
sdk_frameworks = [ sdk_frameworks = [
"MapKit", "MapKit",
@@ -175,7 +171,6 @@ objc_library(
"test/*.h", "test/*.h",
"test/*.mm", "test/*.mm",
], ],
allow_empty = False,
exclude = [ exclude = [
"test/MLNOfflineStorageTests.mm", "test/MLNOfflineStorageTests.mm",
], ],
@@ -192,12 +187,7 @@ objc_library(
swift_library( swift_library(
name = "shared_tests_swift_srcs", name = "shared_tests_swift_srcs",
testonly = True, testonly = True,
srcs = glob( srcs = glob(["test/*.swift"]),
[
"test/*.swift",
],
allow_empty = False,
),
data = [ data = [
"test/amsterdam.geojson", "test/amsterdam.geojson",
"test/one-liner.json", "test/one-liner.json",

View File

@@ -10,12 +10,7 @@ configure_device_profiles()
swift_library( swift_library(
name = "uitest_srcs", name = "uitest_srcs",
testonly = True, testonly = True,
srcs = glob( srcs = glob(["*.swift"]),
[
"*.swift",
],
allow_empty = False,
),
) )
ios_ui_test( ios_ui_test(

View File

@@ -12,7 +12,6 @@ objc_library(
"*.h", "*.h",
"*.m", "*.m",
], ],
allow_empty = False,
exclude = [ exclude = [
"MLNMapViewContentInsetTests.m", "MLNMapViewContentInsetTests.m",
], ],
@@ -30,7 +29,6 @@ objc_library(
"*.mm", "*.mm",
"*.h", "*.h",
], ],
allow_empty = False,
), ),
copts = CPP_FLAGS + MAPLIBRE_FLAGS + WARNING_FLAGS["ios"], copts = CPP_FLAGS + MAPLIBRE_FLAGS + WARNING_FLAGS["ios"],
deps = [ deps = [
@@ -41,10 +39,7 @@ objc_library(
swift_library( swift_library(
name = "ios_tests_swift_srcs", name = "ios_tests_swift_srcs",
testonly = True, testonly = True,
srcs = glob( srcs = glob(["*.swift"]) + [
["*.swift"],
allow_empty = False,
) + [
"//platform/darwin:test/MLNSDKTestHelpers.swift", "//platform/darwin:test/MLNSDKTestHelpers.swift",
], ],
deps = [ deps = [

View File

@@ -8,13 +8,9 @@ objc_library(
"SMCalloutView/*.h", "SMCalloutView/*.h",
"SMCalloutView/*.m", "SMCalloutView/*.m",
], ],
allow_empty = False,
), ),
hdrs = glob( hdrs = glob(
[ ["SMCalloutView/*.h"],
"SMCalloutView/*.h",
],
allow_empty = False,
), ),
copts = WARNING_FLAGS["ios"], copts = WARNING_FLAGS["ios"],
includes = ["SMCalloutView"], includes = ["SMCalloutView"],

View File

@@ -14,13 +14,9 @@ cc_library(
cc_library( cc_library(
name = "testlib", name = "testlib",
srcs = select({ srcs = select({
"//:ios": glob( "//:ios": glob(["src/mbgl/test/*.cpp"]),
["src/mbgl/test/*.cpp"],
allow_empty = False,
),
"//conditions:default": glob( "//conditions:default": glob(
["src/mbgl/test/*.cpp"], ["src/mbgl/test/*.cpp"],
allow_empty = False,
exclude = ["src/mbgl/test/http_server.cpp"], exclude = ["src/mbgl/test/http_server.cpp"],
), ),
}) + [ }) + [
@@ -74,7 +70,6 @@ filegroup(
name = "fixtures", name = "fixtures",
srcs = glob( srcs = glob(
["fixtures/**/*"], ["fixtures/**/*"],
allow_empty = False,
), ),
visibility = [ visibility = [
"//platform/ios/test/core:__pkg__", "//platform/ios/test/core:__pkg__",

44
vendor/BUILD.bazel vendored
View File

@@ -3,7 +3,9 @@ load("//bazel:flags.bzl", "CPP_FLAGS")
# vendor/mapbox-base-files.json # vendor/mapbox-base-files.json
cc_library( cc_library(
name = "mapbox-base", 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/cheap-ruler-cpp/include/mapbox/*.hpp",
"mapbox-base/deps/geojson-vt-cpp/include/**/*.hpp", "mapbox-base/deps/geojson-vt-cpp/include/**/*.hpp",
@@ -18,10 +20,8 @@ cc_library(
"mapbox-base/extras/filesystem/include/ghc/*.hpp", "mapbox-base/extras/filesystem/include/ghc/*.hpp",
"mapbox-base/extras/kdbush.hpp/include/*.hpp", "mapbox-base/extras/kdbush.hpp/include/*.hpp",
"mapbox-base/extras/rapidjson/include/**/*.h", "mapbox-base/extras/rapidjson/include/**/*.h",
"mapbox-base/extras/args/args.hxx",
"mapbox-base/include/mapbox/**/*.hpp", "mapbox-base/include/mapbox/**/*.hpp",
], ],
allow_empty = False,
exclude = ["mapbox-base/deps/jni.hpp/include/jni/string_conversion.hpp"], exclude = ["mapbox-base/deps/jni.hpp/include/jni/string_conversion.hpp"],
), ),
copts = CPP_FLAGS, copts = CPP_FLAGS,
@@ -51,12 +51,7 @@ cc_library(
cc_library( cc_library(
name = "parsedate", name = "parsedate",
srcs = ["parsedate/parsedate.cpp"], srcs = ["parsedate/parsedate.cpp"],
hdrs = glob( hdrs = glob(["parsedate/**/*.hpp"]),
[
"parsedate/**/*.hpp",
],
allow_empty = False,
),
copts = CPP_FLAGS, copts = CPP_FLAGS,
includes = ["parsedate"], includes = ["parsedate"],
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
@@ -65,12 +60,7 @@ cc_library(
# vendor/optional # vendor/optional
cc_library( cc_library(
name = "optional", name = "optional",
hdrs = glob( hdrs = glob(["mapbox-base/deps/optional/*.hpp"]),
[
"mapbox-base/deps/optional/*.hpp",
],
allow_empty = False,
),
copts = CPP_FLAGS, copts = CPP_FLAGS,
includes = ["mapbox-base/deps/optional"], includes = ["mapbox-base/deps/optional"],
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
@@ -84,7 +74,6 @@ cc_library(
"csscolorparser/**/*.hpp", "csscolorparser/**/*.hpp",
"csscolorparser/**/*.cpp", "csscolorparser/**/*.cpp",
], ],
allow_empty = False,
), ),
copts = CPP_FLAGS, copts = CPP_FLAGS,
includes = ["csscolorparser"], includes = ["csscolorparser"],
@@ -95,10 +84,7 @@ cc_library(
# vendor/wagyu-files.json # vendor/wagyu-files.json
cc_library( cc_library(
name = "wagyu", name = "wagyu",
hdrs = glob( hdrs = glob(["wagyu/include/mapbox/geometry/wagyu/*.hpp"]),
["wagyu/include/mapbox/geometry/wagyu/*.hpp"],
allow_empty = False,
),
copts = CPP_FLAGS, copts = CPP_FLAGS,
includes = ["wagyu/include"], includes = ["wagyu/include"],
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
@@ -115,7 +101,6 @@ objc_library(
"zip-archive/SSZipArchive/minizip/*.c", "zip-archive/SSZipArchive/minizip/*.c",
"zip-archive/SSZipArchive/minizip/*.h", "zip-archive/SSZipArchive/minizip/*.h",
], ],
allow_empty = False,
), ),
defines = ["ZLIB_COMPAT"], defines = ["ZLIB_COMPAT"],
includes = ["zip-archive/SSZipArchive"], includes = ["zip-archive/SSZipArchive"],
@@ -130,7 +115,6 @@ cc_library(
"boost/include/boost/**/*.hpp", "boost/include/boost/**/*.hpp",
"boost/include/boost/**/*.h", "boost/include/boost/**/*.h",
], ],
allow_empty = False,
), ),
copts = CPP_FLAGS, copts = CPP_FLAGS,
includes = ["boost/include"], includes = ["boost/include"],
@@ -148,10 +132,7 @@ cc_library(
# vendor/protozero-files.json # vendor/protozero-files.json
cc_library( cc_library(
name = "protozero", name = "protozero",
hdrs = glob( hdrs = glob(["protozero/include/protozero/*.hpp"]),
["protozero/include/protozero/*.hpp"],
allow_empty = False,
),
copts = CPP_FLAGS, copts = CPP_FLAGS,
includes = ["protozero/include"], includes = ["protozero/include"],
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
@@ -178,10 +159,7 @@ cc_library(
# vendor/metal-cpp.json # vendor/metal-cpp.json
cc_library( cc_library(
name = "metal-cpp", name = "metal-cpp",
hdrs = glob( hdrs = glob(["metal-cpp/**/*.hpp"]),
["metal-cpp/**/*.hpp"],
allow_empty = False,
),
copts = CPP_FLAGS, copts = CPP_FLAGS,
includes = ["metal-cpp"], includes = ["metal-cpp"],
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
@@ -208,10 +186,7 @@ cc_library(
# vendor/vector-tile-files.json # vendor/vector-tile-files.json
cc_library( cc_library(
name = "vector-tile", name = "vector-tile",
hdrs = glob( hdrs = glob(["vector-tile/include/mapbox/**/*.hpp"]),
["vector-tile/include/mapbox/**/*.hpp"],
allow_empty = False,
),
copts = CPP_FLAGS, copts = CPP_FLAGS,
includes = ["vector-tile/include"], includes = ["vector-tile/include"],
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
@@ -225,7 +200,6 @@ cc_library(
"icu/src/*.cpp", "icu/src/*.cpp",
"icu/src/*.h", "icu/src/*.h",
], ],
allow_empty = False,
), ),
hdrs = glob(["icu/include/unicode/*.h"]), hdrs = glob(["icu/include/unicode/*.h"]),
copts = CPP_FLAGS + [ copts = CPP_FLAGS + [