Skip to content

Commit

Permalink
fix: disable parallelization by default
Browse files Browse the repository at this point in the history
  • Loading branch information
mtshiba committed Sep 19, 2024
1 parent 58b22c4 commit a534524
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
14 changes: 14 additions & 0 deletions crates/erg_common/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand All @@ -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);
}
Expand Down
2 changes: 2 additions & 0 deletions crates/erg_compiler/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
2 changes: 2 additions & 0 deletions crates/erg_linter/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down

0 comments on commit a534524

Please sign in to comment.