Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run Bazel build and stub builds in parallel for more performant builds #1177

Closed
wants to merge 3 commits into from
Closed

Conversation

thii
Copy link
Contributor

@thii thii commented Sep 28, 2022

Instead of waiting for Bazel build to finish, we bring Bazel build to the background, and only check back for its status before copying outputs in the build of the requesting target.

Instead of waiting for Bazel build to finish, we bring Bazel build to
the background, and only check back for its status before copying
outputs in the build of the requesting target.
@thii
Copy link
Contributor Author

thii commented Sep 28, 2022

There is a blocker with this approach: unable to disable the ProcessInfoPlistFile action, so targets with an Info.plist will fail.

@@ -186,7 +186,7 @@ $(BAZEL_INTEGRATION_DIR)/calculate_output_groups.py
name: name,
outputFileListPaths: outputFileListPaths,
shellScript: """
"$BAZEL_INTEGRATION_DIR/bazel_build.sh"
Copy link
Contributor

Choose a reason for hiding this comment

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

And you could only do this in BwB mode, because in BwX, it needs generated sources. I think there might be other issues as well.

I like the idea though, and I hadn't considered backgrounding it. I was planning on something like this though where the various steps go as soon as they can, and I'll probably use this trick to accomplish it.

@jpsim
Copy link
Contributor

jpsim commented Sep 28, 2022

Will this cause the bazel build logs to no longer be available in Xcode though?

@brentleyjones
Copy link
Contributor

Yeah, that's an issue as well. I think with Xcode 14 I'll be able to have the copy outputs scripts run in parallel to this job, without losing the output. When addressing #400 and #402, the goal is that only bazel-specific output is output here, and outputs for various compiles and linking are shown in the targets themselves.

@thii
Copy link
Contributor Author

thii commented Sep 28, 2022

The bazel build logs are printed out at the end, so there will be a delay with warnings and errors.

@thii thii closed this Sep 30, 2022
@thii thii deleted the thi/parallel-builds branch September 30, 2022 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants