From a534524911e8b206beb06946ac5dfed2d1e65a71 Mon Sep 17 00:00:00 2001 From: Shunsuke Shibayama Date: Thu, 19 Sep 2024 15:19:50 +0900 Subject: [PATCH] fix: disable parallelization by default --- Cargo.toml | 2 ++ crates/erg_common/config.rs | 14 ++++++++++++++ crates/erg_compiler/Cargo.toml | 2 ++ crates/erg_linter/Cargo.toml | 2 ++ 4 files changed, 20 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 7b5bf06ed..3d9d6c6bc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,6 +30,8 @@ repository = "https://github.com/erg-lang/erg" homepage = "https://erg-lang.org/" [features] +# The parallelizing compiler was found to contain a bug that caused it to hang in complex dependencies, so it is disabled by default. +default = ["single-thread"] # when "debug" feature is turned on, that of the following crates will also be turned on. debug = ["erg_common/debug", "erg_parser/debug", "erg_compiler/debug", "erg_linter/debug"] # "els/debug" backtrace = ["erg_common/backtrace", "els/backtrace"] diff --git a/crates/erg_common/config.rs b/crates/erg_common/config.rs index f52e399ed..724dffd3b 100644 --- a/crates/erg_common/config.rs +++ b/crates/erg_common/config.rs @@ -467,6 +467,8 @@ impl ErgConfig { "--build-features" => { #[cfg(feature = "debug")] print!("debug "); + #[cfg(feature = "backtrace")] + println!("backtrace"); #[cfg(feature = "els")] print!("els "); #[cfg(feature = "py_compat")] @@ -483,6 +485,18 @@ impl ErgConfig { print!("pretty "); #[cfg(feature = "large_thread")] print!("large_thread"); + #[cfg(feature = "no_std")] + println!("no_std"); + #[cfg(feature = "full-repl")] + println!("full-repl"); + #[cfg(feature = "experimental")] + println!("experimental"); + #[cfg(feature = "pylib")] + println!("pylib"); + #[cfg(feature = "log-level-error")] + println!("log-level-error"); + #[cfg(feature = "single-thread")] + println!("single-thread"); println!(); process::exit(0); } diff --git a/crates/erg_compiler/Cargo.toml b/crates/erg_compiler/Cargo.toml index c2502bf36..9d2b10f84 100644 --- a/crates/erg_compiler/Cargo.toml +++ b/crates/erg_compiler/Cargo.toml @@ -11,6 +11,8 @@ repository.workspace = true homepage.workspace = true [features] +# The parallelizing compiler was found to contain a bug that caused it to hang in complex dependencies, so it is disabled by default. +default = ["single-thread"] # when "debug" feature is turned on, that of parser will also be turned on. debug = ["erg_common/debug", "erg_parser/debug"] japanese = ["erg_common/japanese", "erg_parser/japanese"] diff --git a/crates/erg_linter/Cargo.toml b/crates/erg_linter/Cargo.toml index 9c1a46071..79cd15b27 100644 --- a/crates/erg_linter/Cargo.toml +++ b/crates/erg_linter/Cargo.toml @@ -10,6 +10,8 @@ repository.workspace = true homepage.workspace = true [features] +# The parallelizing compiler was found to contain a bug that caused it to hang in complex dependencies, so it is disabled by default. +default = ["single-thread"] debug = ["erg_common/debug", "erg_parser/debug", "erg_compiler/debug"] backtrace = ["erg_common/backtrace"] japanese = [