From 5f5b56a0d3535c39082a3c7c778f5384ef0b1583 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Tue, 28 Nov 2023 15:53:02 -0800 Subject: [PATCH] Update proc-macro2 to 1.0.70 Summary: This release includes a fix to `proc_macro2::Ident::new` to report invalid input at the call site using #[track_caller], instead of inside proc-macro2 code. This affects LLVM staging (which is LLVM 18) because old bindgen (<0.62.0) is incompatible with Clang 16+, manifesting as panicks in `Ident::new`. See {D40685340}. **Before:** ``` Action failed: fbsource//third-party/rust:loopdev-0.4.0-build-script-run (buildscript) thread 'main' panicked at '"enum_(unnamed_at_/usr/include/linux/loop_h_21_1)" is not a valid Ident', third-party/rust/vendor/proc-macro2-1.0.69/src/fallback.rs:817:9 Action failed: fbsource//third-party/rust:virt-sys-0.1.0-build-script-run (buildscript) thread 'main' panicked at '"_virTypedParameter_union_(unnamed_at___/__/__/__/__/__/fbcode/ca3f1b68f56b9220/third-party-buck/platform010/build/libvirt/__include__/include/include/libvirt/libvirt-common_h_206_5)" is not a valid Ident', third-party/rust/vendor/proc-macro2-1.0.69/src/fallback.rs:817:9 ``` **After:** ``` Action failed: fbsource//third-party/rust:loopdev-0.4.0-build-script-run (buildscript) thread 'main' panicked at '"enum_(unnamed_at_/usr/include/linux/loop_h_21_1)" is not a valid Ident', third-party/rust/vendor/bindgen-0.59.2/src/ir/context.rs:878:9 Action failed: fbsource//third-party/rust:virt-sys-0.1.0-build-script-run (buildscript) thread 'main' panicked at '"_virTypedParameter_union_(unnamed_at___/__/__/__/__/__/fbcode/ca3f1b68f56b9220/third-party-buck/platform010/build/libvirt/__include__/include/include/libvirt/libvirt-common_h_206_5)" is not a valid Ident', third-party/rust/vendor/bindgen-0.59.2/src/ir/context.rs:878:9 ``` Of course, that panic still needs to be fixed properly. I will pursue that next. But at least the location of the faulty code is reported correctly. Reviewed By: zertosh Differential Revision: D51633230 fbshipit-source-id: db9794ed4ea70f773925bdaf9a11de289d2aa25c --- hphp/hack/src/Cargo.lock | 4 ++-- .../print_opcode/cargo/print_opcode_impl/Cargo.toml | 2 +- hphp/hack/src/hackc/cargo/assemble_opcode_macro/Cargo.toml | 2 +- hphp/hack/src/hackc/cargo/parse_macro/Cargo.toml | 2 +- hphp/hack/src/hackc/hhbc/cargo/emit_opcodes/Cargo.toml | 2 +- hphp/hack/src/hackc/ir/cargo/parse_macro/Cargo.toml | 2 +- .../src/hackc/ir/conversions/bc_to_ir/b2i_macros/Cargo.toml | 2 +- .../src/hackc/ir/conversions/textual/cargo/macros/Cargo.toml | 2 +- hphp/hack/src/hackc/ir/macros/Cargo.toml | 2 +- hphp/hack/src/hh_codegen/Cargo.toml | 2 +- hphp/hack/src/utils/eq_modulo_pos_derive/Cargo.toml | 2 +- .../src/utils/hack_macros/cargo/hack_macros_impl/Cargo.toml | 2 +- hphp/hack/src/utils/no_pos_hash/derive/Cargo.toml | 2 +- hphp/hack/src/utils/test/macro_test_util/Cargo.toml | 2 +- hphp/hack/src/utils/write_bytes/write_bytes-macro/Cargo.toml | 2 +- 15 files changed, 16 insertions(+), 16 deletions(-) diff --git a/hphp/hack/src/Cargo.lock b/hphp/hack/src/Cargo.lock index 2b36467b9440f..ef263ec5297eb 100644 --- a/hphp/hack/src/Cargo.lock +++ b/hphp/hack/src/Cargo.lock @@ -4041,9 +4041,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.69" +version = "1.0.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" +checksum = "39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b" dependencies = [ "unicode-ident", ] diff --git a/hphp/hack/src/hackc/bytecode_printer/print_opcode/cargo/print_opcode_impl/Cargo.toml b/hphp/hack/src/hackc/bytecode_printer/print_opcode/cargo/print_opcode_impl/Cargo.toml index 466b929c19630..79c52841ca041 100644 --- a/hphp/hack/src/hackc/bytecode_printer/print_opcode/cargo/print_opcode_impl/Cargo.toml +++ b/hphp/hack/src/hackc/bytecode_printer/print_opcode/cargo/print_opcode_impl/Cargo.toml @@ -12,7 +12,7 @@ path = "../../print_opcode_impl.rs" convert_case = "0.4.0" hash = { version = "0.0.0", path = "../../../../../utils/hash" } hhbc-gen = { version = "0.0.0", path = "../../../../../../../tools/hhbc-gen" } -proc-macro2 = { version = "1.0.64", features = ["span-locations"] } +proc-macro2 = { version = "1.0.70", features = ["span-locations"] } quote = "1.0.29" syn = { version = "1.0.109", features = ["extra-traits", "fold", "full", "visit", "visit-mut"] } diff --git a/hphp/hack/src/hackc/cargo/assemble_opcode_macro/Cargo.toml b/hphp/hack/src/hackc/cargo/assemble_opcode_macro/Cargo.toml index 9396081ba9cdc..76b542bedb7ab 100644 --- a/hphp/hack/src/hackc/cargo/assemble_opcode_macro/Cargo.toml +++ b/hphp/hack/src/hackc/cargo/assemble_opcode_macro/Cargo.toml @@ -14,6 +14,6 @@ proc-macro = true [dependencies] hhbc-gen = { version = "0.0.0", path = "../../../../../tools/hhbc-gen" } itertools = "0.11.0" -proc-macro2 = { version = "1.0.64", features = ["span-locations"] } +proc-macro2 = { version = "1.0.70", features = ["span-locations"] } quote = "1.0.29" syn = { version = "1.0.109", features = ["extra-traits", "fold", "full", "visit", "visit-mut"] } diff --git a/hphp/hack/src/hackc/cargo/parse_macro/Cargo.toml b/hphp/hack/src/hackc/cargo/parse_macro/Cargo.toml index 31f450e7ca124..c939cc527605c 100644 --- a/hphp/hack/src/hackc/cargo/parse_macro/Cargo.toml +++ b/hphp/hack/src/hackc/cargo/parse_macro/Cargo.toml @@ -13,5 +13,5 @@ proc-macro = true [dependencies] proc-macro-error = "1.0" -proc-macro2 = { version = "1.0.64", features = ["span-locations"] } +proc-macro2 = { version = "1.0.70", features = ["span-locations"] } quote = "1.0.29" diff --git a/hphp/hack/src/hackc/hhbc/cargo/emit_opcodes/Cargo.toml b/hphp/hack/src/hackc/hhbc/cargo/emit_opcodes/Cargo.toml index 8131392816c37..8ea724ed3f2c5 100644 --- a/hphp/hack/src/hackc/hhbc/cargo/emit_opcodes/Cargo.toml +++ b/hphp/hack/src/hackc/hhbc/cargo/emit_opcodes/Cargo.toml @@ -11,7 +11,7 @@ path = "../../emit_opcodes.rs" [dependencies] convert_case = "0.4.0" hhbc-gen = { version = "0.0.0", path = "../../../../../../tools/hhbc-gen" } -proc-macro2 = { version = "1.0.64", features = ["span-locations"] } +proc-macro2 = { version = "1.0.70", features = ["span-locations"] } quote = "1.0.29" syn = { version = "1.0.109", features = ["extra-traits", "fold", "full", "visit", "visit-mut"] } diff --git a/hphp/hack/src/hackc/ir/cargo/parse_macro/Cargo.toml b/hphp/hack/src/hackc/ir/cargo/parse_macro/Cargo.toml index bf292de6d13d0..7137f0eeb85ae 100644 --- a/hphp/hack/src/hackc/ir/cargo/parse_macro/Cargo.toml +++ b/hphp/hack/src/hackc/ir/cargo/parse_macro/Cargo.toml @@ -13,7 +13,7 @@ proc-macro = true [dependencies] proc-macro-error = "1.0" -proc-macro2 = { version = "1.0.64", features = ["span-locations"] } +proc-macro2 = { version = "1.0.70", features = ["span-locations"] } quote = "1.0.29" [dev-dependencies] diff --git a/hphp/hack/src/hackc/ir/conversions/bc_to_ir/b2i_macros/Cargo.toml b/hphp/hack/src/hackc/ir/conversions/bc_to_ir/b2i_macros/Cargo.toml index b9ea6b158033f..91a59db7ff786 100644 --- a/hphp/hack/src/hackc/ir/conversions/bc_to_ir/b2i_macros/Cargo.toml +++ b/hphp/hack/src/hackc/ir/conversions/bc_to_ir/b2i_macros/Cargo.toml @@ -13,6 +13,6 @@ proc-macro = true [dependencies] hhbc-gen = { version = "0.0.0", path = "../../../../../../../tools/hhbc-gen" } -proc-macro2 = { version = "1.0.64", features = ["span-locations"] } +proc-macro2 = { version = "1.0.70", features = ["span-locations"] } quote = "1.0.29" syn = { version = "1.0.109", features = ["extra-traits", "fold", "full", "visit", "visit-mut"] } diff --git a/hphp/hack/src/hackc/ir/conversions/textual/cargo/macros/Cargo.toml b/hphp/hack/src/hackc/ir/conversions/textual/cargo/macros/Cargo.toml index 13960eae862d8..79c966e0c4b73 100644 --- a/hphp/hack/src/hackc/ir/conversions/textual/cargo/macros/Cargo.toml +++ b/hphp/hack/src/hackc/ir/conversions/textual/cargo/macros/Cargo.toml @@ -14,6 +14,6 @@ proc-macro = true [dependencies] itertools = "0.11.0" proc-macro-error = "1.0" -proc-macro2 = { version = "1.0.64", features = ["span-locations"] } +proc-macro2 = { version = "1.0.70", features = ["span-locations"] } quote = "1.0.29" syn = { version = "1.0.109", features = ["extra-traits", "fold", "full", "visit", "visit-mut"] } diff --git a/hphp/hack/src/hackc/ir/macros/Cargo.toml b/hphp/hack/src/hackc/ir/macros/Cargo.toml index d6a393472c14d..6b6f7a4bfa6f8 100644 --- a/hphp/hack/src/hackc/ir/macros/Cargo.toml +++ b/hphp/hack/src/hackc/ir/macros/Cargo.toml @@ -12,6 +12,6 @@ doctest = false proc-macro = true [dependencies] -proc-macro2 = { version = "1.0.64", features = ["span-locations"] } +proc-macro2 = { version = "1.0.70", features = ["span-locations"] } quote = "1.0.29" syn = { version = "1.0.109", features = ["extra-traits", "fold", "full", "visit", "visit-mut"] } diff --git a/hphp/hack/src/hh_codegen/Cargo.toml b/hphp/hack/src/hh_codegen/Cargo.toml index 899cd9a952e34..65520daca1596 100644 --- a/hphp/hack/src/hh_codegen/Cargo.toml +++ b/hphp/hack/src/hh_codegen/Cargo.toml @@ -13,7 +13,7 @@ path = "hh_codegen.rs" anyhow = "=1.0.72" clap = { version = "4.4.7", features = ["derive", "env", "string", "unicode", "wrap_help"] } hash = { version = "0.0.0", path = "../utils/hash" } -proc-macro2 = { version = "1.0.64", features = ["span-locations"] } +proc-macro2 = { version = "1.0.70", features = ["span-locations"] } quote = "1.0.29" signed_source = { version = "0.0.0", path = "../utils/rust/signed_source" } syn = { version = "1.0.109", features = ["extra-traits", "fold", "full", "visit", "visit-mut"] } diff --git a/hphp/hack/src/utils/eq_modulo_pos_derive/Cargo.toml b/hphp/hack/src/utils/eq_modulo_pos_derive/Cargo.toml index 3fb8e27cbf506..12f77733b0412 100644 --- a/hphp/hack/src/utils/eq_modulo_pos_derive/Cargo.toml +++ b/hphp/hack/src/utils/eq_modulo_pos_derive/Cargo.toml @@ -12,6 +12,6 @@ doctest = false proc-macro = true [dependencies] -proc-macro2 = { version = "1.0.64", features = ["span-locations"] } +proc-macro2 = { version = "1.0.70", features = ["span-locations"] } quote = "1.0.29" synstructure = "0.12" diff --git a/hphp/hack/src/utils/hack_macros/cargo/hack_macros_impl/Cargo.toml b/hphp/hack/src/utils/hack_macros/cargo/hack_macros_impl/Cargo.toml index a15536622a5c2..8ee5bb551183a 100644 --- a/hphp/hack/src/utils/hack_macros/cargo/hack_macros_impl/Cargo.toml +++ b/hphp/hack/src/utils/hack_macros/cargo/hack_macros_impl/Cargo.toml @@ -16,7 +16,7 @@ aast_parser = { version = "0.0.0", path = "../../../../parser/cargo/aast_parser" naming_special_names_rust = { version = "0.0.0", path = "../../../../naming" } oxidized = { version = "0.0.0", path = "../../../../oxidized" } parser_core_types = { version = "0.0.0", path = "../../../../parser/cargo/core_types" } -proc-macro2 = { version = "1.0.64", features = ["span-locations"] } +proc-macro2 = { version = "1.0.70", features = ["span-locations"] } quote = "1.0.29" regex = "1.9.2" relative_path = { version = "0.0.0", path = "../../../rust/relative_path" } diff --git a/hphp/hack/src/utils/no_pos_hash/derive/Cargo.toml b/hphp/hack/src/utils/no_pos_hash/derive/Cargo.toml index 08f5ae0e987ad..2e4ac3e010c46 100644 --- a/hphp/hack/src/utils/no_pos_hash/derive/Cargo.toml +++ b/hphp/hack/src/utils/no_pos_hash/derive/Cargo.toml @@ -12,7 +12,7 @@ doctest = false proc-macro = true [dependencies] -proc-macro2 = { version = "1.0.64", features = ["span-locations"] } +proc-macro2 = { version = "1.0.70", features = ["span-locations"] } quote = "1.0.29" syn = { version = "1.0.109", features = ["extra-traits", "fold", "full", "visit", "visit-mut"] } synstructure = "0.12" diff --git a/hphp/hack/src/utils/test/macro_test_util/Cargo.toml b/hphp/hack/src/utils/test/macro_test_util/Cargo.toml index 179895f9b9f88..c7a25426f4fdb 100644 --- a/hphp/hack/src/utils/test/macro_test_util/Cargo.toml +++ b/hphp/hack/src/utils/test/macro_test_util/Cargo.toml @@ -9,4 +9,4 @@ edition = "2021" path = "../macro_test_util.rs" [dependencies] -proc-macro2 = { version = "1.0.64", features = ["span-locations"] } +proc-macro2 = { version = "1.0.70", features = ["span-locations"] } diff --git a/hphp/hack/src/utils/write_bytes/write_bytes-macro/Cargo.toml b/hphp/hack/src/utils/write_bytes/write_bytes-macro/Cargo.toml index 9db9906cdde90..3ca0daad9eca0 100644 --- a/hphp/hack/src/utils/write_bytes/write_bytes-macro/Cargo.toml +++ b/hphp/hack/src/utils/write_bytes/write_bytes-macro/Cargo.toml @@ -12,6 +12,6 @@ doctest = false proc-macro = true [dependencies] -proc-macro2 = { version = "1.0.64", features = ["span-locations"] } +proc-macro2 = { version = "1.0.70", features = ["span-locations"] } quote = "1.0.29" syn = { version = "1.0.109", features = ["extra-traits", "fold", "full", "visit", "visit-mut"] }