runner: centralize resolve env flags
This commit is contained in:
16
src/config/env/using_flags.rs
vendored
16
src/config/env/using_flags.rs
vendored
@ -3,6 +3,7 @@
|
||||
//! This module groups all `using` system and namespace flags.
|
||||
//! Use this for IDE autocomplete to discover using/namespace flags easily.
|
||||
|
||||
use super::env_bool;
|
||||
use super::warn_alias_once;
|
||||
|
||||
pub fn enable_using() -> bool {
|
||||
@ -68,3 +69,18 @@ pub fn using_ast_enabled() -> bool {
|
||||
_ => !using_is_prod(), // dev/ci → true, prod → false
|
||||
}
|
||||
}
|
||||
|
||||
// ---- Using/resolve diagnostics ----
|
||||
pub fn resolve_trace() -> bool {
|
||||
env_bool("NYASH_RESOLVE_TRACE")
|
||||
}
|
||||
|
||||
pub fn resolve_seam_debug() -> bool {
|
||||
env_bool("NYASH_RESOLVE_SEAM_DEBUG")
|
||||
}
|
||||
|
||||
pub fn resolve_dump_merged_path() -> Option<String> {
|
||||
std::env::var("NYASH_RESOLVE_DUMP_MERGED")
|
||||
.ok()
|
||||
.filter(|s| !s.is_empty())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user