windjammer 0.48.0

A simple language inspired by Go, Ruby, and Elixir that transpiles to Rust - 80% of Rust's power with 20% of the complexity
Documentation
#![cfg(any(
    not(any(
        feature = "parser_tests",
        feature = "analyzer_tests",
        feature = "codegen_tests",
        feature = "interpreter_tests",
        feature = "conformance_tests",
        feature = "integration_tests",
    )),
    feature = "integration_tests",
))]

//! Integration test: str/String fix on real windjammer-game-core code
//!
//! Verifies that compiling scene/manager.wj produces &str (not str) in params.

use std::path::PathBuf;
use tempfile::TempDir;
use windjammer::build_project;
use windjammer::CompilationTarget;

#[test]
#[cfg_attr(tarpaulin, ignore)]
fn test_scene_manager_str_params_emit_ampersand_str() {
    let manifest_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
    let workspace_root = manifest_dir.join("..");
    let scene_manager_wj = workspace_root
        .join("windjammer-game")
        .join("windjammer-game-core")
        .join("src")
        .join("scene")
        .join("manager.wj");

    if !scene_manager_wj.exists() {
        eprintln!(
            "Skipping: windjammer-game not found at {:?}",
            scene_manager_wj
        );
        return;
    }

    let temp_dir = TempDir::new().expect("temp dir");
    let output_dir = temp_dir.path();

    let result = build_project(&scene_manager_wj, output_dir, CompilationTarget::Rust, true);
    if let Err(e) = result {
        eprintln!("build_project failed: {}", e);
        return; // Don't fail test if windjammer-game structure differs
    }

    let manager_rs = output_dir.join("manager.rs");
    if !manager_rs.exists() {
        eprintln!("Skipping: manager.rs not generated (output structure may differ)");
        return;
    }

    let content = std::fs::read_to_string(&manager_rs).expect("read manager.rs");

    // After fixing str→string in manager.wj, params that store values use String
    // Params that only read/compare can still use &str
    // Must NOT emit invalid bare "name: str)" (str is unsized in Rust)
    assert!(
        !content.contains("name: str)"),
        "Must not emit invalid 'name: str)' - str is unsized in Rust"
    );
}