Closed Bug 1744504 Opened 3 years ago Closed 3 years ago

iOS: Skip running in indexbuilds

Categories

(Data Platform and Tools :: Glean: SDK, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: janerik, Assigned: janerik)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Since Xcode 13 Xcode runs a so called indexbuild, which triggers the Glean parser script.
Then it gets triggered again during a build.
This can lead to problems.

See Firefox iOS discussion: https://github.com/mozilla-mobile/firefox-ios/discussions/9511
See R.swift issue, too: https://github.com/mac-cain13/R.swift/issues/719

The "fix" right now is to skip work in indexbuild runs.
Longer term we should advise iOS projects to run the parser & code generator in a different stage of the build.

Blocks: 1744506
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED

Quick note that this change is also needed for projects that use SwiftUI - otherwise SwiftUI Previews break.

This is actually an interesting case because with SwiftUI Previews (the mode where you have your code and a rendered UI side-by-side) results in many many frequent compiles or at least index builds. Since anything on the build path slows things down, I think we should consider for our iOS projects to remove the invocation to sdk_generator.sh from the build system and instead only call it manualy when telemetry changes are being worked on.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: