Skip to content

Commit d9dc76f

Browse files
kkolur76meta-codesync[bot]
authored andcommitted
Replace os_deps with selects in deps field [8 / ?]
Summary: Replace os_deps with select() in the deps field for 16 files with 19 os_deps occurrences. Files modified: - common/rust/user/BUCK (1 os_deps) - common/rust/windows/winsvc/BUCK (1 os_deps) - configerator/distribution/common/BUCK (1 os_deps) - eden/common/utils/BUCK (2 os_deps) - eden/fs/benchmarks/BUCK (1 os_deps) - eden/fs/cli/BUCK (2 os_deps) - eden/fs/cli_rs/BUCK (2 os_deps) - eden/fs/cli_rs/edenfs-client/BUCK (1 os_deps) - eden/fs/cli_rs/edenfs-commands/BUCK (1 os_deps) - eden/fs/cli_rs/edenfs-utils/BUCK (1 os_deps) - eden/fs/cli_rs/edenfsctl/BUCK (1 os_deps) - eden/fs/config/facebook/config_manager_rs/BUCK (1 os_deps) - eden/scm/lib/config/loader/BUCK (1 os_deps) - eden/scm/lib/fsinfo/BUCK (1 os_deps) - eden/scm/lib/procinfo/BUCK (1 os_deps) - eden/scm/lib/spawn-ext/BUCK (1 os_deps) Reviewed By: mzlee Differential Revision: D92190637 fbshipit-source-id: 477e601f84d07ef1473fe94dfec40baee22d66a6
1 parent 36d0ded commit d9dc76f

15 files changed

Lines changed: 652 additions & 227 deletions

File tree

eden/fs/benchmarks/BUCK

Lines changed: 38 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,30 +7,47 @@ oncall("scm_client_infra")
77
rust_binary(
88
name = "benchmarks",
99
srcs = ["benchmarks.rs"],
10-
os_deps = [
11-
(
12-
"linux",
13-
[
14-
"fbsource//third-party/rust:libc",
15-
],
16-
),
17-
(
18-
"macos",
19-
[
20-
"fbsource//third-party/rust:libc",
21-
],
22-
),
23-
(
24-
"windows",
25-
[
26-
"fbsource//third-party/rust:winapi",
27-
],
28-
),
29-
],
10+
autocargo = {"cargo_toml_config": {"dependencies_override": {
11+
"dependencies": {
12+
"criterion": {
13+
"features": [
14+
"async_tokio",
15+
"csv_output",
16+
],
17+
"version": "0.5.1",
18+
},
19+
"rand": {
20+
"features": ["small_rng"],
21+
"version": "0.9",
22+
},
23+
},
24+
"target": {
25+
"'cfg(target_os = \"linux\")'": {"dependencies": {"libc": {"version": "0.2.139"}}},
26+
"'cfg(target_os = \"macos\")'": {"dependencies": {"libc": {"version": "0.2.139"}}},
27+
"'cfg(target_os = \"windows\")'": {"dependencies": {"winapi": {
28+
"features": [
29+
"everything",
30+
"std",
31+
],
32+
"version": "0.3",
33+
}}},
34+
},
35+
}}},
3036
deps = [
3137
"fbsource//third-party/rust:criterion",
3238
"fbsource//third-party/rust:rand",
33-
],
39+
] + select({
40+
"DEFAULT": [],
41+
"ovr_config//os:linux": [
42+
"fbsource//third-party/rust:libc",
43+
],
44+
"ovr_config//os:macos": [
45+
"fbsource//third-party/rust:libc",
46+
],
47+
"ovr_config//os:windows": [
48+
"fbsource//third-party/rust:winapi",
49+
],
50+
}),
3451
)
3552

3653
cpp_binary(

eden/fs/cli/BUCK

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -165,14 +165,6 @@ python_library(
165165
"util.py",
166166
"win_ui.py",
167167
],
168-
os_deps = [
169-
(
170-
"linux",
171-
[
172-
"//eden/fs/cli/facebook:telemetry",
173-
],
174-
),
175-
],
176168
deps = [
177169
"fbsource//third-party/pypi/filelock:filelock",
178170
"fbsource//third-party/pypi/psutil:psutil",
@@ -194,7 +186,12 @@ python_library(
194186
"//thrift/lib/py:server_base",
195187
"//thrift/lib/py/util:inspect",
196188
"//thrift/lib/py/util:py_util",
197-
],
189+
] + select({
190+
"DEFAULT": [],
191+
"ovr_config//os:linux": [
192+
"//eden/fs/cli/facebook:telemetry",
193+
],
194+
}),
198195
)
199196

