Skip to content

Commit 8c38e9a

Browse files
diliopfacebook-github-bot
authored andcommitted
sync rusqlite features with OSS builds
Summary: `fbsource//third-party/rust:rusqlite` has the following features: https://www.internalfb.com/code/fbsource/[0a5b6cbfa91cd299242d2357db8c8d997e93124b]/third-party/rust/BUCK?lines=163714-163723 2 of these features (`bundled` and `modern_sqlite`) were missing from `third-party/rust/Cargo.toml` and thus not getting synced to all the OSS Cargo.toml files via autocargo. Since the 1.87.0 release, `dune` builds started failing with similar instances to the following error (full trace: P1827721702): ```bash (.text._ZN8rusqlite9functions61_$LT$impl$u20$rusqlite..inner_connection..InnerConnection$GT$15remove_function17h24530d63b3657513E+0xbd): undefined reference to `sqlite3_create_function_v2' # more text ``` `sqlite3_create_function_v2` and similar `sqlite3_*` functions come from `libsqlite3-sys`, an internal crate of `rusqlite`, as bindgen-generated bindings. Looking at the `bindgen.rs` files before and after this change (P1827816771) there are a ton of differences but I "think" the reason for the error before this change is owed to `bundled` generating `cargo:rustc-link-lib=static=sqlite3` vs non-`bundled` generating `cargo:rustc-link-lib=dylib=sqlite3`. There is a bunch more logic in the `build.rs` that is gated behind the `bundled` feature so could be a confluence of factors. Build is green though again, so I will leave the rest of the investigation to anyone inclined to spend more time on this. Worth also highlighting the cost of maintaining OSS bespoke builds vs the standard `buck`-based builds :( Reviewed By: dtolnay Differential Revision: D75695703 fbshipit-source-id: 4379d0ad27d7dd9d9b352711010df37bcf1d6834
1 parent 674b4bb commit 8c38e9a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ hg_util = { package = "sapling-util", version = "0.1.0", path = "../../../scm/li
2727
indicatif = { version = "0.17.6", features = ["futures", "improved_unicode", "rayon", "tokio"] }
2828
once_cell = "1.12"
2929
rand = { version = "0.8", features = ["small_rng"] }
30-
rusqlite = { version = "0.33.0", features = ["backup", "blob", "column_decltype", "functions", "limits", "serde_json"] }
30+
rusqlite = { version = "0.33.0", features = ["backup", "blob", "bundled", "column_decltype", "functions", "limits", "modern_sqlite", "serde_json"] }
3131
sapling-io = { version = "0.1.0", path = "../../../scm/lib/io" }
3232
sapling-termlogger = { version = "0.1.0", path = "../../../scm/lib/io/term/logger" }
3333
sapling-thrift-types = { version = "0.1.0", path = "../../../scm/lib/thrift-types" }

0 commit comments

Comments
 (0)