Open stherold opened 1 year ago
Same here 🙋♂️
Same here
Have you tried the new flags suggested at the link to see if they work? If they do, then we welcome a contribution to change the wording and references to those now removed flags.
@stherold What is the xcodebuild command you was using?
@hoangatuan that one:
xcodebuild -workspace <ws-name>.xcworkspace -scheme <scheme> -resultBundlePath "$(mktemp).xcresult" -destination "platform=iOS Simulator,name=iPhone 15 Pro,OS=latest"
and then:
xclogparser parse --workspace <ws-name>.xcworkspace --reporter html
But now with Xcode 15.3 I get yet another eror (probably related to https://github.com/MobileNativeFoundation/XCLogParser/issues/203):
Error: The line *{"stime":68549,"utim doesn't seem like a valid SLF line
@stherold Make sure you add these flags to "Other Swift Flags" in your project build setting "-Xfrontend", "-warn-long-function-bodies=200", "-Xfrontend", "-warn-long-expression-type-checking=200"
If your workspace uses swift package manager, can insert this code to your Package.swift file
for target in package.targets {
target.swiftSettings = target.swiftSettings ?? []
target.swiftSettings?.append(
.unsafeFlags([
"-Xfrontend", "-warn-long-function-bodies=200", "-Xfrontend", "-warn-long-expression-type-checking=200",
])
)
}
@stherold For Xcode 15.3, seems like XCLogParse is breaking. While waiting for the bug to be fixed, for now you can use this script to get slow compile warnings
xcodebuild -workspace <ws-name>.xcworkspace -scheme <scheme> -destination "platform=iOS Simulator,name=iPhone 15 Pro,OS=latest" OTHER_SWIFT_FLAGS="-Xfrontend -warn-long-function-bodies=200 -Xfrontend -warn-long-expression-type-checking=200" clean build | grep .[0-9]ms | grep -v ^0.[0-9]ms | grep "^$ROOT_DIRECTORY" | sort -nr > log.txt
References from my project: https://github.com/hoangatuan/iOSDevEx/blob/main/Sources/ToolBoxCore/Commands/DetectSlowCompile/DetectSlowCompileHandler.swift#L91
Yes that generates some output 👍 Does that mean that it would be part of the final report?
@Blackjacx Sorry I dont understand your question "Does that mean that it would be part of the final report?".
This is just a simple script that extract Xcode build logs directly by using regex. It doesn't use XCLogParser, so it can't generate the html report
Getting this issue as well when updating to Xcode 15.3. Any ETA on the fix?
Hey there 👋
I don't get any compilation time statistics in teh HTML file. According to this post the Swift compiler flags the generated website suggests don't exist anymore: