Skip to content

Conversation

@rockbruno
Copy link
Member

The issue with using a separate output base is that we cannot make good use of index while building. This PR then adds an options for everything to happen on a single output base to enable regular build actions to pre-populate the index for us.

WIP: Still trying to understand which particular setup (compile_top_level, etc) results in the strongest gain and whether or not sourcekit-lsp behaves correctly when requests are cancelled.

@rockbruno rockbruno force-pushed the rochab/same-output-base branch from 8daf33a to 439cad2 Compare December 16, 2025 19:04
@josh-arnold-1
Copy link
Contributor

Would our "index flag" cause our BSP building in single output base to invalidate the cached results?

Copy link
Contributor

@luispadron luispadron left a comment

Choose a reason for hiding this comment

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

It might be good to run the single-output base build with --preemptible so that if a user runs bazel build the BSP build is terminated and the user build is unblocked

@rockbruno
Copy link
Member Author

rockbruno commented Dec 17, 2025

@josh-arnold-1 Only if you set it up to produce different results. If you see the Example project the flags there don't do anything special so it would work in that situation.

@luispadron Yes, that's already the case today. I am not 100% convinced that sourcekit-lsp can deal with canceled requests correctly, but haven't bumped into big issues so far

@josh-arnold-1
Copy link
Contributor

@josh-arnold-1 Only if you set it up to produce different results. If you see the Example project the flags there don't do anything special so it would work in that situation.

Thanks! Sorry for dumb question — is there anyway I can check to see if the flags cause invalidation? Would bazel print somethiing when running bazel build, like "discarding analysis" or something?

@rockbruno
Copy link
Member Author

rockbruno commented Dec 18, 2025

@josh-arnold-1 For analysis yes, the output will mention it. It will also be very slow to switch back and forth between the variants.

@rockbruno rockbruno force-pushed the rochab/same-output-base branch from 439cad2 to 2859076 Compare December 31, 2025 12:00
@rockbruno rockbruno force-pushed the rochab/same-output-base branch from 2859076 to e66141d Compare December 31, 2025 12:02
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