Skip to content

Commit

Permalink
Use exclude instead of excludes.
Browse files Browse the repository at this point in the history
Summary:
`excludes` has been deprecated in favor of `exclude`.

ignore-conflict-markers

Reviewed By: int3, grzmiel

Differential Revision: D7541263

fbshipit-source-id: 705cb4e6e9c7c66e0a3fa256e00e40e7d3526d5c
  • Loading branch information
ttsugriy authored and facebook-github-bot committed Apr 9, 2018
1 parent 9a1c2be commit 00490b8
Show file tree
Hide file tree
Showing 21 changed files with 143 additions and 85 deletions.
6 changes: 3 additions & 3 deletions cpp/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ fb_xplat_cxx_library(
],
headers = glob(
["*.h"],
excludes = PROVIDER_EXPORTED_HEADERS,
exclude = PROVIDER_EXPORTED_HEADERS,
),
header_namespace = "profilo",
exported_headers = PROVIDER_EXPORTED_HEADERS,
Expand All @@ -36,7 +36,7 @@ fb_xplat_cxx_library(
name = "constants",
headers = glob(
["*.h"],
excludes = CONSTS_EXPORTED_HEADERS,
exclude = CONSTS_EXPORTED_HEADERS,
),
header_namespace = "profilo",
exported_headers = CONSTS_EXPORTED_HEADERS,
Expand Down Expand Up @@ -65,7 +65,7 @@ fb_xplat_cxx_library(
],
headers = glob(
["*.h"],
excludes = PROFILO_EXPORTED_HEADERS,
exclude = PROFILO_EXPORTED_HEADERS,
),
header_namespace = "profilo",
exported_headers = PROFILO_EXPORTED_HEADERS,
Expand Down
4 changes: 2 additions & 2 deletions cpp/profiler/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def tracer_library(version):
header_namespace = "profiler",
headers = glob(
["*.h"],
excludes = exported_headers,
exclude = exported_headers,
),
reexport_all_header_dependencies = False,
soname = "libprofiloprofiler{version_num}.$(ext)".format(version_num=version_num),
Expand Down Expand Up @@ -91,7 +91,7 @@ fb_xplat_cxx_library(
],
headers = glob(
["*.h"],
excludes = PROFILER_EXPORTED_HEADERS,
exclude = PROFILER_EXPORTED_HEADERS,
),
header_namespace = "profiler",
exported_headers = PROFILER_EXPORTED_HEADERS,
Expand Down
2 changes: 1 addition & 1 deletion cpp/systemcounters/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ fb_xplat_cxx_library(
],
headers = glob(
["*.h"],
excludes = SYSTEM_COUNTERS_EXPORTED_HEADERS,
exclude = SYSTEM_COUNTERS_EXPORTED_HEADERS,
),
header_namespace = "profilo/systemcounters",
exported_headers = SYSTEM_COUNTERS_EXPORTED_HEADERS,
Expand Down
2 changes: 1 addition & 1 deletion cpp/util/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ fb_xplat_cxx_library(
]),
headers = glob(
["*.h"],
excludes = UTIL_EXPORTED_HEADERS,
exclude = UTIL_EXPORTED_HEADERS,
),
header_namespace = "util",
exported_headers = UTIL_EXPORTED_HEADERS,
Expand Down
2 changes: 1 addition & 1 deletion deps/fb/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ profilo_oss_cxx_library(
[
"**/*.cpp",
],
excludes = [
exclude = [
"jni/android/*.cpp",
],
),
Expand Down
2 changes: 1 addition & 1 deletion deps/forkjail/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ profilo_oss_cxx_library(
]),
headers = glob(
["*.h"],
excludes = FORKJAIL_EXPORTED_HEADERS,
exclude = FORKJAIL_EXPORTED_HEADERS,
),
header_namespace = "forkjail",
exported_headers = FORKJAIL_EXPORTED_HEADERS,
Expand Down
29 changes: 18 additions & 11 deletions deps/museum/5.0.0/bionic/libc/BUCK
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
def flattened_glob(prefix, glob_pattern, excludes = []):
def flattened_glob(prefix, glob_pattern, exclude = []):
prefix_len = len(prefix)
return { x[prefix_len:]: x for x in glob([prefix + glob_pattern], excludes = [prefix + e for e in excludes]) }
return { x[prefix_len:]: x for x in glob([prefix + glob_pattern], exclude = [prefix + e for e in exclude]) }

def merge_dicts(*dicts):
result = {}
Expand All @@ -9,35 +9,42 @@ def merge_dicts(*dicts):
return result

