033 default with dependencies

✓ Passing This code compiles and runs correctly.

Code

// Test 645: Default Steps with Dependencies
// Tests that ~[default, depends_on(...)] annotations work correctly
//
// Overrides all default steps with simple echos to verify:
// 1. Steps execute in dependency order
// 2. User overrides replace stdlib defaults
//
// Expected output order: compile_backend -> build -> run

~import "$std/build"

// Override compile_backend (no dependencies)
~std.build:step(name: "compile_backend") {
    echo "step:compile_backend" > tests/regression/300_ADVANCED_FEATURES/310_COMPTIME/310_033_default_with_dependencies/steps.log
}

// Override build (depends on compile_backend)
~[depends_on("compile_backend")]std.build:step(name: "build") {
    echo "step:build" >> tests/regression/300_ADVANCED_FEATURES/310_COMPTIME/310_033_default_with_dependencies/steps.log
}

// Override run (depends on build)
~[depends_on("build")]std.build:step(name: "run") {
    echo "step:run" >> tests/regression/300_ADVANCED_FEATURES/310_COMPTIME/310_033_default_with_dependencies/steps.log
}
input.kz

Test Configuration

Post-validation Script:

#!/bin/bash
# Verify build steps executed in correct dependency order

if [[ ! -f "steps.log" ]]; then
    echo "FAIL: steps.log not found"
    exit 1
fi

EXPECTED="step:compile_backend
step:build
step:run"

ACTUAL=$(cat "steps.log")

if [[ "$ACTUAL" != "$EXPECTED" ]]; then
    echo "FAIL: Steps executed in wrong order"
    echo "Expected:"
    echo "$EXPECTED"
    echo "Actual:"
    echo "$ACTUAL"
    rm -f "steps.log"
    exit 1
fi

echo "PASS: Build steps executed in correct dependency order"
rm -f "steps.log"
exit 0