Skip to content
This repository has been archived by the owner on Nov 10, 2023. It is now read-only.

Commit

Permalink
Add visibility to configuration targets in tests
Browse files Browse the repository at this point in the history
Summary: This will be enforced later.

Reviewed By: jtorkkola

shipit-source-id: de08c23f5e
  • Loading branch information
Sergey Tyurin authored and facebook-github-bot committed Jun 17, 2019
1 parent f2f5e44 commit 7807ce2
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ platform(
"buck//config/constraints:osx",
"buck//config/constraints:x86_64",
],
visibility = [
"PUBLIC",
],
)

platform(
Expand All @@ -12,6 +15,9 @@ platform(
"buck//config/constraints:linux",
"buck//config/constraints:aarch64",
],
visibility = [
"PUBLIC",
],
)

platform(
Expand All @@ -20,13 +26,19 @@ platform(
"buck//config/constraints:arm",
"buck//config/constraints:linux",
],
visibility = [
"PUBLIC",
],
)

config_setting(
name = "osx_config",
constraint_values = [
"buck//config/constraints:osx",
],
visibility = [
"PUBLIC",
],
)

config_setting(
Expand All @@ -35,6 +47,9 @@ config_setting(
"buck//config/constraints:osx",
"buck//config/constraints:x86_64",
],
visibility = [
"PUBLIC",
],
)

config_setting(
Expand All @@ -46,6 +61,9 @@ config_setting(
values = {
"cat.file": "a",
},
visibility = [
"PUBLIC",
],
)

config_setting(
Expand All @@ -58,6 +76,9 @@ config_setting(
"cat.file": "a",
"cat.file2": "b",
},
visibility = [
"PUBLIC",
],
)

config_setting(
Expand All @@ -66,6 +87,9 @@ config_setting(
"buck//config/constraints:linux",
"buck//config/constraints:aarch64",
],
visibility = [
"PUBLIC",
],
)

config_setting(
Expand All @@ -76,6 +100,9 @@ config_setting(
values = {
"cat.file": "a",
},
visibility = [
"PUBLIC",
],
)

config_setting(
Expand All @@ -87,6 +114,9 @@ config_setting(
values = {
"cat.file": "b",
},
visibility = [
"PUBLIC",
],
)

genrule(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,19 @@ config_setting(
values = {
"cat.file": "a",
},
visibility = [
"PUBLIC",
],
)

config_setting(
name = "b",
values = {
"cat.file": "b",
},
visibility = [
"PUBLIC",
],
)

config_setting(
Expand All @@ -49,6 +55,9 @@ config_setting(
"cat.file": "b",
"cat.file2": "c",
},
visibility = [
"PUBLIC",
],
)

genrule(
Expand All @@ -70,6 +79,9 @@ config_setting(
values = {
"another.option": "c",
},
visibility = [
"PUBLIC",
],
)

genrule(
Expand All @@ -95,13 +107,19 @@ config_setting(
values = {
"java.version": "7",
},
visibility = [
"PUBLIC",
],
)

config_setting(
name = "java_version_8",
values = {
"java.version": "8",
},
visibility = [
"PUBLIC",
],
)

java_library(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,42 +1,69 @@
os_constraint_detector(
name = "os-detector",
visibility = [
"PUBLIC",
],
)

constraint_setting(
name = "os",
host_constraint_detector = ":os-detector",
visibility = [
"PUBLIC",
],
)

constraint_value(
name = "linux",
constraint_setting = ":os",
visibility = [
"PUBLIC",
],
)

constraint_value(
name = "osx",
constraint_setting = ":os",
visibility = [
"PUBLIC",
],
)

cpu_constraint_detector(
name = "cpu-detector",
visibility = [
"PUBLIC",
],
)

constraint_setting(
name = "cpu",
host_constraint_detector = ":cpu-detector",
visibility = [
"PUBLIC",
],
)

constraint_value(
name = "x86_64",
constraint_setting = ":cpu",
visibility = [
"PUBLIC",
],
)

constraint_value(
name = "aarch64",
constraint_setting = ":cpu",
visibility = [
"PUBLIC",
],
)

constraint_value(
name = "arm",
constraint_setting = ":cpu",
visibility = [
"PUBLIC",
],
)

0 comments on commit 7807ce2

Please sign in to comment.