Skip to content

Commit 524263c

Browse files
AndreasBackxmeta-codesync[bot]
authored andcommitted
Migrate hphp/ from Clap 3 to Clap 4
Summary: This is a Claude Code generated diff stack to migrate all existing users of Clap 3 to Clap 4. It follows CLI Foundation ["Clap 4 Migration"](https://www.internalfb.com/wiki/CLI_Foundation/Guidelines_&_How_To/Frameworks_&_Main_Libraries/Rust/Clap_4_Migration/) wiki and "clap4-migration" Claude skill based on it and the Clap changelogs. [Clap 2 and 3 have been deprecated for over 3 years.](https://fb.workplace.com/groups/clifoundation/posts/753507606006249/) They will be deleted soon and this should make it much easier for everyone to move over. Sandcastle should be green indicating that the CLI builds succesfully and any tests related should be good too. Considering there are over a hundred CLIs using Clap 2 and 3, this as good of a signal we are able of getting. If you need more signal, we highly recommend you to look into [Scrut](https://www.internalfb.com/intern/staticdocs/scrut/docs/), an end-to-end CLI testing toolkit. Though this is outside of the scope for this massive diff stack. If you want additional assurances that you can roll back. You might want to have a look at [`cli.deployer`](https://www.internalfb.com/wiki/Cli.deployer/) **Please make sure to review the diff in case of any issues. There might be some slight changes to the CLI due to the large amount of changes that have been seen in Clap over the last years. If you want to make further changes, please make a new diff rebased on this one and they can land them together.** --- Migrate 13 BUCK file(s) in hphp/ from clap-3 to clap (Clap 4). Reviewed By: dtolnay Differential Revision: D93109006 fbshipit-source-id: 268d5cf7da6bbeaad5f799968be449d275256738
1 parent 7029bde commit 524263c

11 files changed

Lines changed: 44 additions & 175 deletions

File tree

hphp/hack/src/Cargo.lock

Lines changed: 33 additions & 164 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

hphp/hack/src/asdl_to_rust/lrgen/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ path = "lrgen.rs"
1313

1414
[dependencies]
1515
cfgrammar = { version = "0.12", features = ["serde"] }
16-
clap = { version = "3.2.25", features = ["derive", "env", "regex", "unicode", "wrap_help"] }
16+
clap = { version = "4.5.42", features = ["derive", "env", "string", "unicode", "wrap_help"] }
1717
lrlex = "0.12"

hphp/hack/src/depgraph/depgraph_decompress/cargo/depgraph_decompress/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ name = "depgraph_decompress"
1212
path = "../../main.rs"
1313

1414
[dependencies]
15-
clap = { version = "3.2.25", features = ["derive", "env", "regex", "unicode", "wrap_help"] }
15+
clap = { version = "4.5.42", features = ["derive", "env", "string", "unicode", "wrap_help"] }
1616
decompress = { version = "0.0.0", path = "../../decompress" }

hphp/hack/src/depgraph/hhdg/cargo/hhdg/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ path = "../../hhdg.rs"
1313

1414
[dependencies]
1515
anyhow = "1.0.98"
16-
clap = { version = "3.2.25", features = ["derive", "env", "regex", "unicode", "wrap_help"] }
16+
clap = { version = "4.5.42", features = ["derive", "env", "string", "unicode", "wrap_help"] }
1717
depgraph_reader = { version = "0.0.0", path = "../../../cargo/depgraph_reader" }
1818
hash = { version = "0.0.0", path = "../../../../utils/hash" }
1919
human_readable_dep_map = { version = "0.0.0", path = "../../../cargo/human_readable_dep_map" }

hphp/hack/src/generate_hhi/cargo/generate_hhi/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ path = "../../generate_hhi.rs"
1313

1414
[dependencies]
1515
anyhow = "1.0.98"
16-
clap = { version = "3.2.25", features = ["derive", "env", "regex", "unicode", "wrap_help"] }
16+
clap = { version = "4.5.42", features = ["derive", "env", "string", "unicode", "wrap_help"] }
1717
generate_hhi_lib = { version = "0.0.0", path = "../generate_hhi_lib" }

hphp/hack/src/hh_manual/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ license = "MIT"
99

1010
[dependencies]
1111
anyhow = "1.0.98"
12-
clap = { version = "3.2.25", features = ["derive", "env", "regex", "unicode", "wrap_help"] }
12+
clap = { version = "4.5.42", features = ["derive", "env", "string", "unicode", "wrap_help"] }
1313
pulldown-cmark = "0.13.0"

hphp/hack/src/hh_naming_table_builder/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ path = "hh_naming_table_builder.rs"
1616

1717
[dependencies]
1818
anyhow = "1.0.98"
19-
clap = { version = "3.2.25", features = ["derive", "env", "regex", "unicode", "wrap_help"] }
19+
clap = { version = "4.5.42", features = ["derive", "env", "string", "unicode", "wrap_help"] }
2020
direct_decl_parser = { version = "0.0.0", path = "../parser/api/cargo/direct_decl_parser" }
2121
files_to_ignore = { version = "0.0.0", path = "../utils/files_to_ignore" }
2222
find_utils = { version = "0.0.0", path = "../utils/find_utils" }

hphp/hack/src/hhi/rust/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ test = false
1313
doctest = false
1414

1515
[build-dependencies]
16-
clap = { version = "3.2.25", features = ["derive", "env", "regex", "unicode", "wrap_help"] }
16+
clap = { version = "4.5.42", features = ["derive", "env", "string", "unicode", "wrap_help"] }
1717
gen_hhi_contents_lib = { version = "0.0.0", path = "cargo/gen_hhi_contents_lib" }
1818
generate_hhi_lib = { version = "0.0.0", path = "../../generate_hhi/cargo/generate_hhi_lib" }
1919
walkdir = "2.3"

hphp/hack/src/rust_to_ocaml/rust_to_ocaml/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ path = "../src/rust_to_ocaml.rs"
1414
[dependencies]
1515
anyhow = "1.0.98"
1616
attr_parser = { version = "0.0.0", path = "../attr_parser" }
17-
clap = { version = "3.2.25", features = ["derive", "env", "regex", "unicode", "wrap_help"] }
17+
clap = { version = "4.5.42", features = ["derive", "env", "string", "unicode", "wrap_help"] }
1818
convert_case = "0.10.0"
1919
derive_more = { version = "1.0.0", features = ["full"] }
2020
indexmap = { version = "2.13.0", features = ["arbitrary", "rayon", "serde"] }

hphp/hack/src/utils/ffi_cbindgen/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ path = "ffi_cbindgen.rs"
1414
[dependencies]
1515
anyhow = "1.0.98"
1616
cbindgen = "0.28.0"
17-
clap = { version = "3.2.25", features = ["derive", "env", "regex", "unicode", "wrap_help"] }
17+
clap = { version = "4.5.42", features = ["derive", "env", "string", "unicode", "wrap_help"] }

0 commit comments

Comments
 (0)