load("//buck_imports:profilo_path.bzl", "profilo_path")
load(profilo_path("deps/museum:museum_library.bzl"), "museum_library")
load(
profilo_path("deps/museum:museum_library.bzl"),
"museum_library",
)

museum_library(
exported_headers = {
exported: header for exported, header in
merge_dicts(
flattened_glob("include/", "**/*.h"),
flattened_glob("kernel/uapi/", "**/*.h", excludes = [
exported: header
for exported, header in merge_dicts(
flattened_glob("include/", "**/*.h"),
flattened_glob(
"kernel/uapi/",
"**/*.h",
exclude = [
"asm-arm/**",
"asm-arm64/**",
"asm-mips/**",
"asm-x86/**",
]),
).items()
],
),
).items()
},
exported_platform_headers = [
(
"android-armv7",
merge_dicts(
flattened_glob("kernel/uapi/asm-arm/", "**/*.h"),
flattened_glob("arch-arm/include/", "**/*.h"),
)
),
),
(
"android-x86",
merge_dicts(
flattened_glob("kernel/uapi/asm-x86/", "**/*.h"),
flattened_glob("arch-x86/include/", "**/*.h"),
)
),
),
],
extra_visibility = [
Expand Down
10 changes: 7 additions & 3 deletions deps/museum/5.0.0/external/libcxx/BUCK
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
load("//buck_imports:profilo_path.bzl", "profilo_path")
load(profilo_path("deps/museum:museum_library.bzl"), "museum_library")
load(
profilo_path("deps/museum:museum_library.bzl"),
"museum_library",
)

museum_library(
exported_headers = glob(
["**/*"],
excludes = glob(["**/*.cc"]) + [
exclude = glob(["**/*.cc"]) + [
"BUCK",
"module.modulemap",
"model.yml",
]),
],
),
museum_deps = [
"bionic/libc",
"bionic/libm",
Expand Down
29 changes: 18 additions & 11 deletions deps/museum/5.1.1/bionic/libc/BUCK
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
def flattened_glob(prefix, glob_pattern, excludes = []):
def flattened_glob(prefix, glob_pattern, exclude = []):
prefix_len = len(prefix)
return { x[prefix_len:]: x for x in glob([prefix + glob_pattern], excludes = [prefix + e for e in excludes]) }
return { x[prefix_len:]: x for x in glob([prefix + glob_pattern], exclude = [prefix + e for e in exclude]) }

def merge_dicts(*dicts):
result = {}
Expand All @@ -9,35 +9,42 @@ def merge_dicts(*dicts):
return result

load("//buck_imports:profilo_path.bzl", "profilo_path")
load(profilo_path("deps/museum:museum_library.bzl"), "museum_library")
load(
profilo_path("deps/museum:museum_library.bzl"),
"museum_library",
)

museum_library(
exported_headers = {
exported: header for exported, header in
merge_dicts(
flattened_glob("include/", "**/*.h"),
flattened_glob("kernel/uapi/", "**/*.h", excludes = [
exported: header
for exported, header in merge_dicts(
flattened_glob("include/", "**/*.h"),
flattened_glob(
"kernel/uapi/",
"**/*.h",
exclude = [
"asm-arm/**",
"asm-arm64/**",
"asm-mips/**",
"asm-x86/**",
]),
).items()
],
),
).items()
},
exported_platform_headers = [
(
"android-armv7",
merge_dicts(
flattened_glob("kernel/uapi/asm-arm/", "**/*.h"),
flattened_glob("arch-arm/include/", "**/*.h"),
)
),
),
(
"android-x86",
merge_dicts(
flattened_glob("kernel/uapi/asm-x86/", "**/*.h"),
flattened_glob("arch-x86/include/", "**/*.h"),
)
),
),
],
extra_visibility = [
Expand Down
10 changes: 7 additions & 3 deletions deps/museum/5.1.1/external/libcxx/BUCK
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
load("//buck_imports:profilo_path.bzl", "profilo_path")
load(profilo_path("deps/museum:museum_library.bzl"), "museum_library")
load(
profilo_path("deps/museum:museum_library.bzl"),
"museum_library",
)

museum_library(
exported_headers = glob(
["**/*"],
excludes = glob(["**/*.cc"]) + [
exclude = glob(["**/*.cc"]) + [
"BUCK",
"module.modulemap",
"model.yml",
]),
],
),
museum_deps = [
"bionic/libc",
"bionic/libm",
Expand Down
29 changes: 18 additions & 11 deletions deps/museum/6.0.1/bionic/libc/BUCK
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
def flattened_glob(prefix, glob_pattern, excludes = []):
def flattened_glob(prefix, glob_pattern, exclude = []):
prefix_len = len(prefix)
return { x[prefix_len:]: x for x in glob([prefix + glob_pattern], excludes = [prefix + e for e in excludes]) }
return { x[prefix_len:]: x for x in glob([prefix + glob_pattern], exclude = [prefix + e for e in exclude]) }

def merge_dicts(*dicts):
result = {}
Expand All @@ -9,35 +9,42 @@ def merge_dicts(*dicts):
return result

load("//buck_imports:profilo_path.bzl", "profilo_path")
load(profilo_path("deps/museum:museum_library.bzl"), "museum_library")
load(
profilo_path("deps/museum:museum_library.bzl"),
"museum_library",
)

museum_library(
exported_headers = {
exported: header for exported, header in
merge_dicts(
flattened_glob("include/", "**/*.h"),
flattened_glob("kernel/uapi/", "**/*.h", excludes = [
exported: header
for exported, header in merge_dicts(
flattened_glob("include/", "**/*.h"),
flattened_glob(
"kernel/uapi/",
"**/*.h",
exclude = [
"asm-arm/**",
"asm-arm64/**",
"asm-mips/**",
"asm-x86/**",
]),
).items()
],
),
).items()
},
exported_platform_headers = [
(
"android-armv7",
merge_dicts(
flattened_glob("kernel/uapi/asm-arm/", "**/*.h"),
flattened_glob("arch-arm/include/", "**/*.h"),
)
),
),
(
"android-x86",
merge_dicts(
flattened_glob("kernel/uapi/asm-x86/", "**/*.h"),
flattened_glob("arch-x86/include/", "**/*.h"),
)
),
),
],
extra_visibility = [
Expand Down
10 changes: 7 additions & 3 deletions deps/museum/6.0.1/external/libcxx/BUCK
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
load("//buck_imports:profilo_path.bzl", "profilo_path")
load(profilo_path("deps/museum:museum_library.bzl"), "museum_library")
load(
profilo_path("deps/museum:museum_library.bzl"),
"museum_library",
)

museum_library(
exported_headers = glob(
["**/*"],
excludes = glob(["**/*.cc"]) + [
exclude = glob(["**/*.cc"]) + [
"BUCK",
"module.modulemap",
"model.yml",
]),
],
),
museum_deps = [
"bionic/libc",
"bionic/libm",
Expand Down
29 changes: 18 additions & 11 deletions deps/museum/7.0.0/bionic/libc/BUCK
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
def flattened_glob(prefix, glob_pattern, excludes = []):
def flattened_glob(prefix, glob_pattern, exclude = []):
prefix_len = len(prefix)
return { x[prefix_len:]: x for x in glob([prefix + glob_pattern], excludes = [prefix + e for e in excludes]) }
return { x[prefix_len:]: x for x in glob([prefix + glob_pattern], exclude = [prefix + e for e in exclude]) }

def merge_dicts(*dicts):
result = {}
Expand All @@ -9,35 +9,42 @@ def merge_dicts(*dicts):
return result

load("//buck_imports:profilo_path.bzl", "profilo_path")
load(profilo_path("deps/museum:museum_library.bzl"), "museum_library")
load(
profilo_path("deps/museum:museum_library.bzl"),
"museum_library",
)

museum_library(
exported_headers = {
exported: header for exported, header in
merge_dicts(
flattened_glob("include/", "**/*.h"),
flattened_glob("kernel/uapi/", "**/*.h", excludes = [
exported: header
for exported, header in merge_dicts(
flattened_glob("include/", "**/*.h"),
flattened_glob(
"kernel/uapi/",
"**/*.h",
exclude = [
"asm-arm/**",
"asm-arm64/**",
"asm-mips/**",
"asm-x86/**",
]),
).items()
],
),
).items()
},
exported_platform_headers = [
(
"android-armv7",
merge_dicts(
flattened_glob("kernel/uapi/asm-arm/", "**/*.h"),
flattened_glob("arch-arm/include/", "**/*.h"),
)
),
),
(
"android-x86",
merge_dicts(
flattened_glob("kernel/uapi/asm-x86/", "**/*.h"),
flattened_glob("arch-x86/include/", "**/*.h"),
)
),
),
],
extra_visibility = [
Expand Down
Loading

0 comments on commit 00490b8

Please sign in to comment.