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.778%. Comparing base (3bf0d3f) to head (1699ac1).
⚠️ Report is 4 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.749%   84.778%   +0.028%     
=============================================
  Files          461       461               
  Lines        27815     27815               
  Branches     12323     12323               
=============================================
+ Hits         23573     23581        +8     
- Misses        3981      4192      +211     
+ Partials       261        42      -219     

see 32 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 3bf0d3f...1699ac1. 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

@philprime philprime marked this pull request as ready for review January 9, 2026 09:19
@philprime philprime enabled auto-merge (squash) January 9, 2026 09:20
@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2026

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1223.72 ms 1253.61 ms 29.89 ms
Size 24.14 KiB 1.04 MiB 1.02 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
013fd4d 1216.02 ms 1242.16 ms 26.14 ms
83bf9af 1213.30 ms 1234.18 ms 20.89 ms
778dadf 1207.69 ms 1246.09 ms 38.40 ms
3bf0d3f 1202.12 ms 1237.23 ms 35.11 ms
2f4ddaa 1227.26 ms 1260.04 ms 32.78 ms
9f7ef2b 1213.53 ms 1250.23 ms 36.70 ms
adeec82 1220.43 ms 1254.94 ms 34.51 ms
d29a425 1209.96 ms 1239.00 ms 29.04 ms

App size

Revision Plain With Sentry Diff
013fd4d 24.14 KiB 1.04 MiB 1.02 MiB
83bf9af 24.14 KiB 1.04 MiB 1.02 MiB
778dadf 24.14 KiB 1.04 MiB 1.02 MiB
3bf0d3f 24.14 KiB 1.04 MiB 1.02 MiB
2f4ddaa 24.14 KiB 1.04 MiB 1.02 MiB
9f7ef2b 24.14 KiB 1.04 MiB 1.02 MiB
adeec82 24.14 KiB 1.04 MiB 1.02 MiB
d29a425 24.14 KiB 1.04 MiB 1.02 MiB

Previous results on branch: philprime/makefile-makeover

Startup times

Revision Plain With Sentry Diff
178559d 1220.23 ms 1251.87 ms 31.63 ms
4acae15 1225.65 ms 1245.24 ms 19.59 ms
b5992b3 1214.34 ms 1257.39 ms 43.05 ms

App size

Revision Plain With Sentry Diff
178559d 24.14 KiB 1.04 MiB 1.02 MiB
4acae15 24.14 KiB 1.03 MiB 1.01 MiB
b5992b3 24.14 KiB 1.04 MiB 1.02 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.
Resolved conflict in Makefile by integrating the new
strip-xcframework-expected-signature target from main while
preserving the improved documentation formatting from the
makefile-makeover branch.
Copy link
Member

@philipphofmann philipphofmann left a comment

Choose a reason for hiding this comment

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

Thanks, this is long overdue.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 13, 2026

Semver Impact of This PR

🟢 Patch (bug fixes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

  • Add isiOSAppOnVisionOS, isiOSAppOnMac, isMacCatalystApp to device context by philprime in #6939

Bug Fixes 🐛

  • (logs) Use sendDefaultPii and span_id for attributes by philprime in #7055
  • Fix incorrect variable assignment for 'sampled' key by xjshi in #7120
  • Mark dark theme deprecated by noahsmartin in #7114
  • Update raw_description in runtime context for Mac Catalyst App by philprime in #7082
  • Use correct parsing for stackframes by noahsmartin in #6908
  • Transport correctly handling 4xx and 5xx by dfed in #6618

Build / dependencies / internal 🔧

Deps

  • Bump getsentry/craft/.github/workflows/changelog-preview.yml from 2.18.1 to 2.18.3 by dependabot in #7159
  • Bump ruby/setup-ruby from 1.276.0 to 1.279.0 by dependabot in #7117
  • Bump mikepenz/action-junit-report from 6.0.1 to 6.1.0 by dependabot in #7116
  • Update swiftlint version by github-actions in #7109
  • Bump ruby/setup-ruby from 1.275.0 to 1.276.0 by dependabot in #7103
  • Bump codecov/test-results-action from 1.1.1 to 1.2.1 by itaybre in #7087
  • Bump ruby/setup-ruby from 1.270.0 to 1.275.0 by itaybre in #7088
  • Bump peter-evans/create-pull-request from 7.0.11 to 8.0.0 by dependabot in #7084
  • Bump actions/download-artifact from 6 to 7 by dependabot in #7048
  • Bump aws-sdk-s3 from 1.205.0 to 1.208.0 by dependabot in #7074
  • Bump ruby/setup-ruby from 1.269.0 to 1.270.0 by dependabot in #7049
  • Update clang-format version by github-actions in #7056
  • Bump actions/cache from 4 to 5 by dependabot in #7052
  • Bump actions/upload-artifact from 5 to 6 by dependabot in #7050
  • Bump codecov/codecov-action from 5.5.1 to 5.5.2 by dependabot in #7051

Other

  • (dx) Add structured Makefile with usage description by philprime in #7129
  • (release) Switch from action-prepare-release to Craft (minimal) by BYK in #7153
  • Fix typos in comments in multiple files v2 by philipphofmann in #7139
  • Run visionOS tests on Cirrus Runners + Boot simulator by itaybre in #7147
  • Skip jobs/steps that require secrets for non contributors by itaybre in #7124
  • Add attributable protocol for typed attribute values by philprime in #7077
  • Allow alpha releases on RNSentry.podspec for Cross Platform Test by itaybre in #7130
  • Remove swift5.9 checks by itaybre in #7098
  • Remove duplicate file in project by itaybre in #7093
  • Convert SentryMetricKitIntegration to Swift by noahsmartin in #7076
  • Removes HybridSDK subspec by itaybre in #7019
  • Move testRemoveImageFromTail to flaky plan by itaybre in #7041
  • Use at least xcode 16 for all jobs by itaybre in #7012
  • Cleanup file filter for required files modified by itaybre in #7031
  • Remove assembly workflow files from UI test filter by itaybre in #7030
  • Bumps macOS-14 runner to macOS-15 by itaybre in #7029
  • Ensure required simulators are loaded for all platforms by itaybre in #7022

Other

  • test: Add Options Documentation Sync Tests by philipphofmann in #7075

🤖 This preview updates automatically when you update the PR.

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 Waiting for: Review ⏳

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor(dx): Add structured Makefile with usage description

3 participants