200197
python_library(
@@ -203,15 +200,14 @@ python_library(
203200
"proc_utils.py",
204201
"proc_utils_win.py",
205202
],
206-
os_deps = [
207-
(
208-
"linux",
209-
["//common/base/pid_info/py:build_info_lib"],
210-
),
211-
],
212203
deps = [
213204
"//eden/fs/py/eden/thrift:legacy",
214-
],
205+
] + select({
206+
"DEFAULT": [],
207+
"ovr_config//os:linux": [
208+
"//common/base/pid_info/py:build_info_lib",
209+
],
210+
}),
215211
)
216212

217213
python_library(

eden/fs/cli_rs/BUCK

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,18 @@ rust_binary(
1111
"ignore_rule": True,
1212
},
1313
crate_root = "facebook/edenfsctl.rs",
14-
os_deps = [
15-
(
16-
"linux",
17-
["fbsource//third-party/rust:whoami"],
18-
),
19-
],
2014
resources = {
2115
"edenfsctl": "//eden/fs/cli_rs/edenfsctl:edenfsctl",
2216
"edenfsctl_python": "//eden/fs/cli:edenfsctl",
2317
},
2418
deps = [
2519
"fbsource//third-party/rust:buck-resources",
26-
],
20+
] + select({
21+
"DEFAULT": [],
22+
"ovr_config//os:linux": [
23+
"fbsource//third-party/rust:whoami",
24+
],
25+
}),
2726
)
2827

2928
rust_binary(
@@ -37,20 +36,19 @@ rust_binary(
3736
"ovr_config//os:macos",
3837
],
3938
crate_root = "facebook/edenfsctl.rs",
40-
os_deps = [
41-
(
42-
"linux",
43-
["fbsource//third-party/rust:whoami"],
44-
),
45-
],
4639
resources = {
4740
"edenfsctl": "//eden/fs/cli_rs/edenfsctl:edenfsctl",
4841
"edenfsctl_python": "//eden/fs/cli:edenfsctl",
4942
},
5043
deps = [
5144
"fbsource//third-party/rust:buck-resources",
5245
"//eden/fs/privhelper:privhelper",
53-
],
46+
] + select({
47+
"DEFAULT": [],
48+
"ovr_config//os:linux": [
49+
"fbsource//third-party/rust:whoami",
50+
],
51+
}),
5452
)
5553

5654
# Similar to the Python version of this alias

eden/fs/cli_rs/edenfs-client/BUCK

