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

Use the same output base for Xcode Build and Index Build #3074

Conversation

brentleyjones
Copy link
Contributor

By using --preemptible Bazel flag on Index Builds, normal builds will cause them to cancel instead of block for them. This along with Xcode’s default interrupt means that Index Builds are able to use the same output base with minimal impact to normal builds.

This change has numerous benefits:

  • Indexing completes faster since it can reuse any normal builds that have happened, including analysis
  • Normal builds complete faster because it can leverage the work done by background Index Builds
  • Quickly open won’t show two source paths anymore for generated files, since there is now only one path
  • With only one output base, disk usage is drastically cut down
  • There is one less Bazel server, so memory usage is drastically cut down

@brentleyjones brentleyjones requested a review from a team as a code owner August 19, 2024 15:20
@thiagohmcruz
Copy link
Contributor

Amazing! I'll run some tests on this branch today using our repo!

@brentleyjones
Copy link
Contributor Author

This means that any settings that are different between normal and index builds can cause reanalysis when switching between the two. I'm debugging if there are any changes on the ruleset side that are needed to add with this, as interally we are def running into an issue with that.

@brentleyjones
Copy link
Contributor Author

brentleyjones commented Aug 19, 2024

Needs #3075.

@brentleyjones brentleyjones force-pushed the bj/use-the-same-output-base-for-xcode-build-and-index-build branch from a19961b to 651b15a Compare August 20, 2024 12:40
By using `--preemptible` Bazel flag on Index Builds, normal builds will cause them to cancel instead of block for them. This along with Xcode’s default interrupt means that Index Builds are able to use the same output base with minimal impact to normal builds.

This change has numerous benefits:

- Indexing completes faster since it can reuse any normal builds that have happened, including analysis
- Normal builds complete faster because it can leverage the work done by background Index Builds
- Quickly open won’t show two source paths anymore for generated files, since there is now only one path
- With only one output base, disk usage is drastically cut down
- There is one less Bazel server, so memory usage is drastically cut down

Signed-off-by: Brentley Jones <[email protected]>
@brentleyjones brentleyjones force-pushed the bj/use-the-same-output-base-for-xcode-build-and-index-build branch from 651b15a to 5b4ef48 Compare August 20, 2024 13:48
@brentleyjones brentleyjones merged commit 59303f5 into main Aug 20, 2024
16 checks passed
@brentleyjones brentleyjones deleted the bj/use-the-same-output-base-for-xcode-build-and-index-build branch August 20, 2024 18:16
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.

2 participants