Skip to content

Commit 4c13fd4

Browse files
committed
bump dependencies
1 parent efa979b commit 4c13fd4

35 files changed

Lines changed: 1385 additions & 916 deletions

File tree

Cargo.lock

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

cli/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ stress_gc = ["dash_vm/stress_gc"]
1010
[dependencies]
1111
dash_node_impl = { path = "../crates/dash_node_impl", optional = true }
1212
anyhow = "1.0"
13-
clap = { version = "3.0.0", features = ["std"], default-features = false }
14-
rustyline = "9.1.2"
13+
clap = { version = "4.5.0", features = ["std"], default-features = false }
14+
rustyline = "15.0.0"
1515
tokio = { version = "1.24.0", features = ["full"] }
1616
dash_rt = { path = "../crates/dash_rt", features = ["random"] }
1717
dash_lexer = { path = "../crates/dash_lexer" }
@@ -31,4 +31,4 @@ dash_rt_modules = { path = "../crates/dash_rt_modules", features = [
3131
] }
3232
tracing-subscriber = "0.3.15"
3333
tracing = "0.1.36"
34-
colorful = "0.2.1"
34+
owo-colors = "4.2.0"

cli/src/cmd/dump.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use std::io::Write;
22
use std::{fs, io};
33

4-
use anyhow::{Context, anyhow};
4+
use anyhow::anyhow;
55
use clap::ArgMatches;
66
use dash_compiler::transformations;
77
use dash_middle::interner::StringInterner;
@@ -12,15 +12,15 @@ use dash_optimizer::consteval::ConstFunctionEvalCtx;
1212
use dash_optimizer::type_infer::name_res;
1313

