Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ DANGER = bundle exec danger

# Swift Compiler Flags
# SWIFT_FLAGS = OTHER_SWIFT_FLAGS="-warnings-as-errors" # Temporarily disabled due to conflict
SWIFT_FLAGS =
SWIFT_FLAGS = OTHER_SWIFT_FLAGS="-Xfrontend -warn-long-function-bodies=100 -Xfrontend -warn-long-expression-type-checking=100"
RELEASE_FLAGS = COMPILER_INDEX_STORE_ENABLE=NO SWIFT_COMPILATION_MODE=wholemodule
DEBUG_FLAGS = OTHER_SWIFT_FLAGS="-Xfrontend -debug-time-function-bodies -Xfrontend -debug-time-expression-type-checking"

# Parallel build settings
PARALLEL_WORKERS = $(shell sysctl -n hw.ncpu)
Expand Down Expand Up @@ -73,7 +74,7 @@ regenerate: clean-project generate ## Clean and regenerate project
# MARK: - Building

.PHONY: build
build: generate ## Build the project
build: generate ## Build the project with enhanced diagnostics
@echo "$(BLUE)Building $(PROJECT_NAME) ($(CONFIGURATION))...$(NC)"
@$(XCODEBUILD) build \
-project $(PROJECT) \
Expand All @@ -82,8 +83,9 @@ build: generate ## Build the project
-derivedDataPath $(DERIVED_DATA) \
$(BUILD_FLAGS) \
$(SWIFT_FLAGS) \
$(if $(filter Debug,$(CONFIGURATION)),$(DEBUG_FLAGS),) \
CODE_SIGNING_ALLOWED=NO \
| $(XCPRETTY)
2>&1 | ./scripts/build-error-diagnostics.sh filter | $(XCPRETTY)
Copy link

Copilot AI Jul 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pipeline redirects stderr to stdout and then processes it through the diagnostics script, but this may interfere with xcpretty's ability to properly format and colorize the output. Consider whether xcpretty should come before or after the diagnostics script, or if both stdout and stderr need separate handling.

Suggested change
2>&1 | ./scripts/build-error-diagnostics.sh filter | $(XCPRETTY)
1> >(./scripts/build-error-diagnostics.sh filter) 2> >(tee /dev/stderr) | $(XCPRETTY)

Copilot uses AI. Check for mistakes.
@echo "$(GREEN)✓ Build succeeded$(NC)"

.PHONY: build-modular
Expand Down
Loading