Lines changed: 123 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,123 @@ oncall("scm_client_infra")
55
rust_library(
66
name = "edenfs-client",
77
srcs = glob(["src/**/*.rs"]),
8+
autocargo = {"cargo_toml_config": {"dependencies_override": {
9+
"dependencies": {
10+
"anyhow": {"version": "1.0.98"},
11+
"async-recursion": {"version": "1.1.1"},
12+
"async-trait": {"version": "0.1.86"},
13+
"byteorder": {"version": "1.5"},
14+
"dirs": {"version": "6.0"},
15+
"dunce": {"version": "1.0.5"},
16+
"edenfs-config": {"path": "../edenfs-config"},
17+
"edenfs-error": {"path": "../edenfs-error"},
18+
"edenfs-utils": {"path": "../edenfs-utils"},
19+
"fbinit": {"path": "../../../../common/rust/shed/fbinit"},
20+
"futures": {
21+
"features": [
22+
"async-await",
23+
"compat",
24+
],
25+
"version": "0.3.31",
26+
},
27+
"futures_stats": {"path": "../../../../common/rust/shed/futures_stats"},
28+
"hex": {
29+
"features": ["alloc"],
30+
"version": "0.4.3",
31+
},
32+
"hg_util": {
33+
"package": "sapling-util",
34+
"path": "../../../scm/lib/util",
35+
},
36+
"lazy_static": {"version": "1.5"},
37+
"libc": {"version": "0.2.139"},
38+
"parking_lot": {
39+
"features": ["send_guard"],
40+
"version": "0.12.1",
41+
},
42+
"pathdiff": {"version": "0.2"},
43+
"rand": {
44+
"features": ["small_rng"],
45+
"version": "0.9",
46+
},
47+
"rayon": {"version": "1.11.0"},
48+
"regex": {"version": "1.12.2"},
49+
"sapling-atomicfile": {"path": "../../../scm/lib/atomicfile"},
50+
"sapling-config-remote-loader": {"path": "../../../scm/lib/config/remote-loader"},
51+
"sapling-http-client": {"path": "../../../scm/lib/http-client"},
52+
"sapling-thrift-types": {"path": "../../../scm/lib/thrift-types"},
53+
"serde": {
54+
"features": [
55+
"derive",
56+
"rc",
57+
],
58+
"version": "1.0.219",
59+
},
60+
"serde_json": {
61+
"features": [
62+
"alloc",
63+
"float_roundtrip",
64+
"raw_value",
65+
"unbounded_depth",
66+
],
67+
"version": "1.0.140",
68+
},
69+
"shlex": {"version": "1.3"},
70+
"strum": {
71+
"features": ["derive"],
72+
"version": "0.27.1",
73+
},
74+
"subprocess": {"version": "0.2.15"},
75+
"sysinfo": {"version": "0.35.1"},
76+
"thrift_streaming_clients": {"path": "../../service/thrift_streaming/clients"},
77+
"tokio": {
78+
"features": [
79+
"full",
80+
"test-util",
81+
"tracing",
82+
],
83+
"version": "1.47.1",
84+
},
85+
"toml": {
86+
"features": ["preserve_order"],
87+
"version": "0.9.11",
88+
},
89+
"tracing": {
90+
"features": [
91+
"attributes",
92+
"valuable",
93+
],
94+
"version": "0.1.41",
95+
},
96+
"uuid": {
97+
"features": [
98+
"rng-getrandom",
99+
"serde",
100+
"v4",
101+
"v5",
102+
"v6",
103+
"v7",
104+
"v8",
105+
],
106+
"version": "1.17",
107+
},
108+
"whoami": {"version": "1.5"},
109+
},
110+
"dev-dependencies": {
111+
"fb303_core_clients": {"path": "../../../../fb303/thrift/rust/clients"},
112+
"fbinit-tokio": {"path": "../../../../common/rust/shed/fbinit/fbinit-tokio"},
113+
"mockall": {"version": "0.13.1"},
114+
"serde_test": {"version": "1.0.167"},
115+
"tempfile": {"version": "3.22"},
116+
},
117+
"target": {
118+
"'cfg(target_os = \"macos\")'": {"dependencies": {"psutil": {"version": "3.2.2"}}},
119+
"'cfg(target_os = \"windows\")'": {"dependencies": {"mkscratch": {"path": "../../../scm/exec/scratch"}}},
120+
},
121+
}}},
8122
named_deps = {
9123
"hg_util": "//eden/scm/lib/util:util",
10124
},
11-
os_deps = [
12-
(
13-
"windows",
14-
[
15-
"//eden/scm/exec/scratch:mkscratch",
16-
],
17-
),
18-
(
19-
"macos",
20-
[
21-
"fbsource//third-party/rust:psutil",
22-
],
23-
),
24-
],
25125
test_deps = [
26126
"fbsource//third-party/rust:mockall",
27127
"fbsource//third-party/rust:rand",
@@ -72,5 +172,13 @@ rust_library(
72172
"//eden/scm/lib/config/remote-loader:remote-loader",
73173
"//eden/scm/lib/http-client:http-client",
74174
"//eden/scm/lib/thrift-types:thrift-types",
75-
],
175+
] + select({
176+
"DEFAULT": [],
177+
"ovr_config//os:macos": [
178+
"fbsource//third-party/rust:psutil",
179+
],
180+
"ovr_config//os:windows": [
181+
"//eden/scm/exec/scratch:mkscratch",
182+
],
183+
}),
76184
)

