From ed815b1c83d2a7aa98d4a4478dc994611be3b630 Mon Sep 17 00:00:00 2001 From: jneem Date: Mon, 20 May 2024 03:30:03 -0500 Subject: [PATCH] Improve build script performance (#1921) --- Cargo.lock | 24 +++++++++++++++--------- Cargo.toml | 10 ++++++++-- core/src/error/mod.rs | 2 +- 3 files changed, 24 insertions(+), 12 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a9577c251f..6d59461976 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1287,33 +1287,33 @@ dependencies = [ [[package]] name = "lalrpop" -version = "0.19.12" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a1cbf952127589f2851ab2046af368fd20645491bb4b376f04b7f94d7a9837b" +checksum = "55cb077ad656299f160924eb2912aa147d7339ea7d69e1b5517326fdcec3c1ca" dependencies = [ "ascii-canvas", "bit-set", - "diff", "ena", - "is-terminal", - "itertools 0.10.5", + "itertools 0.11.0", "lalrpop-util", "petgraph", + "pico-args", "regex", - "regex-syntax 0.6.29", + "regex-syntax 0.8.2", "string_cache", "term", "tiny-keccak", "unicode-xid 0.2.4", + "walkdir", ] [[package]] name = "lalrpop-util" -version = "0.19.12" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3c48237b9604c5a4702de6b824e02006c3214327564636aef27c1028a8fa0ed" +checksum = "507460a910eb7b32ee961886ff48539633b788a36b65692b95f225b844c82553" dependencies = [ - "regex", + "regex-automata", ] [[package]] @@ -1935,6 +1935,12 @@ dependencies = [ "siphasher", ] +[[package]] +name = "pico-args" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315" + [[package]] name = "pin-project-lite" version = "0.2.13" diff --git a/Cargo.toml b/Cargo.toml index 7d92042d7c..c7207ce4f8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -56,8 +56,8 @@ indexmap = "1.9.3" indoc = "2" insta = "1.29.0" js-sys = "0.3" -lalrpop = "0.19.9" -lalrpop-util = "0.19.9" +lalrpop = "0.20.2" +lalrpop-util = "0.20.2" lazy_static = "1" log = "0.4" logos = "0.12" @@ -103,3 +103,9 @@ topiary-queries = { git = "https://github.com/tweag/topiary.git", rev = "82a94a9 # This should be kept in sync with the revision in topiary tree-sitter-nickel = { git = "https://github.com/nickel-lang/tree-sitter-nickel", rev = "58baf89db8fdae54a84bcf22c80ff10ee3f929ed" } tempfile = "3.5.0" + +[profile.dev.package.lalrpop] +opt-level = 3 + +[profile.release.package.lalrpop] +opt-level = 3 diff --git a/core/src/error/mod.rs b/core/src/error/mod.rs index 70afaef9ed..c5e7d6ed8f 100644 --- a/core/src/error/mod.rs +++ b/core/src/error/mod.rs @@ -706,7 +706,7 @@ impl ParseError { token: (start, _, end), expected, } => ParseError::UnexpectedToken(mk_span(file_id, start, end), expected), - lalrpop_util::ParseError::UnrecognizedEOF { expected, .. } => { + lalrpop_util::ParseError::UnrecognizedEof { expected, .. } => { ParseError::UnexpectedEOF(file_id, expected) } lalrpop_util::ParseError::ExtraToken {