Remove debug prints and fix build warnings
- Remove all print statements from planning engine, data providers, and PDF generation - Fix deprecated CLGeocoder usage with MKLocalSearch for iOS 26 - Fix Swift 6 actor isolation by converting PDFGenerator/ExportService to @MainActor - Add @retroactive to CLLocationCoordinate2D protocol conformances - Fix unused variable warnings in GameDAGRouter and scenario planners - Remove unreachable catch blocks in SettingsViewModel 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -68,9 +68,6 @@ final class ScenarioAPlanner: ScenarioPlanner {
|
||||
.filter { dateRange.contains($0.startTime) }
|
||||
.sorted { $0.startTime < $1.startTime }
|
||||
|
||||
print("[ScenarioA] Found \(gamesInRange.count) games in date range")
|
||||
print("[ScenarioA] Stadiums available: \(request.stadiums.count)")
|
||||
|
||||
// No games? Nothing to plan.
|
||||
if gamesInRange.isEmpty {
|
||||
return .failure(
|
||||
@@ -100,11 +97,6 @@ final class ScenarioAPlanner: ScenarioPlanner {
|
||||
stopBuilder: buildStops
|
||||
)
|
||||
|
||||
print("[ScenarioA] GameDAGRouter returned \(validRoutes.count) routes")
|
||||
if !validRoutes.isEmpty {
|
||||
print("[ScenarioA] Route sizes: \(validRoutes.map { $0.count })")
|
||||
}
|
||||
|
||||
if validRoutes.isEmpty {
|
||||
return .failure(
|
||||
PlanningFailure(
|
||||
@@ -136,23 +128,16 @@ final class ScenarioAPlanner: ScenarioPlanner {
|
||||
// Build stops for this route
|
||||
let stops = buildStops(from: routeGames, stadiums: request.stadiums)
|
||||
guard !stops.isEmpty else {
|
||||
print("[ScenarioA] Route \(index + 1) produced no stops, skipping")
|
||||
routesFailed += 1
|
||||
continue
|
||||
}
|
||||
|
||||
// Log stop details
|
||||
let stopCities = stops.map { "\($0.city) (coord: \($0.coordinate != nil))" }
|
||||
print("[ScenarioA] Route \(index + 1): \(stops.count) stops - \(stopCities.joined(separator: " → "))")
|
||||
|
||||
// Calculate travel segments using shared ItineraryBuilder
|
||||
guard let itinerary = ItineraryBuilder.build(
|
||||
stops: stops,
|
||||
constraints: request.drivingConstraints,
|
||||
logPrefix: "[ScenarioA]"
|
||||
constraints: request.drivingConstraints
|
||||
) else {
|
||||
// This route fails driving constraints, skip it
|
||||
print("[ScenarioA] Route \(index + 1) failed driving constraints, skipping")
|
||||
routesFailed += 1
|
||||
continue
|
||||
}
|
||||
@@ -176,8 +161,6 @@ final class ScenarioAPlanner: ScenarioPlanner {
|
||||
// If no routes passed all constraints, fail.
|
||||
// Otherwise, return all valid options for the user to choose from.
|
||||
//
|
||||
print("[ScenarioA] Routes attempted: \(routesAttempted), failed: \(routesFailed), succeeded: \(itineraryOptions.count)")
|
||||
|
||||
if itineraryOptions.isEmpty {
|
||||
return .failure(
|
||||
PlanningFailure(
|
||||
@@ -201,7 +184,6 @@ final class ScenarioAPlanner: ScenarioPlanner {
|
||||
limit: request.preferences.maxTripOptions
|
||||
)
|
||||
|
||||
print("[ScenarioA] Returning \(rankedOptions.count) itinerary options (leisure: \(leisureLevel.rawValue))")
|
||||
return .success(rankedOptions)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user