eden/fs/cli_rs/edenfs-client/Cargo.toml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ async-trait = "0.1.86"
1414
byteorder = "1.5"
1515
dirs = "6.0"
1616
dunce = "1.0.5"
17-
edenfs-config = { version = "0.1.0", path = "../edenfs-config" }
18-
edenfs-error = { version = "0.1.0", path = "../edenfs-error" }
19-
edenfs-utils = { version = "0.1.0", path = "../edenfs-utils" }
20-
fbinit = { version = "0.2.0", git = "https://github.com/facebookexperimental/rust-shed.git", branch = "main" }
17+
edenfs-config = { path = "../edenfs-config" }
18+
edenfs-error = { path = "../edenfs-error" }
19+
edenfs-utils = { path = "../edenfs-utils" }
20+
fbinit = { path = "../../../../common/rust/shed/fbinit" }
2121
futures = { version = "0.3.31", features = ["async-await", "compat"] }
22-
futures_stats = { version = "0.1.0", git = "https://github.com/facebookexperimental/rust-shed.git", branch = "main" }
22+
futures_stats = { path = "../../../../common/rust/shed/futures_stats" }
2323
hex = { version = "0.4.3", features = ["alloc"] }
2424
hg_util = { package = "sapling-util", version = "0.1.0", path = "../../../scm/lib/util" }
2525
lazy_static = "1.5"
@@ -29,26 +29,26 @@ pathdiff = "0.2"
2929
rand = { version = "0.9", features = ["small_rng"] }
3030
rayon = "1.11.0"
3131
regex = "1.12.2"
32-
sapling-atomicfile = { version = "0.1.0", path = "../../../scm/lib/atomicfile" }
33-
sapling-config-remote-loader = { version = "0.1.0", path = "../../../scm/lib/config/remote-loader" }
34-
sapling-http-client = { version = "0.1.0", path = "../../../scm/lib/http-client" }
35-
sapling-thrift-types = { version = "0.1.0", path = "../../../scm/lib/thrift-types" }
32+
sapling-atomicfile = { path = "../../../scm/lib/atomicfile" }
33+
sapling-config-remote-loader = { path = "../../../scm/lib/config/remote-loader" }
34+
sapling-http-client = { path = "../../../scm/lib/http-client" }
35+
sapling-thrift-types = { path = "../../../scm/lib/thrift-types" }
3636
serde = { version = "1.0.219", features = ["derive", "rc"] }
3737
serde_json = { version = "1.0.140", features = ["alloc", "float_roundtrip", "raw_value", "unbounded_depth"] }
3838
shlex = "1.3"
3939
strum = { version = "0.27.1", features = ["derive"] }
4040
subprocess = "0.2.15"
4141
sysinfo = "0.35.1"
42-
thrift_streaming_clients = { version = "0.1.0", path = "../../service/thrift_streaming/clients" }
42+
thrift_streaming_clients = { path = "../../service/thrift_streaming/clients" }
4343
tokio = { version = "1.47.1", features = ["full", "test-util", "tracing"] }
4444
toml = { version = "0.9.11", features = ["preserve_order"] }
4545
tracing = { version = "0.1.41", features = ["attributes", "valuable"] }
4646
uuid = { version = "1.17", features = ["rng-getrandom", "serde", "v4", "v5", "v6", "v7", "v8"] }
4747
whoami = "1.5"
4848

4949
[dev-dependencies]
50-
fb303_core_clients = { version = "0.0.0", git = "https://github.com/facebook/fb303.git", branch = "main" }
51-
fbinit-tokio = { version = "0.1.2", git = "https://github.com/facebookexperimental/rust-shed.git", branch = "main" }
50+
fb303_core_clients = { version = "0.0.0", path = "../../../../fb303/thrift/rust/clients", git = "https://github.com/facebook/fb303.git", branch = "main" }
51+
fbinit-tokio = { version = "0.1.2", path = "../../../../common/rust/shed/fbinit/fbinit-tokio", git = "https://github.com/facebookexperimental/rust-shed.git", branch = "main" }
5252
mockall = "0.13.1"
5353
serde_test = "1.0.167"
5454
tempfile = "3.22"
@@ -57,4 +57,4 @@ tempfile = "3.22"
5757
psutil = "3.2.2"
5858

5959
[target.'cfg(target_os = "windows")'.dependencies]
60-
mkscratch = { version = "0.1.0", path = "../../../scm/exec/scratch" }
60+
mkscratch = { path = "../../../scm/exec/scratch" }

0 commit comments

Comments
 (0)