✅ FIXED CRITICAL COMPILATION ERRORS: - ProductionBenzingaProvider: Added missing Debug trait - Trading Service: Fixed Option<f64> to f64 conversion in order book levels - TLS Config: Fixed certificate ownership and lifetime issues - Repository Impl: Fixed unused variable warnings with underscore prefix - Config Database: Fixed sqlx lifetime parameter errors - Common Types: Removed invalid Side import causing compilation failure 🔧 ARCHITECTURAL COMPLIANCE ACHIEVED: - Config Crate Centralization: All vault access properly routed through config crate - TLI Pure Client: No server components, clean gRPC client architecture - Service Independence: Trading/Backtesting/ML services properly decoupled - Repository Pattern: Clean dependency injection without database coupling 🎯 DEPENDENCY MANAGEMENT CORRECTED: - Fixed circular dependencies between services - Centralized configuration through config crate only - Removed direct vault dependencies outside config crate - Clean import structure across all services 📊 COMPILATION PROGRESS: - From 100+ critical errors to manageable type imports - Core architectural violations resolved - Clean service boundaries established - Repository interfaces properly abstracted 🚀 NEXT PHASE READY: - Common type exports need completion - Final import reconciliation pending - Zero errors target within reach 🎉 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
29 lines
1.2 KiB
Bash
Executable File
29 lines
1.2 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
FILE="services/trading_service/src/repository_impls.rs"
|
|
|
|
# Fix parameter passing patterns
|
|
# Pattern: sqlx::query("...", param1, param2) -> sqlx::query("...").bind(param1).bind(param2)
|
|
|
|
# Replace simple single parameter patterns
|
|
sed -i 's/sqlx::query(\([^,]*\), \([^)]*\))/sqlx::query(\1).bind(\2)/g' "$FILE"
|
|
|
|
# Fix field access patterns
|
|
# Replace row.field with row.get("field")
|
|
sed -i 's/row\.account_id/row.get("account_id")/g' "$FILE"
|
|
sed -i 's/row\.symbol/row.get("symbol")/g' "$FILE"
|
|
sed -i 's/row\.quantity/row.get("quantity")/g' "$FILE"
|
|
sed -i 's/row\.price/row.get("price")/g' "$FILE"
|
|
sed -i 's/row\.side/row.get::<i32, _>("side")/g' "$FILE"
|
|
sed -i 's/row\.order_type/row.get::<i32, _>("order_type")/g' "$FILE"
|
|
sed -i 's/row\.status/row.get::<i32, _>("status")/g' "$FILE"
|
|
sed -i 's/row\.average_price/row.get("average_price")/g' "$FILE"
|
|
sed -i 's/row\.market_value/row.get("market_value")/g' "$FILE"
|
|
sed -i 's/row\.unrealized_pnl/row.get("unrealized_pnl")/g' "$FILE"
|
|
sed -i 's/row\.value/row.get("value")/g' "$FILE"
|
|
|
|
# Fix timestamp patterns
|
|
sed -i 's/row\.timestamp\.unwrap_or(0)/row.get::<Option<i64>, _>("timestamp").unwrap_or(0)/g' "$FILE"
|
|
|
|
echo "Additional patterns fixed."
|