Skip to content

[build-tools] add parseXcactivitylogFunction#3578

Open
hSATAC wants to merge 1 commit intomainfrom
ash/eng-20491-integrate-xcactivitylog-parsing-into-ios-build-steps
Open

[build-tools] add parseXcactivitylogFunction#3578
hSATAC wants to merge 1 commit intomainfrom
ash/eng-20491-integrate-xcactivitylog-parsing-into-ios-build-steps

Conversation

@hSATAC
Copy link
Copy Markdown
Contributor

@hSATAC hSATAC commented Apr 7, 2026

Why

iOS builds currently have no visibility into per-module compile timing. Developers can't easily identify which targets are slow. Xcode generates .xcactivitylog files with detailed build timing data, but since Xcode 11 the CLI (xcodebuild) only produces them when -resultBundlePath is provided — which our Fastlane templates didn't include.

Linear: ENG-20491

How

  • Add result_bundle(true) and result_bundle_path to both Gymfile templates (archive + simulator) to trigger xcactivitylog generation. Also add derived_data_path to the archive template so the xcactivitylog lands in a known location (ios/build).
  • Add parseAndReportXcactivitylog() utility that downloads a pre-built XCLogParser binary, parses the xcactivitylog into JSON, and logs a per-module compile metrics table. Never fails the build — all errors are caught and logged as warnings.
  • Register eas/parse_xcactivitylog as a built-in step function (opt-in for custom workflows).
  • Also call parseAndReportXcactivitylog() in the traditional iOS builder flow under a new PARSE_XCACTIVITYLOG build phase, gated behind EXPERIMENTAL_EAS_XCACTIVITYLOG=1 env var.
  • Add PARSE_XCACTIVITYLOG to the BuildPhase enum in @expo/eas-build-job (requires publishing a new version and updating the dependency in universe for the display name to render correctly on the website).

Test Plan

  • Automation tests
  • Tested locally
  • To enable in traditional builds, set EXPERIMENTAL_EAS_XCACTIVITYLOG=1 in build profile env

@linear
Copy link
Copy Markdown

linear bot commented Apr 7, 2026

@hSATAC hSATAC added the no changelog PR that doesn't require a changelog entry label Apr 7, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 7, 2026

Codecov Report

❌ Patch coverage is 71.91781% with 41 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.35%. Comparing base (c6d4fae) to head (ceafe48).

Files with missing lines Patch % Lines
...s/build-tools/src/steps/utils/ios/xcactivitylog.ts 72.94% 36 Missing ⚠️
...ld-tools/src/steps/functions/parseXcactivitylog.ts 50.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3578      +/-   ##
==========================================
+ Coverage   54.27%   54.35%   +0.08%     
==========================================
  Files         820      822       +2     
  Lines       35055    35201     +146     
  Branches     7260     7283      +23     
==========================================
+ Hits        19024    19129     +105     
- Misses      15944    15985      +41     
  Partials       87       87              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@hSATAC hSATAC force-pushed the ash/eng-20491-integrate-xcactivitylog-parsing-into-ios-build-steps branch 2 times, most recently from f0add14 to 97d7b65 Compare April 8, 2026 12:31
Signed-off-by: Ash Wu <hsatac@gmail.com>
@hSATAC hSATAC force-pushed the ash/eng-20491-integrate-xcactivitylog-parsing-into-ios-build-steps branch from 97d7b65 to ceafe48 Compare April 8, 2026 13:08
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 8, 2026

⏩ The changelog entry check has been skipped since the "no changelog" label is present.

@hSATAC hSATAC requested a review from sjchmiela April 8, 2026 13:13
@hSATAC hSATAC marked this pull request as ready for review April 8, 2026 13:13
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 8, 2026

Subscribed to pull request

File Patterns Mentions
**/* @douglowder

Generated by CodeMention

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no changelog PR that doesn't require a changelog entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant