Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3578 +/- ##
==========================================
+ Coverage 54.86% 55.04% +0.18%
==========================================
Files 836 838 +2
Lines 35901 36073 +172
Branches 7492 7518 +26
==========================================
+ Hits 19694 19852 +158
- Misses 16112 16126 +14
Partials 95 95 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
97d7b65 to
ceafe48
Compare
|
Subscribed to pull request
Generated by CodeMention |
| logger.info('Parsing xcactivitylog...'); | ||
| const jsonOutput = await runXclogparser(xclogparserPath, derivedDataPath, workspacePath); | ||
|
|
||
| const data = JSON.parse(jsonOutput); |
There was a problem hiding this comment.
Do we want to report stuff to Datadog too?
There was a problem hiding this comment.
I think this is out of scope for this PR. For now I want to focus on getting the architecture in place and validating the end-to-end flow. Metrics / telemetry integration seems useful, but I’d rather handle that in a follow-up once we’ve aligned on the shape and destination of the data.
| binaryPath: string, | ||
| derivedDataPath: string, | ||
| workspacePath: string | ||
| ): Promise<string> { |
There was a problem hiding this comment.
Would it make sense to write a Zod schema and parse the output here? Then we don't rely on "interface"s we "expect" but have the actual parsed objects. I think theoretically you could also filter out steps you're not interested in (like in an array they may fail validation and get removed? not sure)
There was a problem hiding this comment.
Let me rethink this part a bit. After taking another look, I realized the current approach (reading stdout into memory and doing a JSON.parse) could be problematic.
The JSON can get quite large (hundreds of MB), which would put significant pressure on memory.
I’m thinking I may need to switch to writing it to disk and then reading it in a buffered/streaming way instead.
I’m not sure if Zod would still fit well under these constraints — I’ll need to look into it — but I think performance should probably be the primary concern here.
There was a problem hiding this comment.
Hmm interesting. Maybe there's a way to tell xclogparser to be smaller about the output? Also, I think computers are good at computering so maybe hundreds of MBs isn't a problem?
There was a problem hiding this comment.
I tried locally with flatJson reporter it only reduces from 250MB -> 248 MB, it's not helping.
| scheme, | ||
| buildConfiguration, | ||
| outputDirectory: './build', | ||
| derivedDataPath: './build', |
There was a problem hiding this comment.
I presume putting derivedDataPath in the same directory as outputDirectory is not going to be a problem?
There was a problem hiding this comment.
I tested both simulator and archive builds with this setup and did not run into any issues, so I’m planning to keep it as-is for now.
Signed-off-by: Ash Wu <hsatac@gmail.com>
Signed-off-by: Ash Wu <hsatac@gmail.com>
ceafe48 to
8cbd305
Compare
|
⏩ The changelog entry check has been skipped since the "no changelog" label is present. |
Why
iOS builds currently have no visibility into per-module compile timing. Developers can't easily identify which targets are slow. Xcode generates
.xcactivitylogfiles with detailed build timing data, but since Xcode 11 the CLI (xcodebuild) only produces them when-resultBundlePathis provided — which our Fastlane templates didn't include.Linear: ENG-20491
How
result_bundle(true)andresult_bundle_pathto both Gymfile templates (archive + simulator) to trigger xcactivitylog generation. Also addderived_data_pathto the archive template so the xcactivitylog lands in a known location (ios/build).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.eas/parse_xcactivitylogas a built-in step function (opt-in for custom workflows).parseAndReportXcactivitylog()in the traditional iOS builder flow under a newPARSE_XCACTIVITYLOGbuild phase, gated behindEXPERIMENTAL_EAS_XCACTIVITYLOG=1env var.PARSE_XCACTIVITYLOGto theBuildPhaseenum 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
EXPERIMENTAL_EAS_XCACTIVITYLOG=1in build profile env