Skip to content

Commit

Permalink
codemod: update rust_binary autocargo dependencies
Browse files Browse the repository at this point in the history
Summary:
D65716841 prefixes some libraries with `sapling-`. I missed `rust_binary`.
Update them now.

Reviewed By: zzl0

Differential Revision: D65717891

fbshipit-source-id: 50a1c05ed159a75d85ddc0edd52066c724e4fec8
  • Loading branch information
quark-zju authored and facebook-github-bot committed Nov 10, 2024
1 parent c0593a8 commit db8656e
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 36 deletions.
3 changes: 1 addition & 2 deletions eden/mononoke/tools/admin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ commit_id = { version = "0.1.0", path = "../../cmdlib/commit_id" }
content_manifest_derivation = { version = "0.1.0", path = "../../derived_data/content_manifest_derivation" }
context = { version = "0.1.0", path = "../../server/context" }
cross_repo_sync = { version = "0.1.0", path = "../../commit_rewriting/cross_repo_sync" }
dag-types = { features = ["for-tests", "serialize-abomonation"] }
deleted_manifest = { version = "0.1.0", path = "../../derived_data/deleted_manifest" }
deletion_log = { version = "0.1.0", path = "../../repo_attributes/deletion_log" }
derived_data_manager = { version = "0.1.0", path = "../../derived_data/manager" }
Expand Down Expand Up @@ -102,7 +101,7 @@ repo_factory = { version = "0.1.0", path = "../../repo_factory" }
repo_identity = { version = "0.1.0", path = "../../repo_attributes/repo_identity" }
repo_lock = { version = "0.1.0", path = "../../repo_attributes/repo_lock/repo_lock" }
sapling-dag = { version = "0.1.0", path = "../../../scm/lib/dag" }
sapling-dag-types = { version = "0.1.0", path = "../../../scm/lib/dag/dag-types" }
sapling-dag-types = { version = "0.1.0", path = "../../../scm/lib/dag/dag-types", features = ["for-tests", "serialize-abomonation"] }
serde = { version = "1.0.185", features = ["derive", "rc"] }
serde_json = { version = "1.0.132", features = ["float_roundtrip", "unbounded_depth"] }
skeleton_manifest = { version = "0.1.0", path = "../../derived_data/skeleton_manifest" }
Expand Down
31 changes: 10 additions & 21 deletions eden/mononoke/tools/admin/TARGETS
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,16 @@ rust_binary(
srcs = glob([
"src/**/*.rs",
]),
autocargo = {
"cargo_toml_config": {
"dependencies_override": {
"dependencies": {
"dag-types": {"features": [
"for-tests",
"serialize-abomonation",
]},
},
},
"extra_buck_dependencies": {
# This rule already depends on dag-lite, but it doesn't have a
# generated Cargo.toml file. Instead depend on dag and enable
# only lite features on it.
"dependencies": [
"//eden/scm/lib/dag:dag",
"//eden/scm/lib/dag/dag-types:dag-types",
],
},
},
},
autocargo = {"cargo_toml_config": {
"dependencies_override": {"dependencies": {"sapling-dag-types": {"features": [
"for-tests",
"serialize-abomonation",
]}}},
"extra_buck_dependencies": {"dependencies": [
"//eden/scm/lib/dag:dag",
"//eden/scm/lib/dag/dag-types:dag-types",
]},
}},
test_deps = [
"fbsource//third-party/rust:maplit",
"//common/rust/shed/fbinit:fbinit-tokio",
Expand Down
2 changes: 1 addition & 1 deletion eden/scm/lib/backingstore/benches/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ sapling-types = { version = "0.1.0", path = "../../types" }
tempfile = "3.8"

[features]
fb = ["configloader/fb"]
fb = ["sapling-configloader/fb"]
16 changes: 4 additions & 12 deletions eden/scm/lib/backingstore/benches/TARGETS
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,10 @@ rust_binary(
srcs = glob([
"src/**/*.rs",
]),
autocargo = {
"cargo_toml_config": {
"extra_buck_dependencies": {
"dependencies": [
"//eden/scm/lib/config/loader:configloader",
],
},
"features": {
"fb": ["configloader/fb"],
},
},
},
autocargo = {"cargo_toml_config": {
"extra_buck_dependencies": {"dependencies": ["//eden/scm/lib/config/loader:configloader"]},
"features": {"fb": ["sapling-configloader/fb"]},
}},
crate_root = "src/main.rs",
metadata = {
"buck.cfg_modifiers": [
Expand Down

0 comments on commit db8656e

Please sign in to comment.