From 32e75620b4bb71042b211b1a90b31d527bcd2812 Mon Sep 17 00:00:00 2001 From: raskad <32105367+raskad@users.noreply.github.com> Date: Fri, 14 Jun 2024 22:56:18 +0100 Subject: [PATCH] Fix boa cli history (#3875) * Fix boa cli history * Ignore dead code warning in fuzzer --- Cargo.lock | 12 ++++++++++++ cli/Cargo.toml | 2 +- tests/fuzz/fuzz_targets/common.rs | 1 + 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 994b7b8686..a27742458a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1245,6 +1245,17 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" +[[package]] +name = "fd-lock" +version = "4.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e5768da2206272c81ef0b5e951a41862938a6070da63bcea197899942d3b947" +dependencies = [ + "cfg-if", + "rustix", + "windows-sys 0.52.0", +] + [[package]] name = "fixed_decimal" version = "0.5.6" @@ -2846,6 +2857,7 @@ dependencies = [ "bitflags 2.5.0", "cfg-if", "clipboard-win", + "fd-lock", "libc", "log", "memchr", diff --git a/cli/Cargo.toml b/cli/Cargo.toml index e9310bf6d9..883a3882f2 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -16,7 +16,7 @@ boa_engine = { workspace = true, features = ["deser", "flowgraph", "trace"] } boa_parser.workspace = true boa_gc.workspace = true boa_runtime.workspace = true -rustyline = { workspace = true, features = ["derive"]} +rustyline = { workspace = true, features = ["derive", "with-file-history"] } clap = { workspace = true, features = ["derive"] } serde_json.workspace = true colored.workspace = true diff --git a/tests/fuzz/fuzz_targets/common.rs b/tests/fuzz/fuzz_targets/common.rs index 2903a6ad46..afb8162131 100644 --- a/tests/fuzz/fuzz_targets/common.rs +++ b/tests/fuzz/fuzz_targets/common.rs @@ -74,6 +74,7 @@ impl Debug for FuzzData { } } +#[allow(dead_code)] pub struct FuzzSource { pub interner: Interner, pub source: String,