1414
pub fn dump(arg: &ArgMatches) -> anyhow::Result<()> {
15-
let dump_ir = arg.is_present("ir");
16-
let dump_ast = arg.is_present("ast");
17-
let dump_js = arg.is_present("js");
18-
let dump_bytecode = arg.is_present("bytecode");
19-
let dump_tokens = arg.is_present("tokens");
20-
let dump_types = arg.is_present("types");
15+
let dump_ir = *arg.get_one::<bool>("ir").unwrap();
16+
let dump_ast = *arg.get_one::<bool>("ast").unwrap();
17+
let dump_js = *arg.get_one::<bool>("js").unwrap();
18+
let dump_bytecode = *arg.get_one::<bool>("bytecode").unwrap();
19+
let dump_tokens = *arg.get_one::<bool>("tokens").unwrap();
20+
let dump_types = *arg.get_one::<bool>("types").unwrap();
2121

2222
let opt = *arg.get_one::<OptLevel>("opt").unwrap();
23-
let path = arg.value_of("file").context("Missing file")?;
23+
let path = arg.get_one::<String>("file").unwrap();
2424
let source = fs::read_to_string(path)?;
2525

2626
let interner = &mut StringInterner::new();

cli/src/cmd/eval.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use dash_vm::eval::EvalError;
88
use dash_vm::value::Root;
99

1010
pub fn eval(args: &ArgMatches) -> anyhow::Result<()> {
11-
let source = args.value_of("source").context("Missing source")?;
11+
let source = args.get_one::<String>("source").context("Missing source")?;
1212
let opt = *args.get_one::<OptLevel>("opt").unwrap();
1313

1414
tokio::runtime::Runtime::new()?.block_on(async move {

cli/src/cmd/repl.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ use dash_rt::format_value;
44
use dash_rt::runtime::Runtime;
55
use dash_vm::eval::EvalError;
66
use dash_vm::value::Root;
7-
use rustyline::Editor;
7+
use rustyline::DefaultEditor;
88

99
pub fn repl() -> anyhow::Result<()> {
10-
let mut rl = Editor::<()>::new();
10+
let mut rl = DefaultEditor::new()?;
1111

1212
tokio::runtime::Runtime::new()?.block_on(async move {
1313
let mut rt = Runtime::new(None);
@@ -17,7 +17,7 @@ pub fn repl() -> anyhow::Result<()> {
1717
continue;
1818
}
1919

20-
rl.add_history_entry(&input);
20+
rl.add_history_entry(&input).unwrap();
2121

2222
rt.vm_mut().with_scope(|scope| {
2323
match scope.eval(&input, OptLevel::Aggressive) {

cli/src/cmd/run.rs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,21 @@ use dash_rt::runtime::Runtime;
55
use dash_vm::eval::EvalError;
66
use dash_vm::value::Root;
77
use std::fs;
8-
use std::str::FromStr;
98
use std::time::Instant;
109

1110
use anyhow::Context;
1211
use clap::ArgMatches;
1312

1413
pub fn run(args: &ArgMatches) -> anyhow::Result<()> {
15-
let path = args.value_of("file").context("Missing source")?;
16-
let nodejs = args.is_present("node");
14+
let path = args.get_one::<String>("file").context("Missing source")?;
15+
let nodejs = *args.get_one::<bool>("node").unwrap();
1716
let initial_gc_threshold = args
18-
.value_of("initial-gc-threshold")
19-
.map(<usize as FromStr>::from_str)
17+
.get_one::<&str>("initial-gc-threshold")
18+
.map(|v| v.parse())
2019
.transpose()?;
2120
let opt = *args.get_one::<OptLevel>("opt").unwrap();
22-
let before = args.is_present("timing").then(Instant::now);
23-
let quiet = args.is_present("quiet");
21+
let before = args.get_one::<bool>("timing").unwrap().then(Instant::now);
22+
let quiet = *args.get_one::<bool>("quiet").unwrap();
2423

2524
if nodejs {
2625
#[cfg(feature = "nodejs")]

cli/src/main.rs

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
use std::backtrace::{Backtrace, BacktraceStatus};
22

3-
use anyhow::{Context, bail};
4-
use clap::{Arg, Command};
5-
use colorful::Colorful;
3+
use anyhow::bail;
4+
use clap::{Arg, ArgAction, Command};
65
use dash_optimizer::OptLevel;
6+
use owo_colors::OwoColorize;
77

88
mod cmd;
99
mod util;
@@ -14,16 +14,14 @@ fn main() -> anyhow::Result<()> {
1414
let opt_level = Arg::new("opt")
1515
.short('O')
1616
.long("opt")
17-
.value_parser(|val: &_| OptLevel::from_level(val).context("unknown opt level"))
18-
.default_value("1")
19-
.possible_values(["0", "1", "2"]);
17+
.value_parser(|val: &_| OptLevel::from_level(val).ok_or("unknown opt level (must be between 0 and 3)"))
18+
.default_value("1");
2019

21-
let nodejs = Arg::new("node").long("node").takes_value(false);
20+
let nodejs = Arg::new("node").long("node").action(ArgAction::SetTrue);
2221

2322
let initial_gc_threshold = Arg::new("initial-gc-threshold")
2423
.help("Sets the initial GC object threshold, i.e. the RSS at which the first GC cycle triggers.")
2524
.long("initial-gc-threshold")
26-
.takes_value(true)
2725
.required(false);
2826

2927
let app = Command::new("dash")
@@ -39,8 +37,8 @@ fn main() -> anyhow::Result<()> {
3937
Command::new("run")
4038
.override_help("Run a JavaScript file")
4139
.arg(Arg::new("file").required(true))
42-
.arg(Arg::new("timing").short('t').long("timing").takes_value(false))
43-
.arg(Arg::new("quiet").short('q').long("quiet").takes_value(false))
40+
.arg(Arg::new("timing").short('t').long("timing").action(ArgAction::SetTrue))
41+
.arg(Arg::new("quiet").short('q').long("quiet").action(ArgAction::SetTrue))
4442
.arg(opt_level.clone())
4543
.arg(nodejs)
4644
.arg(initial_gc_threshold.clone()),
@@ -50,12 +48,12 @@ fn main() -> anyhow::Result<()> {
5048
Command::new("dump")
5149
.override_help("Dumps intermediate code representation")
5250
.arg(Arg::new("file").required(true))
53-
.arg(Arg::new("ir").long("ir").takes_value(false))
54-
.arg(Arg::new("ast").long("ast").takes_value(false))
55-
.arg(Arg::new("js").long("js").takes_value(false))
56-
.arg(Arg::new("bytecode").long("bytecode").takes_value(false))
57-
.arg(Arg::new("tokens").long("tokens").takes_value(false))
58-
.arg(Arg::new("types").long("types").takes_value(false))
51+
.arg(Arg::new("ir").long("ir").action(ArgAction::SetTrue))
52+
.arg(Arg::new("ast").long("ast").action(ArgAction::SetTrue))
53+
.arg(Arg::new("js").long("js").action(ArgAction::SetTrue))
54+
.arg(Arg::new("bytecode").long("bytecode").action(ArgAction::SetTrue))
55+
.arg(Arg::new("tokens").long("tokens").action(ArgAction::SetTrue))
56+
.arg(Arg::new("types").long("types").action(ArgAction::SetTrue))
5957
.arg(opt_level),
6058
);
6159

crates/dash_compiler/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ decompile = []
1212
[dependencies]
1313
dash_regex = { path = "../dash_regex" }
1414
dash_middle = { path = "../dash_middle" }
15-
strum = "0.24.0"
16-
strum_macros = "0.24.0"
15+
strum = "0.27.0"
16+
strum_macros = "0.27.0"
1717
dash_parser = { path = "../dash_parser", optional = true }
1818
dash_lexer = { path = "../dash_lexer", optional = true }
1919
dash_optimizer = { path = "../dash_optimizer" }
2020
dash_log = { path = "../dash_log" }
2121
tracing = "0.1.37"
22-
rustc-hash = "1.1.0"
22+
rustc-hash = "2.1.0"

crates/dash_decompiler/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ edition = "2024"
55

66
[dependencies]
77
dash_middle = { path = "../dash_middle" }
8-
thiserror = "1.0.34"
8+
thiserror = "2.0.12"

crates/dash_dlloader/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ edition = "2024"
99
dash_vm = { path = "../dash_vm" }
1010
dash_middle = { path = "../dash_middle" }
1111
dash_rt = { path = "../dash_rt" }
12-
libloading = "0.7"
12+
libloading = "0.8"

0 commit comments

Comments
 (0)