Skip to content

Conversation

@philprime
Copy link
Member

@philprime philprime commented Jan 8, 2026

Summary

This PR refactors the Makefile to provide better structure, documentation, and developer experience.

Changes

  • CONFIGURATION section: Added platform-specific variables for iOS, tvOS, visionOS, and watchOS
  • Structured sections: Organized targets into clear sections (SETUP, BUILDING, TESTING, LINTING & FORMATTING, ANALYSIS, CODE GENERATION, VERSION MANAGEMENT, VALIDATION, XCODE PROJECT GENERATION, HELP & DOCUMENTATION)
  • Comprehensive documentation: Added documentation comments (## for summaries, # for details) following best practices
  • Help system: Added make help command with detailed help for each target
  • Platform build targets: Added make build convenience target and individual platform builds (build-ios, build-macos, build-catalyst, build-tvos, build-visionos, build-watchos)
  • Platform test targets: Added make test convenience target and individual platform tests (test-ios, test-macos, test-catalyst, test-tvos, test-visionos)
  • watchOS support: Added build-watchos target (tests not available as XCTest is not supported on watchOS)
  • Improved consistency: Platform-specific variable naming for better maintainability

Example: make help Output

==============================================
🚀 SENTRY COCOA SDK DEVELOPMENT COMMANDS
==============================================

init                    Setup the project by installing dependencies, pre-commit hooks, rbenv, and bundler
init-local              Setup local development environment
init-ci-build           Install CI build dependencies
init-ci-format          Install CI format dependencies
update-versions         Update tooling versions
check-versions          Check tooling versions
build                   Build all platforms
build-ios               Build iOS target
build-macos             Build macOS target
build-catalyst          Build Catalyst target
build-tvos              Build tvOS target
build-visionos          Build visionOS target
build-watchos           Build watchOS target
build-xcframework       Build XCFramework for distribution
build-signed-xcframework Build signed XCFramework for distribution
build-xcframework-sample Build XCFramework validation sample
test                    Run all platform tests
test-ios                Run iOS tests
test-macos              Run macOS tests
test-catalyst           Run Catalyst tests
test-tvos               Run tvOS tests
test-visionos           Run visionOS tests
run-test-server         Run test server in background
run-test-server-sync    Run test server synchronously
test-ui-critical        Run critical UI tests
lint                    Run linting checks on all files
lint-staged             Run linting checks on staged files only
format                  Format all files
format-clang            Format Objective-C, C, and C++ files
format-swift-all        Format all Swift files
format-swift-staged     Format staged Swift files
format-markdown         Format Markdown files
format-json             Format JSON files
format-yaml             Format YAML files
analyze                 Run static analysis
generate-public-api     Generate public API documentation
bump-version            Bump version to specified version
verify-version          Verify version matches specified version
clean-version-bump      Clean and build VersionBump tool
release                 Release new version
git-commit-add          Commit version changes and create tag
pod-lint                Lint CocoaPods podspec
xcode                   Generate Xcode projects and open workspace
xcode-ci                Generate all sample Xcode projects
help                    Show this help message with all available commands

💡 Use 'make <command>' to run any command above.
📖 For detailed help on a command, run: make help-<command>  (e.g., make help-build-ios)
📖 Or: make help name=<command>      (e.g., make help name=build-ios)

Benefits

  • Better discoverability with make help
  • Clearer organization makes it easier to find targets
  • Platform-specific variables allow easy customization
  • Consistent structure improves maintainability

Testing

  • Verified make help works correctly
  • Verified all existing targets still function
  • Verified help system shows all targets with descriptions

Closes #7135

- Add CONFIGURATION section with platform-specific variables
- Organize targets into clear sections (SETUP, BUILDING, TESTING, etc.)
- Add comprehensive documentation comments (## summaries, # details)
- Add help system with 'make help' command
- Add build targets for all platforms (iOS, macOS, Catalyst, tvOS, visionOS, watchOS)
- Add test targets for all platforms (except watchOS - XCTest not supported)
- Add make build and make test convenience targets
- Improve consistency with platform-specific variable naming
- Update watchOS build to use Simulator destination
- Add comment explaining why test-watchos is not available
@codecov
Copy link

codecov bot commented Jan 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.776%. Comparing base (33ade5e) to head (4a8ea52).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #7129       +/-   ##
=============================================
+ Coverage   84.716%   84.776%   +0.060%     
=============================================
  Files          459       461        +2     
  Lines        27494     27780      +286     
  Branches     12120     12315      +195     
=============================================
+ Hits         23292     23551      +259     
- Misses        3942      4187      +245     
+ Partials       260        42      -218     

see 40 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 33ade5e...4a8ea52. Read the comment docs.

@philprime philprime added the ready-to-merge Use this label to trigger all PR workflows label Jan 9, 2026
@philprime
Copy link
Member Author

@sentry review

@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2026

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1214.34 ms 1257.39 ms 43.05 ms
Size 24.14 KiB 1.04 MiB 1.02 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
43f1295 1230.57 ms 1261.67 ms 31.10 ms
efa740d 1220.71 ms 1246.20 ms 25.50 ms
effeafa 1225.88 ms 1249.78 ms 23.90 ms
18be519 1241.22 ms 1260.57 ms 19.35 ms
5cfc768 1220.74 ms 1245.06 ms 24.32 ms
d7461dc 1233.69 ms 1255.29 ms 21.60 ms
28f150e 1218.25 ms 1253.73 ms 35.48 ms
aa643c5 1228.25 ms 1261.08 ms 32.83 ms
5d81ddc 1221.06 ms 1262.49 ms 41.43 ms
ac363a0 1210.67 ms 1237.80 ms 27.13 ms

App size

Revision Plain With Sentry Diff
43f1295 24.14 KiB 1.01 MiB 1013.99 KiB
efa740d 23.75 KiB 919.69 KiB 895.95 KiB
effeafa 23.74 KiB 926.64 KiB 902.89 KiB
18be519 23.75 KiB 926.64 KiB 902.90 KiB
5cfc768 23.75 KiB 850.73 KiB 826.98 KiB
d7461dc 23.75 KiB 874.45 KiB 850.70 KiB
28f150e 24.14 KiB 1.03 MiB 1.00 MiB
aa643c5 23.75 KiB 1015.07 KiB 991.32 KiB
5d81ddc 24.15 KiB 1.01 MiB 1014.59 KiB
ac363a0 24.14 KiB 1.01 MiB 1012.81 KiB

Previous results on branch: philprime/makefile-makeover

Startup times

Revision Plain With Sentry Diff
4acae15 1225.65 ms 1245.24 ms 19.59 ms

App size

Revision Plain With Sentry Diff
4acae15 24.14 KiB 1.03 MiB 1.01 MiB

…pendency

The HELP_DETAIL_AWK script was incorrectly showing the first dependency
in the usage output instead of the requested target. For example, when
requesting help for 'test', it would show 'Usage: make test-ios' instead
of 'Usage: make test'. This fix ensures the usage always shows the
target the user requested.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge Use this label to trigger all PR workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor(dx): Add structured Makefile with usage description

2 participants