Merge pull request #4118 from youknowone/parser-error

panic when parser build failed
This commit is contained in:
Jeong YunWon
2022-08-22 03:26:07 +09:00
committed by GitHub

View File

@@ -71,12 +71,13 @@ fn try_lalrpop(source: &str, target: &str) -> anyhow::Result<()> {
}
#[cfg(feature = "lalrpop")]
lalrpop::process_root().expect("running lalrpop failed");
{
lalrpop::process_root().expect("running lalrpop failed");
Ok(())
}
#[cfg(not(feature = "lalrpop"))]
eprintln!("try: cargo build --manifest-path=parser/Cargo.toml --features=lalrpop");
Ok(())
panic!("try: cargo build --manifest-path=parser/Cargo.toml --features=lalrpop");
}
fn sha_equal(expected_sha3_str: &str, actual_sha3: &[u8; 32]) -> bool {