Skip to content

refactor: move fetching of source metadata to command dispatcher #3843

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

Merged
merged 14 commits into from
May 28, 2025

Conversation

baszalmstra
Copy link
Contributor

This PR replaces the code in the BuildContext to fetch source metadata with an implementation in the CommandDispatcher.

This involves:

  • Checking out the source code of a dependency.
  • Discovering the build backend to instantiate
  • Instantiating the backend
    • Solving the build backend environment
  • Calling into the build backend over RPC
  • Caching the result.

I tested this locally against all the examples in examples/pixi-build (and added another one) and verified that locking, relocking, satisfiability and installing still functions as expected.

Some things that I changed:

  • Build backends are always resolved to check for newer dependencies, this ensures that you always get the latest compatible version.
  • Changed the location and names of several caches. This might invalidate previous caches.

Copy link
Contributor

@Hofer-Julian Hofer-Julian left a comment

Choose a reason for hiding this comment

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

Code looks great, and it works as expected on my machine!

Hofer-Julian

This comment was marked as outdated.

Copy link
Contributor

@ruben-arts ruben-arts left a comment

Choose a reason for hiding this comment

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

I've been testing pixi build with it today, and didn't see anything unexpected. I've also just run all examples and there is no unexpected behavior. I feel confident merging this!

@ruben-arts ruben-arts merged commit e429ed2 into prefix-dev:main May 28, 2025
3 checks passed
Hofer-Julian added a commit to Hofer-Julian/pixi that referenced this pull request May 28, 2025
…her (prefix-dev#3843)"

We noticed that CI became really slow after we merged this PR.

Let's check if that was indeed the problem
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