feat(env): Phase 71-73 - SSA fix + Stage-3 ENV consolidation
## Phase 71-SSA: StageBDriverBox birth warning 解消 - Fixed false-positive dev verify warning for static boxes - StageBDriverBox is a static box, so it doesn't follow NewBox→birth pattern - Modified lifecycle.rs to skip StageBDriverBox from birth() requirement ## Phase 73-A: Stage-3 legacy ENV 統一化 - Consolidated NYASH_PARSER_STAGE3 and HAKO_PARSER_STAGE3 → NYASH_FEATURES=stage3 - Updated 20 test files (46 direct replacements) - Special handling for parser_stage3.rs compat layer and mir_static_main_args_loop.rs - All test files now use unified NYASH_FEATURES=stage3 ## Phase 72-73: ENV inventory documented - Created phase72-73-env-inventory.md with complete usage analysis - Identified 113 direct ENV reads requiring SSOT consolidation - Prioritized Phase 72 (JoinIR EXPERIMENT SSOT) and Phase 73 (Stage-3 cleanup) ## Phase 74-SSA: Minimal reproduction for static box delegation - Created parser_box_minimal.hako and ssa_static_delegation_min.hako - Investigated spawn failure in selfhost compiler (arguments too long) - Root cause: NYASH_NY_COMPILER_EMIT_ONLY=1 defaults to emit-only mode 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@ -28,7 +28,7 @@ static box Main {
|
||||
.arg("--backend")
|
||||
.arg("vm")
|
||||
.arg(temp_file)
|
||||
.env("NYASH_PARSER_STAGE3", "1")
|
||||
.env("NYASH_FEATURES", "stage3")
|
||||
.env("NYASH_DISABLE_PLUGINS", "1")
|
||||
.output()
|
||||
.expect("Failed to execute hakorune");
|
||||
@ -63,7 +63,7 @@ static box Main {
|
||||
.arg("--backend")
|
||||
.arg("vm")
|
||||
.arg(temp_file)
|
||||
.env("NYASH_PARSER_STAGE3", "1")
|
||||
.env("NYASH_FEATURES", "stage3")
|
||||
.env("NYASH_DISABLE_PLUGINS", "1")
|
||||
.output()
|
||||
.expect("Failed to execute hakorune");
|
||||
@ -96,7 +96,7 @@ static box Main {
|
||||
.arg("--backend")
|
||||
.arg("vm")
|
||||
.arg(temp_file)
|
||||
.env("NYASH_PARSER_STAGE3", "1")
|
||||
.env("NYASH_FEATURES", "stage3")
|
||||
.env("NYASH_DISABLE_PLUGINS", "1")
|
||||
.output()
|
||||
.expect("Failed to execute hakorune");
|
||||
|
||||
@ -7,21 +7,23 @@ fn with_stage3_env<F: FnOnce()>(
|
||||
f: F,
|
||||
) {
|
||||
let prev_features = std::env::var("NYASH_FEATURES").ok();
|
||||
let prev_parser = std::env::var("NYASH_PARSER_STAGE3").ok();
|
||||
let prev_hako = std::env::var("HAKO_PARSER_STAGE3").ok();
|
||||
|
||||
match features {
|
||||
// Phase 73: Unified to NYASH_FEATURES=stage3
|
||||
// parser_stage3 and hako_stage3 now map to NYASH_FEATURES
|
||||
let final_features = if let Some(v) = features {
|
||||
Some(v.to_string())
|
||||
} else if let Some("0") = parser_stage3 {
|
||||
Some("0".to_string()) // Disabled
|
||||
} else if let Some("0") = hako_stage3 {
|
||||
Some("0".to_string()) // Disabled
|
||||
} else {
|
||||
None // Default (stage3 enabled)
|
||||
};
|
||||
|
||||
match final_features {
|
||||
Some(v) => std::env::set_var("NYASH_FEATURES", v),
|
||||
None => std::env::remove_var("NYASH_FEATURES"),
|
||||
}
|
||||
match parser_stage3 {
|
||||
Some(v) => std::env::set_var("NYASH_PARSER_STAGE3", v),
|
||||
None => std::env::remove_var("NYASH_PARSER_STAGE3"),
|
||||
}
|
||||
match hako_stage3 {
|
||||
Some(v) => std::env::set_var("HAKO_PARSER_STAGE3", v),
|
||||
None => std::env::remove_var("HAKO_PARSER_STAGE3"),
|
||||
}
|
||||
|
||||
f();
|
||||
|
||||
@ -29,14 +31,6 @@ fn with_stage3_env<F: FnOnce()>(
|
||||
Some(v) => std::env::set_var("NYASH_FEATURES", v),
|
||||
None => std::env::remove_var("NYASH_FEATURES"),
|
||||
}
|
||||
match prev_parser {
|
||||
Some(v) => std::env::set_var("NYASH_PARSER_STAGE3", v),
|
||||
None => std::env::remove_var("NYASH_PARSER_STAGE3"),
|
||||
}
|
||||
match prev_hako {
|
||||
Some(v) => std::env::set_var("HAKO_PARSER_STAGE3", v),
|
||||
None => std::env::remove_var("HAKO_PARSER_STAGE3"),
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user