Skip to content

Conversation

itsjunetime
Copy link
Contributor

On main, trying to run cargo xtask install --pgo crate@version panics due to some code paths trying to re-attach to the salsa database when it's already attached. To resolve that, I changed some parts of the code to not attach to the database when we already know we're attached.

I'm not sure if this is the "correct" approach, but it seems to do the job for me. After this change, I was able to do all the following just fine:

  1. cargo nextest run
  2. cargo build --release --features mimalloc --target $(rustc --print host-tuple) && cargo xtask install --server --mimalloc --proc-macro-server --pgo apache/datafusion@50.0.0 (as an example crate)
  3. Using my ide with the version of rust-analyzer installed in the previous step and jumping around, using suggestions, etc.

This PR is also probably better viewed without the whitespace changes - there's a good bit of indentation changes.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 2, 2025
@ChayimFriedman2
Copy link
Contributor

That's my mistake in #20765, but the fix needed is much smaller: just shrink the scope of the salsa::attach() to end before the call to run_ide_things().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants